/* Generated by Cython 0.29.34 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "define_macros": [
            [
                "CGL_EXCLUDE_AUDIO",
                null
            ],
            [
                "CGL_EXCLUDE_NETWORKING",
                null
            ],
            [
                "CGL_LOGGING_ENABLED",
                null
            ]
        ],
        "depends": [
            "include\\cgl.h"
        ],
        "include_dirs": [
            "include",
            "include/glad/include",
            "include/glfw/include",
            "include/freetype/include"
        ],
        "libraries": [
            "cgl",
            "glfw3",
            "glad",
            "freetype",
            "user32",
            "Gdi32",
            "Shell32"
        ],
        "library_dirs": [
            "lib"
        ],
        "name": "cgl",
        "sources": [
            "cgl_wrapper.pyx"
        ]
    },
    "module_name": "cgl"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.6+ or Python 3.3+.
#else
#define CYTHON_ABI "0_29_34"
#define CYTHON_HEX_VERSION 0x001D22F0
#define CYTHON_FUTURE_DIVISION 0
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #if PY_VERSION_HEX >= 0x02070000
    #define HAVE_LONG_LONG
  #endif
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
#elif defined(PY_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 0
  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #if PY_VERSION_HEX < 0x02070000
    #undef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
    #define CYTHON_USE_PYLONG_INTERNALS (PY_VERSION_HEX < 0x030C00A5)
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 0
  #elif !defined(CYTHON_FAST_THREAD_STATE)
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000)
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
  #ifndef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS ((PY_VERSION_HEX >= 0x030600B1) && (PY_VERSION_HEX < 0x030C00A5))
  #endif
  #if PY_VERSION_HEX >= 0x030B00A4
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
           typedef unsigned char     uint8_t;
           typedef unsigned int      uint32_t;
        #else
           typedef unsigned __int8   uint8_t;
           typedef unsigned __int32  uint32_t;
        #endif
    #endif
#else
   #include <stdint.h>
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus) && __cplusplus >= 201103L
    #if __has_cpp_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH [[fallthrough]]
    #elif __has_cpp_attribute(clang::fallthrough)
      #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
    #elif __has_cpp_attribute(gnu::fallthrough)
      #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__ ) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
  #define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if PY_VERSION_HEX >= 0x030B00A1
    static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL;
        PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL;
        const char *fn_cstr=NULL;
        const char *name_cstr=NULL;
        PyCodeObject* co=NULL;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        if (!(kwds=PyDict_New())) goto end;
        if (!(argcount=PyLong_FromLong(a))) goto end;
        if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end;
        if (!(posonlyargcount=PyLong_FromLong(0))) goto end;
        if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end;
        if (!(kwonlyargcount=PyLong_FromLong(k))) goto end;
        if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end;
        if (!(nlocals=PyLong_FromLong(l))) goto end;
        if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end;
        if (!(stacksize=PyLong_FromLong(s))) goto end;
        if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end;
        if (!(flags=PyLong_FromLong(f))) goto end;
        if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end;
        if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end;
        if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end;
        if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end;
        if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end;
        if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too;
        if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here
        if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too;
        Py_XDECREF((PyObject*)co);
        co = (PyCodeObject*)call_result;
        call_result = NULL;
        if (0) {
            cleanup_code_too:
            Py_XDECREF((PyObject*)co);
            co = NULL;
        }
        end:
        Py_XDECREF(kwds);
        Py_XDECREF(argcount);
        Py_XDECREF(posonlyargcount);
        Py_XDECREF(kwonlyargcount);
        Py_XDECREF(nlocals);
        Py_XDECREF(stacksize);
        Py_XDECREF(replace);
        Py_XDECREF(call_result);
        Py_XDECREF(empty);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return co;
    }
#else
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #define __Pyx_PyCFunctionFast _PyCFunctionFast
  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
#endif
#if CYTHON_FAST_PYCCALL
#define __Pyx_PyFastCFunction_Check(func)\
    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
  #define PyMem_RawMalloc(n)           PyMem_Malloc(n)
  #define PyMem_RawRealloc(p, n)       PyMem_Realloc(p, n)
  #define PyMem_RawFree(p)             PyMem_Free(p)
#endif
#if CYTHON_COMPILING_IN_PYSTON
  #define __Pyx_PyCode_HasFreeVars(co)  PyCode_HasFreeVars(co)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStr(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
#else
#define __Pyx_PyDict_GetItemStr(dict, name)  PyDict_GetItem(dict, name)
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
  #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
  #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
#else
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__cgl
#define __PYX_HAVE_API__cgl
/* Early includes */
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "cgl.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

static PyObject *__pyx_m = NULL;
static PyObject *__pyx_d;
static PyObject *__pyx_b;
static PyObject *__pyx_cython_runtime = NULL;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static PyObject *__pyx_empty_unicode;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "cgl_wrapper.pyx",
  "stringsource",
};
/* NoFastGil.proto */
#define __Pyx_PyGILState_Ensure PyGILState_Ensure
#define __Pyx_PyGILState_Release PyGILState_Release
#define __Pyx_FastGIL_Remember()
#define __Pyx_FastGIL_Forget()
#define __Pyx_FastGilFuncInit()

/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif


/*--- Type declarations ---*/
struct __pyx_obj_3cgl_vec2;
struct __pyx_obj_3cgl_vec3;
struct __pyx_obj_3cgl_vec4;
struct __pyx_obj_3cgl_ivec4;
struct __pyx_obj_3cgl_mat4;
struct __pyx_obj_3cgl_transform;
struct __pyx_obj_3cgl_matrix;
struct __pyx_obj_3cgl_window;
struct __pyx_obj_3cgl_image;
struct __pyx_obj_3cgl_mesh_vertex;
struct __pyx_obj_3cgl_mesh_cpu;
struct __pyx_obj_3cgl_texture;
struct __pyx_obj_3cgl_framebuffer;
struct __pyx_obj_3cgl_mesh_gpu;
struct __pyx_obj_3cgl_shader;
struct __pyx_obj_3cgl_ssbo;
struct __pyx_obj_3cgl_ubo;
struct __pyx_obj_3cgl_shape;
struct __pyx_obj_3cgl_bloom;
struct __pyx_obj_3cgl_tilemap;
struct __pyx_obj_3cgl_font_character;
struct __pyx_obj_3cgl_font;
struct __pyx_obj_3cgl_widgets;
struct __pyx_obj_3cgl_noise_params;

/* "cgl_wrapper.pyx":882
 *     return CGL_float_cubic_lerp(a, b, c, d, t)
 * 
 * cdef class vec2:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2 c_vec2
 * 
 */
struct __pyx_obj_3cgl_vec2 {
  PyObject_HEAD
  struct CGL_vec2 c_vec2;
};


/* "cgl_wrapper.pyx":977
 * 
 * 
 * cdef class vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 c_vec3
 * 
 */
struct __pyx_obj_3cgl_vec3 {
  PyObject_HEAD
  struct CGL_vec3 c_vec3;
};


/* "cgl_wrapper.pyx":1088
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 * cdef class vec4:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec4 c_vec4
 * 
 */
struct __pyx_obj_3cgl_vec4 {
  PyObject_HEAD
  struct CGL_vec4 c_vec4;
};


/* "cgl_wrapper.pyx":1198
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 * 
 * cdef class ivec4:             # <<<<<<<<<<<<<<
 *     cdef CGL_ivec4 c_ivec4
 * 
 */
struct __pyx_obj_3cgl_ivec4 {
  PyObject_HEAD
  struct CGL_ivec4 c_ivec4;
};


/* "cgl_wrapper.pyx":1261
 *             raise AttributeError()
 * 
 * cdef class mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 c_mat4
 * 
 */
struct __pyx_obj_3cgl_mat4 {
  PyObject_HEAD
  struct __pyx_vtabstruct_3cgl_mat4 *__pyx_vtab;
  struct CGL_mat4 c_mat4;
};


/* "cgl_wrapper.pyx":1429
 * 
 * 
 * cdef class transform:             # <<<<<<<<<<<<<<
 *     cdef CGL_transform c_transform
 * 
 */
struct __pyx_obj_3cgl_transform {
  PyObject_HEAD
  struct CGL_transform c_transform;
};


/* "cgl_wrapper.pyx":1510
 * 
 * 
 * cdef class matrix:             # <<<<<<<<<<<<<<
 *     cdef int m
 *     cdef int n
 */
struct __pyx_obj_3cgl_matrix {
  PyObject_HEAD
  int m;
  int n;
  struct CGL_matrix *c_matrix;
};


/* "cgl_wrapper.pyx":1899
 *     window_object.drag_n_drop_callback(window_object, path_list)
 * 
 * cdef class window:             # <<<<<<<<<<<<<<
 *     cdef CGL_window* c_window
 *     cdef bool is_decorated
 */
struct __pyx_obj_3cgl_window {
  PyObject_HEAD
  struct CGL_window *c_window;
  bool is_decorated;
  bool has_been_destroyed;
  PyObject *title;
  PyObject *key_callback;
  PyObject *mouse_button_callback;
  PyObject *mouse_position_callback;
  PyObject *mouse_scroll_callback;
  PyObject *framebuffer_size_callback;
  PyObject *close_callback;
  PyObject *drag_n_drop_callback;
};


/* "cgl_wrapper.pyx":2084
 *         return f"window({self.width}, {self.height}, {self.title})"
 * 
 * cdef class image:             # <<<<<<<<<<<<<<
 *     cdef CGL_image c_image
 *     cdef object image_data
 */
struct __pyx_obj_3cgl_image {
  PyObject_HEAD
  struct CGL_image c_image;
  PyObject *image_data;
};


/* "cgl_wrapper.pyx":2125
 *         self.c_image.data = <void*>self.image_data
 * 
 * cdef class mesh_vertex:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_vertex c_vertex
 * 
 */
struct __pyx_obj_3cgl_mesh_vertex {
  PyObject_HEAD
  struct CGL_mesh_vertex c_vertex;
};


/* "cgl_wrapper.pyx":2199
 * 
 * 
 * cdef class mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh
 *     cdef bool has_been_destroyed
 */
struct __pyx_obj_3cgl_mesh_cpu {
  PyObject_HEAD
  struct __pyx_vtabstruct_3cgl_mesh_cpu *__pyx_vtab;
  struct CGL_mesh_cpu *c_mesh;
  bool has_been_destroyed;
};


/* "cgl_wrapper.pyx":2381
 * CUBEMAP_NEGATIVE_Z = 0x851A
 * 
 * cdef class texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture
 *     cdef bool has_been_destroyed
 */
struct __pyx_obj_3cgl_texture {
  PyObject_HEAD
  struct __pyx_vtabstruct_3cgl_texture *__pyx_vtab;
  struct CGL_texture *c_texture;
  bool has_been_destroyed;
};


/* "cgl_wrapper.pyx":2512
 *     return res
 * 
 * cdef class framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer
 *     cdef bool has_been_destroyed
 */
struct __pyx_obj_3cgl_framebuffer {
  PyObject_HEAD
  struct __pyx_vtabstruct_3cgl_framebuffer *__pyx_vtab;
  struct CGL_framebuffer *c_framebuffer;
  bool has_been_destroyed;
};


/* "cgl_wrapper.pyx":2630
 *     CGL_gl_render_screen_quad()
 * 
 * cdef class mesh_gpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_gpu* c_mesh
 *     cdef bool has_been_destroyed
 */
struct __pyx_obj_3cgl_mesh_gpu {
  PyObject_HEAD
  struct __pyx_vtabstruct_3cgl_mesh_gpu *__pyx_vtab;
  struct CGL_mesh_gpu *c_mesh;
  bool has_been_destroyed;
  PyObject *name;
};


/* "cgl_wrapper.pyx":2686
 * 
 * 
 * cdef class shader:             # <<<<<<<<<<<<<<
 *     cdef CGL_shader* c_shader
 *     cdef bool has_been_destroyed
 */
struct __pyx_obj_3cgl_shader {
  PyObject_HEAD
  struct __pyx_vtabstruct_3cgl_shader *__pyx_vtab;
  struct CGL_shader *c_shader;
  bool has_been_destroyed;
  PyObject *name;
  PyObject *uniform_map;
};


/* "cgl_wrapper.pyx":2821
 *         CGL_shader_compute_dispatch(self.c_shader, x, y, z)
 * 
 * cdef class ssbo:             # <<<<<<<<<<<<<<
 *     cdef CGL_ssbo* c_ssbo
 *     cdef bool has_been_destroyed
 */
struct __pyx_obj_3cgl_ssbo {
  PyObject_HEAD
  struct CGL_ssbo *c_ssbo;
  bool has_been_destroyed;
};


/* "cgl_wrapper.pyx":2896
 *     CGL_ssbo_copy(dst.c_ssbo, src.c_ssbo, src_offset, dst_offset, size)
 * 
 * cdef class ubo:             # <<<<<<<<<<<<<<
 *     cdef CGL_ubo* c_ubo
 *     cdef bool has_been_destroyed
 */
struct __pyx_obj_3cgl_ubo {
  PyObject_HEAD
  struct CGL_ubo *c_ubo;
  bool has_been_destroyed;
};


/* "cgl_wrapper.pyx":2964
 * 
 * 
 * cdef class shape:             # <<<<<<<<<<<<<<
 *     cdef CGL_shape c_shape
 * 
 */
struct __pyx_obj_3cgl_shape {
  PyObject_HEAD
  struct CGL_shape c_shape;
};


/* "cgl_wrapper.pyx":3155
 * BLOOM_SHADER_MODE_COMPOSITE    = 3
 * 
 * cdef class bloom:             # <<<<<<<<<<<<<<
 *     cdef CGL_bloom* c_bloom
 *     cdef int width
 */
struct __pyx_obj_3cgl_bloom {
  PyObject_HEAD
  struct CGL_bloom *c_bloom;
  int width;
  int height;
  int iterations;
};


/* "cgl_wrapper.pyx":3247
 *         return result
 * 
 * cdef class tilemap:             # <<<<<<<<<<<<<<
 *     cdef CGL_tilemap* c_tilemap
 *     cdef int tile_count_x
 */
struct __pyx_obj_3cgl_tilemap {
  PyObject_HEAD
  struct CGL_tilemap *c_tilemap;
  int tile_count_x;
  int tile_count_y;
  int tile_size_x;
  int tile_size_y;
  int ssbo_binding;
};


/* "cgl_wrapper.pyx":3345
 *         CGL_tilemap_reset(self.c_tilemap)
 * 
 * cdef class font_character:             # <<<<<<<<<<<<<<
 *     cdef CGL_font_character c_font_character
 * 
 */
struct __pyx_obj_3cgl_font_character {
  PyObject_HEAD
  struct CGL_font_character c_font_character;
};


/* "cgl_wrapper.pyx":3392
 *         return self.c_font_character.ch
 * 
 * cdef class font:             # <<<<<<<<<<<<<<
 *     cdef CGL_font* c_font
 *     cdef bool has_been_destroyed
 */
struct __pyx_obj_3cgl_font {
  PyObject_HEAD
  struct CGL_font *c_font;
  bool has_been_destroyed;
  PyObject *meta_data;
};


/* "cgl_wrapper.pyx":3454
 * 
 * 
 * cdef class widgets:             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
struct __pyx_obj_3cgl_widgets {
  PyObject_HEAD
};


/* "cgl_wrapper.pyx":3716
 * NOISE_FRACTAL_TYPE_COUNT    = 5
 * 
 * cdef class noise_params:             # <<<<<<<<<<<<<<
 *     cdef CGL_noise_params c_noise_params
 * 
 */
struct __pyx_obj_3cgl_noise_params {
  PyObject_HEAD
  struct CGL_noise_params c_noise_params;
};



/* "cgl_wrapper.pyx":1261
 *             raise AttributeError()
 * 
 * cdef class mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 c_mat4
 * 
 */

struct __pyx_vtabstruct_3cgl_mat4 {
  PyObject *(*set_c_mat4)(struct __pyx_obj_3cgl_mat4 *, struct CGL_mat4);
};
static struct __pyx_vtabstruct_3cgl_mat4 *__pyx_vtabptr_3cgl_mat4;


/* "cgl_wrapper.pyx":2199
 * 
 * 
 * cdef class mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh
 *     cdef bool has_been_destroyed
 */

struct __pyx_vtabstruct_3cgl_mesh_cpu {
  PyObject *(*set_c_mesh)(struct __pyx_obj_3cgl_mesh_cpu *, struct CGL_mesh_cpu *);
};
static struct __pyx_vtabstruct_3cgl_mesh_cpu *__pyx_vtabptr_3cgl_mesh_cpu;


/* "cgl_wrapper.pyx":2381
 * CUBEMAP_NEGATIVE_Z = 0x851A
 * 
 * cdef class texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture
 *     cdef bool has_been_destroyed
 */

struct __pyx_vtabstruct_3cgl_texture {
  PyObject *(*set_c_texture)(struct __pyx_obj_3cgl_texture *, struct CGL_texture *);
};
static struct __pyx_vtabstruct_3cgl_texture *__pyx_vtabptr_3cgl_texture;


/* "cgl_wrapper.pyx":2512
 *     return res
 * 
 * cdef class framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer
 *     cdef bool has_been_destroyed
 */

struct __pyx_vtabstruct_3cgl_framebuffer {
  PyObject *(*set_c_framebuffer)(struct __pyx_obj_3cgl_framebuffer *, struct CGL_framebuffer *);
};
static struct __pyx_vtabstruct_3cgl_framebuffer *__pyx_vtabptr_3cgl_framebuffer;


/* "cgl_wrapper.pyx":2630
 *     CGL_gl_render_screen_quad()
 * 
 * cdef class mesh_gpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_gpu* c_mesh
 *     cdef bool has_been_destroyed
 */

struct __pyx_vtabstruct_3cgl_mesh_gpu {
  PyObject *(*set_c_mesh)(struct __pyx_obj_3cgl_mesh_gpu *, struct CGL_mesh_gpu *);
};
static struct __pyx_vtabstruct_3cgl_mesh_gpu *__pyx_vtabptr_3cgl_mesh_gpu;


/* "cgl_wrapper.pyx":2686
 * 
 * 
 * cdef class shader:             # <<<<<<<<<<<<<<
 *     cdef CGL_shader* c_shader
 *     cdef bool has_been_destroyed
 */

struct __pyx_vtabstruct_3cgl_shader {
  PyObject *(*set_c_shader)(struct __pyx_obj_3cgl_shader *, struct CGL_shader *);
};
static struct __pyx_vtabstruct_3cgl_shader *__pyx_vtabptr_3cgl_shader;

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* PyCFunctionFastCall.proto */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
#else
#define __Pyx_PyCFunction_FastCall(func, args, nargs)  (assert(0), NULL)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if CYTHON_FAST_PYCALL
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif // CYTHON_FAST_PYCALL
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCall2Args.proto */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod0.proto */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CallUnboundCMethod0(cfunc, self)\
    (likely((cfunc)->func) ?\
        (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
         (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
            (PY_VERSION_HEX >= 0x030700A0 ?\
                (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
                (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
          (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
            (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
            (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
               ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
               __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
        __Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
    const char* function_name);

/* decode_c_string_utf16.proto */
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 0;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = -1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
    int byteorder = 1;
    return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
}

/* decode_c_string.proto */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* PyObjectCallNoArg.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#define __Pyx_PyErr_Occurred()  __pyx_tstate->curexc_type
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

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

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_DivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
    ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
    #endif

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_DivideCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_DivideCObj(op1, op2, floatval, inplace, zerodivision_check)\
    ((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)))
    #endif

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* PyIntCompare.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* KeywordStringCheck.proto */
static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* WriteUnraisableException.proto */
static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

/* CallUnboundCMethod1.proto */
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);
#else
#define __Pyx_CallUnboundCMethod1(cfunc, self, arg)  __Pyx__CallUnboundCMethod1(cfunc, self, arg)
#endif

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* PyDictContains.proto */
static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
    int result = PyDict_Contains(dict, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* ExtTypeTest.proto */
static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);

/* DivInt[long].proto */
static CYTHON_INLINE long __Pyx_div_long(long, long);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* GCCDiagnostics.proto */
#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* BuildPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char);

/* CIntToPyUnicode.proto */
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char);

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* GetAttr3.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* HasAttr.proto */
static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* PyObject_GenericGetAttr.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* SetupReduce.proto */
static int __Pyx_setup_reduce(PyObject* type_obj);

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

/* GetNameInClass.proto */
#define __Pyx_GetNameInClass(var, nmspace, name)  (var) = __Pyx__GetNameInClass(nmspace, name)
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

static PyObject* __pyx_convert__to_py_struct__CGL_vec2(struct CGL_vec2 s);
static PyObject* __pyx_convert__to_py_struct__CGL_vec3(struct CGL_vec3 s);
static PyObject* __pyx_convert__to_py_struct__CGL_vec4(struct CGL_vec4 s);
static PyObject* __pyx_convert__to_py_struct__CGL_mat4(struct CGL_mat4 s);
static PyObject* __pyx_convert__to_py_struct__CGL_ivec4(struct CGL_ivec4 s);
static PyObject* __pyx_convert__to_py_struct__CGL_mesh_vertex(struct CGL_mesh_vertex s);
static PyObject* __pyx_convert__to_py_struct__CGL_font_character(struct CGL_font_character s);
/* CIntFromPy.proto */
static CYTHON_INLINE CGL_uint __Pyx_PyInt_As_CGL_uint(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);

/* CIntFromPy.proto */
static CYTHON_INLINE CGL_int __Pyx_PyInt_As_CGL_int(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CGL_int(CGL_int value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CGL_ulong(CGL_ulong value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CGL_uint(CGL_uint value);

/* CIntFromPy.proto */
static CYTHON_INLINE uint8_t __Pyx_PyInt_As_uint8_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* CIntFromPy.proto */
static CYTHON_INLINE CGL_byte __Pyx_PyInt_As_CGL_byte(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CheckBinaryVersion.proto */
static int __Pyx_check_binary_version(void);

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

static PyObject *__pyx_f_3cgl_4mat4_set_c_mat4(struct __pyx_obj_3cgl_mat4 *__pyx_v_self, struct CGL_mat4 __pyx_v_c_mat4); /* proto*/
static PyObject *__pyx_f_3cgl_8mesh_cpu_set_c_mesh(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct CGL_mesh_cpu *__pyx_v_c_mesh); /* proto*/
static PyObject *__pyx_f_3cgl_7texture_set_c_texture(struct __pyx_obj_3cgl_texture *__pyx_v_self, struct CGL_texture *__pyx_v_c_texture); /* proto*/
static PyObject *__pyx_f_3cgl_11framebuffer_set_c_framebuffer(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, struct CGL_framebuffer *__pyx_v_c_framebuffer); /* proto*/
static PyObject *__pyx_f_3cgl_8mesh_gpu_set_c_mesh(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, struct CGL_mesh_gpu *__pyx_v_c_mesh); /* proto*/
static PyObject *__pyx_f_3cgl_6shader_set_c_shader(struct __pyx_obj_3cgl_shader *__pyx_v_self, struct CGL_shader *__pyx_v_c_shader); /* proto*/

/* Module declarations from 'libcpp' */

/* Module declarations from 'libc.stdint' */

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdlib' */

/* Module declarations from 'libc.math' */

/* Module declarations from 'cgl' */
static PyTypeObject *__pyx_ptype_3cgl_vec2 = 0;
static PyTypeObject *__pyx_ptype_3cgl_vec3 = 0;
static PyTypeObject *__pyx_ptype_3cgl_vec4 = 0;
static PyTypeObject *__pyx_ptype_3cgl_ivec4 = 0;
static PyTypeObject *__pyx_ptype_3cgl_mat4 = 0;
static PyTypeObject *__pyx_ptype_3cgl_transform = 0;
static PyTypeObject *__pyx_ptype_3cgl_matrix = 0;
static PyTypeObject *__pyx_ptype_3cgl_window = 0;
static PyTypeObject *__pyx_ptype_3cgl_image = 0;
static PyTypeObject *__pyx_ptype_3cgl_mesh_vertex = 0;
static PyTypeObject *__pyx_ptype_3cgl_mesh_cpu = 0;
static PyTypeObject *__pyx_ptype_3cgl_texture = 0;
static PyTypeObject *__pyx_ptype_3cgl_framebuffer = 0;
static PyTypeObject *__pyx_ptype_3cgl_mesh_gpu = 0;
static PyTypeObject *__pyx_ptype_3cgl_shader = 0;
static PyTypeObject *__pyx_ptype_3cgl_ssbo = 0;
static PyTypeObject *__pyx_ptype_3cgl_ubo = 0;
static PyTypeObject *__pyx_ptype_3cgl_shape = 0;
static PyTypeObject *__pyx_ptype_3cgl_bloom = 0;
static PyTypeObject *__pyx_ptype_3cgl_tilemap = 0;
static PyTypeObject *__pyx_ptype_3cgl_font_character = 0;
static PyTypeObject *__pyx_ptype_3cgl_font = 0;
static PyTypeObject *__pyx_ptype_3cgl_widgets = 0;
static PyTypeObject *__pyx_ptype_3cgl_noise_params = 0;
static void __pyx_f_3cgl___pass_through_window_close_callback(struct CGL_window *); /*proto*/
static void __pyx_f_3cgl___pass_through_window_key_callback(struct CGL_window *, int, int, int, int); /*proto*/
static void __pyx_f_3cgl___pass_through_window_mouse_button_callback(struct CGL_window *, int, int, int); /*proto*/
static void __pyx_f_3cgl___pass_through_window_mouse_position_callback(struct CGL_window *, double, double); /*proto*/
static void __pyx_f_3cgl___pass_through_window_mouse_scroll_callback(struct CGL_window *, double, double); /*proto*/
static void __pyx_f_3cgl___pass_through_window_framebuffer_size_callback(struct CGL_window *, int, int); /*proto*/
static void __pyx_f_3cgl___pass_through_window_drag_n_drop_callback(struct CGL_window *, char const **, int); /*proto*/
static PyObject *__pyx_f_3cgl___pyx_unpickle_widgets__set_state(struct __pyx_obj_3cgl_widgets *, PyObject *); /*proto*/
static struct CGL_vec2 __pyx_convert__from_py_struct__CGL_vec2(PyObject *); /*proto*/
static struct CGL_font_character __pyx_convert__from_py_struct__CGL_font_character(PyObject *); /*proto*/
static struct CGL_vec3 __pyx_convert__from_py_struct__CGL_vec3(PyObject *); /*proto*/
static struct CGL_vec4 __pyx_convert__from_py_struct__CGL_vec4(PyObject *); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_py_CGL_float(CGL_float *, Py_ssize_t); /*proto*/
static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_CGL_float(CGL_float *, Py_ssize_t); /*proto*/
static struct CGL_ivec4 __pyx_convert__from_py_struct__CGL_ivec4(PyObject *); /*proto*/
static struct CGL_mesh_vertex __pyx_convert__from_py_struct__CGL_mesh_vertex(PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "cgl"
extern int __pyx_module_is_main_cgl;
int __pyx_module_is_main_cgl = 0;

/* Implementation of 'cgl' */
static PyObject *__pyx_builtin_staticmethod;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_AttributeError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_KeyError;
static const char __pyx_k_[] = "#";
static const char __pyx_k_E[] = "E";
static const char __pyx_k_a[] = "a";
static const char __pyx_k_b[] = "b";
static const char __pyx_k_c[] = "c";
static const char __pyx_k_d[] = "d";
static const char __pyx_k_g[] = "g";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_l[] = "l";
static const char __pyx_k_m[] = "m";
static const char __pyx_k_n[] = "n";
static const char __pyx_k_r[] = "r";
static const char __pyx_k_t[] = "t";
static const char __pyx_k_u[] = "u";
static const char __pyx_k_v[] = "v";
static const char __pyx_k_w[] = "w";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_y[] = "y";
static const char __pyx_k_z[] = "z";
static const char __pyx_k_PI[] = "PI";
static const char __pyx_k__2[] = "_";
static const char __pyx_k__3[] = ", ";
static const char __pyx_k__4[] = ")";
static const char __pyx_k_ch[] = "ch";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_nt[] = "nt";
static const char __pyx_k_os[] = "os";
static const char __pyx_k_st[] = "st";
static const char __pyx_k_sx[] = "sx";
static const char __pyx_k_sy[] = "sy";
static const char __pyx_k_t0[] = "t0";
static const char __pyx_k_t1[] = "t1";
static const char __pyx_k_up[] = "up";
static const char __pyx_k_PIL[] = "PIL";
static const char __pyx_k__13[] = "    ";
static const char __pyx_k__14[] = "\n";
static const char __pyx_k__22[] = "    [";
static const char __pyx_k__23[] = "]\n";
static const char __pyx_k_a_x[] = "a_x";
static const char __pyx_k_a_y[] = "a_y";
static const char __pyx_k_b_x[] = "b_x";
static const char __pyx_k_b_y[] = "b_y";
static const char __pyx_k_c_x[] = "c_x";
static const char __pyx_k_c_y[] = "c_y";
static const char __pyx_k_cgl[] = "cgl";
static const char __pyx_k_cls[] = "cls";
static const char __pyx_k_ctx[] = "ctx";
static const char __pyx_k_d_x[] = "d_x";
static const char __pyx_k_d_y[] = "d_y";
static const char __pyx_k_deg[] = "deg";
static const char __pyx_k_dst[] = "dst";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_eye[] = "eye";
static const char __pyx_k_far[] = "far";
static const char __pyx_k_fov[] = "fov";
static const char __pyx_k_mat[] = "mat";
static const char __pyx_k_new[] = "__new__";
static const char __pyx_k_obj[] = "obj";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_ptr[] = "ptr";
static const char __pyx_k_r_a[] = "r_a";
static const char __pyx_k_r_b[] = "r_b";
static const char __pyx_k_r_c[] = "r_c";
static const char __pyx_k_r_d[] = "r_d";
static const char __pyx_k_rad[] = "rad";
static const char __pyx_k_res[] = "res";
static const char __pyx_k_row[] = "row";
static const char __pyx_k_shd[] = "shd";
static const char __pyx_k_src[] = "src";
static const char __pyx_k_tex[] = "tex";
static const char __pyx_k_top[] = "top";
static const char __pyx_k_ubo[] = "ubo(";
static const char __pyx_k_vec[] = "vec";
static const char __pyx_k_wnd[] = "wnd";
static const char __pyx_k_PI_2[] = "PI_2";
static const char __pyx_k_axes[] = "axes";
static const char __pyx_k_axis[] = "axis";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_dict[] = "__dict__";
static const char __pyx_k_face[] = "face";
static const char __pyx_k_font[] = "font";
static const char __pyx_k_free[] = "free";
static const char __pyx_k_gain[] = ", gain=";
static const char __pyx_k_init[] = "init";
static const char __pyx_k_left[] = "left";
static const char __pyx_k_maax[] = "maax";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mat4[] = "mat4";
static const char __pyx_k_mean[] = "mean";
static const char __pyx_k_mesh[] = "mesh";
static const char __pyx_k_mian[] = "mian";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_near[] = "near";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_path[] = "path";
static const char __pyx_k_seed[] = "seed";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_ssbo[] = "ssbo(";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_vec2[] = "vec2(";
static const char __pyx_k_vec3[] = "vec3(";
static const char __pyx_k_vec4[] = "vec4(";
static const char __pyx_k_Image[] = "Image";
static const char __pyx_k_KEY_0[] = "KEY_0";
static const char __pyx_k_KEY_1[] = "KEY_1";
static const char __pyx_k_KEY_2[] = "KEY_2";
static const char __pyx_k_KEY_3[] = "KEY_3";
static const char __pyx_k_KEY_4[] = "KEY_4";
static const char __pyx_k_KEY_5[] = "KEY_5";
static const char __pyx_k_KEY_6[] = "KEY_6";
static const char __pyx_k_KEY_7[] = "KEY_7";
static const char __pyx_k_KEY_8[] = "KEY_8";
static const char __pyx_k_KEY_9[] = "KEY_9";
static const char __pyx_k_KEY_A[] = "KEY_A";
static const char __pyx_k_KEY_B[] = "KEY_B";
static const char __pyx_k_KEY_C[] = "KEY_C";
static const char __pyx_k_KEY_D[] = "KEY_D";
static const char __pyx_k_KEY_E[] = "KEY_E";
static const char __pyx_k_KEY_F[] = "KEY_F";
static const char __pyx_k_KEY_G[] = "KEY_G";
static const char __pyx_k_KEY_H[] = "KEY_H";
static const char __pyx_k_KEY_I[] = "KEY_I";
static const char __pyx_k_KEY_J[] = "KEY_J";
static const char __pyx_k_KEY_K[] = "KEY_K";
static const char __pyx_k_KEY_L[] = "KEY_L";
static const char __pyx_k_KEY_M[] = "KEY_M";
static const char __pyx_k_KEY_N[] = "KEY_N";
static const char __pyx_k_KEY_O[] = "KEY_O";
static const char __pyx_k_KEY_P[] = "KEY_P";
static const char __pyx_k_KEY_Q[] = "KEY_Q";
static const char __pyx_k_KEY_R[] = "KEY_R";
static const char __pyx_k_KEY_S[] = "KEY_S";
static const char __pyx_k_KEY_T[] = "KEY_T";
static const char __pyx_k_KEY_U[] = "KEY_U";
static const char __pyx_k_KEY_V[] = "KEY_V";
static const char __pyx_k_KEY_W[] = "KEY_W";
static const char __pyx_k_KEY_X[] = "KEY_X";
static const char __pyx_k_KEY_Y[] = "KEY_Y";
static const char __pyx_k_KEY_Z[] = "KEY_Z";
static const char __pyx_k_PRESS[] = "PRESS";
static const char __pyx_k_SQRT2[] = "SQRT2";
static const char __pyx_k_SQRT3[] = "SQRT3";
static const char __pyx_k_SQRT5[] = "SQRT5";
static const char __pyx_k_SQRT6[] = "SQRT6";
static const char __pyx_k_SQRT7[] = "SQRT7";
static const char __pyx_k_SQRT8[] = "SQRT8";
static const char __pyx_k_angle[] = "angle";
static const char __pyx_k_array[] = "array";
static const char __pyx_k_begin[] = "begin";
static const char __pyx_k_bloom[] = "bloom(";
static const char __pyx_k_clear[] = "clear";
static const char __pyx_k_color[] = "color";
static const char __pyx_k_depth[] = "depth";
static const char __pyx_k_end_x[] = "end_x";
static const char __pyx_k_end_y[] = "end_y";
static const char __pyx_k_flush[] = "flush";
static const char __pyx_k_front[] = "front";
static const char __pyx_k_image[] = "image(";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_ivec4[] = "ivec4(";
static const char __pyx_k_l_obj[] = "l_obj";
static const char __pyx_k_layer[] = "layer";
static const char __pyx_k_level[] = "level";
static const char __pyx_k_point[] = "point";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_res_u[] = "res_u";
static const char __pyx_k_res_v[] = "res_v";
static const char __pyx_k_right[] = "right";
static const char __pyx_k_scale[] = "scale";
static const char __pyx_k_shape[] = "shape(";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_theta[] = "theta";
static const char __pyx_k_title[] = "title";
static const char __pyx_k_typef[] = "typef";
static const char __pyx_k_u_obj[] = "u_obj";
static const char __pyx_k_ubo_2[] = "ubo";
static const char __pyx_k_utf_8[] = "utf-8";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_width[] = "width";
static const char __pyx_k_KEY_F1[] = "KEY_F1";
static const char __pyx_k_KEY_F2[] = "KEY_F2";
static const char __pyx_k_KEY_F3[] = "KEY_F3";
static const char __pyx_k_KEY_F4[] = "KEY_F4";
static const char __pyx_k_KEY_F5[] = "KEY_F5";
static const char __pyx_k_KEY_F6[] = "KEY_F6";
static const char __pyx_k_KEY_F7[] = "KEY_F7";
static const char __pyx_k_KEY_F8[] = "KEY_F8";
static const char __pyx_k_KEY_F9[] = "KEY_F9";
static const char __pyx_k_KEY_UP[] = "KEY_UP";
static const char __pyx_k_REPEAT[] = "REPEAT";
static const char __pyx_k_Shader[] = "Shader";
static const char __pyx_k_TWO_PI[] = "TWO_PI";
static const char __pyx_k_aspect[] = "aspect";
static const char __pyx_k_bitmap[] = "bitmap";
static const char __pyx_k_bottom[] = "bottom";
static const char __pyx_k_buffer[] = "buffer";
static const char __pyx_k_c_mesh[] = "c_mesh";
static const char __pyx_k_center[] = "center";
static const char __pyx_k_column[] = "column";
static const char __pyx_k_decode[] = "decode";
static const char __pyx_k_encode[] = "encode";
static const char __pyx_k_format[] = "format";
static const char __pyx_k_gain_2[] = "gain";
static const char __pyx_k_get_id[] = "get_id";
static const char __pyx_k_height[] = "height";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_length[] = "length";
static const char __pyx_k_mat4x4[] = "mat4x4(\n";
static const char __pyx_k_matrix[] = "matrix(\n";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_normal[] = "normal";
static const char __pyx_k_offset[] = "offset";
static const char __pyx_k_pickle[] = "pickle";
static const char __pyx_k_points[] = "points";
static const char __pyx_k_prefix[] = "prefix";
static const char __pyx_k_radius[] = "radius";
static const char __pyx_k_random[] = "random";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_shader[] = "shader(";
static const char __pyx_k_size_x[] = "size_x";
static const char __pyx_k_size_y[] = "size_y";
static const char __pyx_k_ssbo_2[] = "ssbo";
static const char __pyx_k_suffix[] = "suffix";
static const char __pyx_k_system[] = "system";
static const char __pyx_k_target[] = "target";
static const char __pyx_k_tile_x[] = "tile_x";
static const char __pyx_k_tile_y[] = "tile_y";
static const char __pyx_k_typing[] = "typing";
static const char __pyx_k_update[] = "update";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_vec2_2[] = "vec2";
static const char __pyx_k_vec3_2[] = "vec3";
static const char __pyx_k_vec4_2[] = "vec4";
static const char __pyx_k_window[] = "window(";
static const char __pyx_k_KEY_END[] = "KEY_END";
static const char __pyx_k_KEY_F10[] = "KEY_F10";
static const char __pyx_k_KEY_F11[] = "KEY_F11";
static const char __pyx_k_KEY_F12[] = "KEY_F12";
static const char __pyx_k_KEY_F13[] = "KEY_F13";
static const char __pyx_k_KEY_F14[] = "KEY_F14";
static const char __pyx_k_KEY_F15[] = "KEY_F15";
static const char __pyx_k_KEY_F16[] = "KEY_F16";
static const char __pyx_k_KEY_F17[] = "KEY_F17";
static const char __pyx_k_KEY_F18[] = "KEY_F18";
static const char __pyx_k_KEY_F19[] = "KEY_F19";
static const char __pyx_k_KEY_F20[] = "KEY_F20";
static const char __pyx_k_KEY_F21[] = "KEY_F21";
static const char __pyx_k_KEY_F22[] = "KEY_F22";
static const char __pyx_k_KEY_F23[] = "KEY_F23";
static const char __pyx_k_KEY_F24[] = "KEY_F24";
static const char __pyx_k_KEY_F25[] = "KEY_F25";
static const char __pyx_k_KEY_TAB[] = "KEY_TAB";
static const char __pyx_k_RELEASE[] = "RELEASE";
static const char __pyx_k_advance[] = "advance";
static const char __pyx_k_bearing[] = "bearing";
static const char __pyx_k_binding[] = "binding";
static const char __pyx_k_bloom_2[] = "bloom";
static const char __pyx_k_destroy[] = "destroy";
static const char __pyx_k_enebled[] = "enebled";
static const char __pyx_k_formatf[] = "formatf";
static const char __pyx_k_gl_init[] = "gl_init";
static const char __pyx_k_image_2[] = "image";
static const char __pyx_k_indices[] = "indices";
static const char __pyx_k_ivec4_2[] = "ivec4";
static const char __pyx_k_octaves[] = ", octaves=";
static const char __pyx_k_padding[] = "padding";
static const char __pyx_k_radius0[] = "radius0";
static const char __pyx_k_radius1[] = "radius1";
static const char __pyx_k_scale_2[] = ", scale=";
static const char __pyx_k_scale_x[] = "scale_x";
static const char __pyx_k_scale_y[] = "scale_y";
static const char __pyx_k_shape_2[] = "shape";
static const char __pyx_k_simplex[] = "simplex";
static const char __pyx_k_start_x[] = "start_x";
static const char __pyx_k_start_y[] = "start_y";
static const char __pyx_k_std_dev[] = "std_dev";
static const char __pyx_k_texture[] = "texture(";
static const char __pyx_k_tilemap[] = "tilemap(";
static const char __pyx_k_tobytes[] = "tobytes";
static const char __pyx_k_uniform[] = "uniform";
static const char __pyx_k_widgets[] = "widgets";
static const char __pyx_k_CGL_TRUE[] = "CGL_TRUE";
static const char __pyx_k_Callable[] = "Callable";
static const char __pyx_k_GPU_Mesh[] = "GPU Mesh";
static const char __pyx_k_KEY_DOWN[] = "KEY_DOWN";
static const char __pyx_k_KEY_HOME[] = "KEY_HOME";
static const char __pyx_k_KEY_KP_0[] = "KEY_KP_0";
static const char __pyx_k_KEY_KP_1[] = "KEY_KP_1";
static const char __pyx_k_KEY_KP_2[] = "KEY_KP_2";
static const char __pyx_k_KEY_KP_3[] = "KEY_KP_3";
static const char __pyx_k_KEY_KP_4[] = "KEY_KP_4";
static const char __pyx_k_KEY_KP_5[] = "KEY_KP_5";
static const char __pyx_k_KEY_KP_6[] = "KEY_KP_6";
static const char __pyx_k_KEY_KP_7[] = "KEY_KP_7";
static const char __pyx_k_KEY_KP_8[] = "KEY_KP_8";
static const char __pyx_k_KEY_KP_9[] = "KEY_KP_9";
static const char __pyx_k_KEY_LEFT[] = "KEY_LEFT";
static const char __pyx_k_KEY_MENU[] = "KEY_MENU";
static const char __pyx_k_KeyError[] = "KeyError";
static const char __pyx_k_aabb_max[] = "aabb_max";
static const char __pyx_k_aabb_min[] = "aabb_min";
static const char __pyx_k_add_line[] = "add_line";
static const char __pyx_k_add_mesh[] = "add_mesh";
static const char __pyx_k_add_oval[] = "add_oval";
static const char __pyx_k_add_quad[] = "add_quad";
static const char __pyx_k_add_rect[] = "add_rect";
static const char __pyx_k_bone_ids[] = "bone_ids";
static const char __pyx_k_c_points[] = "c_points";
static const char __pyx_k_c_vertex[] = "c_vertex";
static const char __pyx_k_channels[] = "channels";
static const char __pyx_k_deepcopy[] = "deepcopy";
static const char __pyx_k_f_radius[] = "f_radius";
static const char __pyx_k_get_size[] = "get_size";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_gl_clear[] = "gl_clear";
static const char __pyx_k_log_info[] = "log_info";
static const char __pyx_k_log_warn[] = "log_warn";
static const char __pyx_k_mat4_det[] = "mat4_det";
static const char __pyx_k_mat4_mul[] = "mat4_mul";
static const char __pyx_k_matrix_2[] = "matrix";
static const char __pyx_k_max_axes[] = "max_axes";
static const char __pyx_k_max_size[] = "max_size";
static const char __pyx_k_mesh_cpu[] = "mesh_cpu(";
static const char __pyx_k_mesh_gpu[] = "mesh_gpu(";
static const char __pyx_k_n_vector[] = "n_vector";
static const char __pyx_k_offset_x[] = "offset_x";
static const char __pyx_k_offset_y[] = "offset_y";
static const char __pyx_k_position[] = "position";
static const char __pyx_k_progress[] = "progress";
static const char __pyx_k_pyx_type[] = "__pyx_type";
static const char __pyx_k_radius_x[] = "radius_x";
static const char __pyx_k_radius_y[] = "radius_y";
static const char __pyx_k_rotation[] = "rotation";
static const char __pyx_k_segments[] = "segments";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_shader_2[] = "shader";
static const char __pyx_k_shutdown[] = "shutdown";
static const char __pyx_k_vertices[] = "vertices";
static const char __pyx_k_window_2[] = "window";
static const char __pyx_k_CGL_FALSE[] = "CGL_FALSE";
static const char __pyx_k_KEY_COMMA[] = "KEY_COMMA";
static const char __pyx_k_KEY_ENTER[] = "KEY_ENTER";
static const char __pyx_k_KEY_EQUAL[] = "KEY_EQUAL";
static const char __pyx_k_KEY_MINUS[] = "KEY_MINUS";
static const char __pyx_k_KEY_PAUSE[] = "KEY_PAUSE";
static const char __pyx_k_KEY_RIGHT[] = "KEY_RIGHT";
static const char __pyx_k_KEY_SLASH[] = "KEY_SLASH";
static const char __pyx_k_KEY_SPACE[] = "KEY_SPACE";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_add_arc2f[] = "add_arc2f";
static const char __pyx_k_begin_int[] = "begin_int";
static const char __pyx_k_c_indices[] = "c_indices";
static const char __pyx_k_c_texture[] = "c_texture";
static const char __pyx_k_control_1[] = "control_1";
static const char __pyx_k_control_2[] = "control_2";
static const char __pyx_k_decorated[] = "decorated";
static const char __pyx_k_end_angle[] = "end_angle";
static const char __pyx_k_file_font[] = "file_font";
static const char __pyx_k_font_size[] = "font_size";
static const char __pyx_k_frequency[] = ", frequency=";
static const char __pyx_k_is_square[] = "is_square";
static const char __pyx_k_light_pos[] = "light_pos";
static const char __pyx_k_log_error[] = "log_error";
static const char __pyx_k_log_trace[] = "log_trace";
static const char __pyx_k_mat4_lerp[] = "mat4_lerp";
static const char __pyx_k_mat4_rank[] = "mat4_rank";
static const char __pyx_k_mat4_zero[] = "mat4_zero";
static const char __pyx_k_noise_get[] = "noise_get";
static const char __pyx_k_octaves_2[] = "octaves";
static const char __pyx_k_pyx_state[] = "__pyx_state";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_ssbo_copy[] = "ssbo_copy";
static const char __pyx_k_text_init[] = "text_init";
static const char __pyx_k_texture_2[] = "texture";
static const char __pyx_k_tilemap_2[] = "tilemap";
static const char __pyx_k_transform[] = "transform";
static const char __pyx_k_CGL_Window[] = "CGL Window";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_KEY_DELETE[] = "KEY_DELETE";
static const char __pyx_k_KEY_ESCAPE[] = "KEY_ESCAPE";
static const char __pyx_k_KEY_INSERT[] = "KEY_INSERT";
static const char __pyx_k_KEY_KP_ADD[] = "KEY_KP_ADD";
static const char __pyx_k_KEY_PERIOD[] = "KEY_PERIOD";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_aabb_max_a[] = "aabb_max_a";
static const char __pyx_k_aabb_max_b[] = "aabb_max_b";
static const char __pyx_k_aabb_min_a[] = "aabb_min_a";
static const char __pyx_k_aabb_min_b[] = "aabb_min_b";
static const char __pyx_k_add_circle[] = "add_circle";
static const char __pyx_k_add_line2f[] = "add_line2f";
static const char __pyx_k_add_oval2f[] = "add_oval2f";
static const char __pyx_k_add_rect2f[] = "add_rect2f";
static const char __pyx_k_add_string[] = "add_string";
static const char __pyx_k_add_vertex[] = "add_vertex";
static const char __pyx_k_axes_count[] = "axes_count";
static const char __pyx_k_c_vertices[] = "c_vertices";
static const char __pyx_k_deg_to_rad[] = "deg_to_rad";
static const char __pyx_k_dst_offset[] = "dst_offset";
static const char __pyx_k_float_lerp[] = "float_lerp";
static const char __pyx_k_gjk_epa_2d[] = "gjk_epa_2d";
static const char __pyx_k_iterations[] = "iterations";
static const char __pyx_k_lacunarity[] = ", lacunarity=";
static const char __pyx_k_log_format[] = "log_format";
static const char __pyx_k_logger_log[] = "logger_log";
static const char __pyx_k_mat4_scale[] = "mat4_scale";
static const char __pyx_k_mat4_trace[] = "mat4_trace";
static const char __pyx_k_mesh_cpu_2[] = "mesh_cpu";
static const char __pyx_k_mesh_gpu_2[] = "mesh_gpu";
static const char __pyx_k_noise_init[] = "noise_init";
static const char __pyx_k_not_loaded[] = "not_loaded";
static const char __pyx_k_position_x[] = "position_x";
static const char __pyx_k_position_y[] = "position_y";
static const char __pyx_k_printf_red[] = "printf_red";
static const char __pyx_k_pyx_result[] = "__pyx_result";
static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static const char __pyx_k_rad_to_deg[] = "rad_to_deg";
static const char __pyx_k_resolution[] = "resolution";
static const char __pyx_k_rotation_2[] = ", rotation=";
static const char __pyx_k_src_offset[] = "src_offset";
static const char __pyx_k_utils_relu[] = "utils_relu";
static const char __pyx_k_utils_step[] = "utils_step";
static const char __pyx_k_utils_tanh[] = "utils_tanh";
static const char __pyx_k_KEY_PAGE_UP[] = "KEY_PAGE_UP";
static const char __pyx_k_KEY_UNKNOWN[] = "KEY_UNKNOWN";
static const char __pyx_k_KEY_WORLD_1[] = "KEY_WORLD_1";
static const char __pyx_k_KEY_WORLD_2[] = "KEY_WORLD_2";
static const char __pyx_k_MemoryError[] = "MemoryError";
static const char __pyx_k_PickleError[] = "PickleError";
static const char __pyx_k_add_circler[] = "add_circler";
static const char __pyx_k_add_quad_8f[] = "add_quad_8f";
static const char __pyx_k_control_1_x[] = "control_1_x";
static const char __pyx_k_control_1_y[] = "control_1_y";
static const char __pyx_k_control_2_x[] = "control_2_x";
static const char __pyx_k_control_2_y[] = "control_2_y";
static const char __pyx_k_framebuffer[] = "framebuffer(";
static const char __pyx_k_frequency_2[] = "frequency";
static const char __pyx_k_gl_shutdown[] = "gl_shutdown";
static const char __pyx_k_index_count[] = "index_count";
static const char __pyx_k_light_color[] = "light_color";
static const char __pyx_k_load_object[] = "load_object";
static const char __pyx_k_logger_init[] = "logger_init";
static const char __pyx_k_max_indices[] = "max_indices";
static const char __pyx_k_memory_font[] = "memory_font";
static const char __pyx_k_mesh_vertex[] = "mesh_vertex(";
static const char __pyx_k_noise_value[] = "noise_value";
static const char __pyx_k_printf_blue[] = "printf_blue";
static const char __pyx_k_printf_gray[] = "printf_gray";
static const char __pyx_k_set_texture[] = "set_texture";
static const char __pyx_k_simplex_out[] = "simplex_out";
static const char __pyx_k_simplex_ptr[] = "simplex_ptr";
static const char __pyx_k_start_angle[] = "start_angle";
static const char __pyx_k_static_draw[] = "static_draw";
static const char __pyx_k_texture_dst[] = "texture_dst";
static const char __pyx_k_texture_src[] = "texture_src";
static const char __pyx_k_tile_size_x[] = "tile_size_x";
static const char __pyx_k_tile_size_y[] = "tile_size_y";
static const char __pyx_k_utils_crc32[] = "utils_crc32";
static const char __pyx_k_utils_crc64[] = "utils_crc64";
static const char __pyx_k_utils_rot13[] = "utils_rot13";
static const char __pyx_k_utils_sleep[] = "utils_sleep";
static const char __pyx_k_KEY_KP_ENTER[] = "KEY_KP_ENTER";
static const char __pyx_k_KEY_KP_EQUAL[] = "KEY_KP_EQUAL";
static const char __pyx_k_KEY_LEFT_ALT[] = "KEY_LEFT_ALT";
static const char __pyx_k_KEY_NUM_LOCK[] = "KEY_NUM_LOCK";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_WINDOW_TABLE[] = "__WINDOW_TABLE";
static const char __pyx_k_add_circle2f[] = "add_circle2f";
static const char __pyx_k_add_triangle[] = "add_triangle";
static const char __pyx_k_add_vertex_p[] = "add_vertex_p";
static const char __pyx_k_bone_wieghts[] = "bone_wieghts";
static const char __pyx_k_calc_inverse[] = "calc_inverse";
static const char __pyx_k_fractal_type[] = ", fractal_type=";
static const char __pyx_k_get_position[] = "get_position";
static const char __pyx_k_key_callback[] = "key_callback";
static const char __pyx_k_lacunarity_2[] = "lacunarity";
static const char __pyx_k_log_internal[] = "log_internal";
static const char __pyx_k_logger_flush[] = "logger_flush";
static const char __pyx_k_mat4_adjoint[] = "mat4_adjoint";
static const char __pyx_k_mat4_inverse[] = "mat4_inverse";
static const char __pyx_k_mat4_look_at[] = "mat4_look_at";
static const char __pyx_k_max_vertices[] = "max_vertices";
static const char __pyx_k_milliseconds[] = "milliseconds";
static const char __pyx_k_noise_params[] = "noise_params";
static const char __pyx_k_noise_perlin[] = "noise_perlin";
static const char __pyx_k_noise_worley[] = "noise_worley";
static const char __pyx_k_printf_green[] = "printf_green";
static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
static const char __pyx_k_ssbo_binding[] = "ssbo_binding";
static const char __pyx_k_staticmethod[] = "staticmethod";
static const char __pyx_k_stringsource[] = "stringsource";
static const char __pyx_k_tile_count_x[] = "tile_count_x";
static const char __pyx_k_tile_count_y[] = "tile_count_y";
static const char __pyx_k_utils_rand31[] = "utils_rand31";
static const char __pyx_k_vec3_reflect[] = "vec3_reflect";
static const char __pyx_k_vertex_count[] = "vertex_count";
static const char __pyx_k_KEY_BACKSLASH[] = "KEY_BACKSLASH";
static const char __pyx_k_KEY_BACKSPACE[] = "KEY_BACKSPACE";
static const char __pyx_k_KEY_CAPS_LOCK[] = "KEY_CAPS_LOCK";
static const char __pyx_k_KEY_KP_DIVIDE[] = "KEY_KP_DIVIDE";
static const char __pyx_k_KEY_PAGE_DOWN[] = "KEY_PAGE_DOWN";
static const char __pyx_k_KEY_RIGHT_ALT[] = "KEY_RIGHT_ALT";
static const char __pyx_k_KEY_SEMICOLON[] = "KEY_SEMICOLON";
static const char __pyx_k_add_character[] = "add_character";
static const char __pyx_k_add_vertex_pt[] = "add_vertex_pt";
static const char __pyx_k_c_framebuffer[] = "c_framebuffer";
static const char __pyx_k_c_num_indices[] = "c_num_indices";
static const char __pyx_k_calc_adjugate[] = "calc_adjugate";
static const char __pyx_k_circle_radius[] = "circle_radius";
static const char __pyx_k_clear_console[] = "clear_console";
static const char __pyx_k_complete_char[] = "complete_char";
static const char __pyx_k_framebuffer_2[] = "framebuffer";
static const char __pyx_k_function_name[] = "function_name";
static const char __pyx_k_mat4_identity[] = "mat4_identity";
static const char __pyx_k_mat4_mul_vec4[] = "mat4_mul_vec4";
static const char __pyx_k_mat4_rotate_x[] = "mat4_rotate_x";
static const char __pyx_k_mat4_rotate_y[] = "mat4_rotate_y";
static const char __pyx_k_mat4_rotate_z[] = "mat4_rotate_z";
static const char __pyx_k_mesh_cpu_cube[] = "mesh_cpu_cube";
static const char __pyx_k_mesh_cpu_quad[] = "mesh_cpu_quad";
static const char __pyx_k_mesh_vertex_2[] = "mesh_vertex";
static const char __pyx_k_probabilities[] = "probabilities";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_set_fill_mode[] = "set_fill_mode";
static const char __pyx_k_text_shutdown[] = "text_shutdown";
static const char __pyx_k_texture_index[] = "texture_index";
static const char __pyx_k_texture_x_max[] = "texture_x_max";
static const char __pyx_k_texture_x_min[] = "texture_x_min";
static const char __pyx_k_texture_y_max[] = "texture_y_max";
static const char __pyx_k_texture_y_min[] = "texture_y_min";
static const char __pyx_k_utils_sigmoid[] = "utils_sigmoid";
static const char __pyx_k_utils_srand31[] = "utils_srand31";
static const char __pyx_k_AttributeError[] = "AttributeError";
static const char __pyx_k_KEY_APOSTROPHE[] = "KEY_APOSTROPHE";
static const char __pyx_k_KEY_KP_DECIMAL[] = "KEY_KP_DECIMAL";
static const char __pyx_k_KEY_LEFT_SHIFT[] = "KEY_LEFT_SHIFT";
static const char __pyx_k_KEY_LEFT_SUPER[] = "KEY_LEFT_SUPER";
static const char __pyx_k_LOG_LEVEL_INFO[] = "LOG_LEVEL_INFO";
static const char __pyx_k_LOG_LEVEL_WARN[] = "LOG_LEVEL_WARN";
static const char __pyx_k_MOUSE_BUTTON_1[] = "MOUSE_BUTTON_1";
static const char __pyx_k_MOUSE_BUTTON_2[] = "MOUSE_BUTTON_2";
static const char __pyx_k_MOUSE_BUTTON_3[] = "MOUSE_BUTTON_3";
static const char __pyx_k_MOUSE_BUTTON_4[] = "MOUSE_BUTTON_4";
static const char __pyx_k_MOUSE_BUTTON_5[] = "MOUSE_BUTTON_5";
static const char __pyx_k_MOUSE_BUTTON_6[] = "MOUSE_BUTTON_6";
static const char __pyx_k_MOUSE_BUTTON_7[] = "MOUSE_BUTTON_7";
static const char __pyx_k_MOUSE_BUTTON_8[] = "MOUSE_BUTTON_8";
static const char __pyx_k_add_circler2fr[] = "add_circler2fr";
static const char __pyx_k_add_vertex_p3f[] = "add_vertex_p3f";
static const char __pyx_k_calc_transpose[] = "calc_transpose";
static const char __pyx_k_close_callback[] = "close_callback";
static const char __pyx_k_create_context[] = "create_context";
static const char __pyx_k_font_character[] = "font_character(";
static const char __pyx_k_fractal_type_2[] = "fractal_type";
static const char __pyx_k_length_squared[] = "length_squared";
static const char __pyx_k_mat4_det_by_lu[] = "mat4_det_by_lu";
static const char __pyx_k_mat4_translate[] = "mat4_translate";
static const char __pyx_k_mat4_transpose[] = "mat4_transpose";
static const char __pyx_k_mesh_cpu_plane[] = "mesh_cpu_plane";
static const char __pyx_k_noise_shutdown[] = "noise_shutdown";
static const char __pyx_k_overlap_amount[] = "overlap_amount";
static const char __pyx_k_set_fill_color[] = "set_fill_color";
static const char __pyx_k_utils_get_time[] = "utils_get_time";
static const char __pyx_k_utils_xorshf96[] = "utils_xorshf96";
static const char __pyx_k_vertices_count[] = "vertices_count";
static const char __pyx_k_KEY_KP_MULTIPLY[] = "KEY_KP_MULTIPLY";
static const char __pyx_k_KEY_KP_SUBTRACT[] = "KEY_KP_SUBTRACT";
static const char __pyx_k_KEY_RIGHT_SHIFT[] = "KEY_RIGHT_SHIFT";
static const char __pyx_k_KEY_RIGHT_SUPER[] = "KEY_RIGHT_SUPER";
static const char __pyx_k_KEY_SCROLL_LOCK[] = "KEY_SCROLL_LOCK";
static const char __pyx_k_LOG_LEVEL_ERROR[] = "LOG_LEVEL_ERROR";
static const char __pyx_k_LOG_LEVEL_TRACE[] = "LOG_LEVEL_TRACE";
static const char __pyx_k_add_vertex_p3ft[] = "add_vertex_p3ft";
static const char __pyx_k_add_vertex_pt2f[] = "add_vertex_pt2f";
static const char __pyx_k_c_probabilities[] = "c_probabilities";
static const char __pyx_k_cgl_wrapper_pyx[] = "cgl_wrapper.pyx";
static const char __pyx_k_destroy_context[] = "destroy_context";
static const char __pyx_k_get_auto_upload[] = "get_auto_upload";
static const char __pyx_k_incomplete_char[] = "incomplete_char";
static const char __pyx_k_internal_format[] = "internal_format";
static const char __pyx_k_logger_shutdown[] = "logger_shutdown";
static const char __pyx_k_mat4_gauss_elim[] = "mat4_gauss_elim";
static const char __pyx_k_mesh_cpu_create[] = "mesh_cpu_create";
static const char __pyx_k_mesh_cpu_sphere[] = "mesh_cpu_sphere";
static const char __pyx_k_normalized_size[] = "normalized_size";
static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
static const char __pyx_k_random_gaussian[] = "random_gaussian";
static const char __pyx_k_set_auto_upload[] = "set_auto_upload";
static const char __pyx_k_set_fill_colorf[] = "set_fill_colorf";
static const char __pyx_k_set_view_matrix[] = "set_view_matrix";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_simplex_out_ptr[] = "simplex_out_ptr";
static const char __pyx_k_utils_fast_rand[] = "utils_fast_rand";
static const char __pyx_k_utils_read_file[] = "utils_read_file";
static const char __pyx_k_KEY_GRAVE_ACCENT[] = "KEY_GRAVE_ACCENT";
static const char __pyx_k_KEY_LEFT_BRACKET[] = "KEY_LEFT_BRACKET";
static const char __pyx_k_KEY_LEFT_CONTROL[] = "KEY_LEFT_CONTROL";
static const char __pyx_k_KEY_PRINT_SCREEN[] = "KEY_PRINT_SCREEN";
static const char __pyx_k_NOISE_TYPE_COUNT[] = "NOISE_TYPE_COUNT";
static const char __pyx_k_NOISE_TYPE_VALUE[] = "NOISE_TYPE_VALUE";
static const char __pyx_k_add_cubic_bazier[] = "add_cubic_bazier";
static const char __pyx_k_c_font_character[] = "c_font_character";
static const char __pyx_k_float_cubic_lerp[] = "float_cubic_lerp";
static const char __pyx_k_font_character_2[] = "font_character";
static const char __pyx_k_index_count_used[] = "index_count_used";
static const char __pyx_k_mat4_perspective[] = "mat4_perspective";
static const char __pyx_k_noise_valuecubic[] = "noise_valuecubic";
static const char __pyx_k_set_font_texture[] = "set_font_texture";
static const char __pyx_k_set_model_matrix[] = "set_model_matrix";
static const char __pyx_k_set_stroke_color[] = "set_stroke_color";
static const char __pyx_k_texture_creae_3d[] = "texture_creae_3d";
static const char __pyx_k_utils_fast_srand[] = "utils_fast_srand";
static const char __pyx_k_utils_relu_leaky[] = "utils_relu_leaky";
static const char __pyx_k_utils_write_file[] = "utils_write_file";
static const char __pyx_k_CONSOLE_COLOR_RED[] = "CONSOLE_COLOR_RED";
static const char __pyx_k_KEY_RIGHT_BRACKET[] = "KEY_RIGHT_BRACKET";
static const char __pyx_k_KEY_RIGHT_CONTROL[] = "KEY_RIGHT_CONTROL";
static const char __pyx_k_MOUSE_BUTTON_LAST[] = "MOUSE_BUTTON_LAST";
static const char __pyx_k_MOUSE_BUTTON_LEFT[] = "MOUSE_BUTTON_LEFT";
static const char __pyx_k_NOISE_TYPE_PERLIN[] = "NOISE_TYPE_PERLIN";
static const char __pyx_k_NOISE_TYPE_WORLEY[] = "NOISE_TYPE_WORLEY";
static const char __pyx_k_add_vertex_p3ft2f[] = "add_vertex_p3ft2f";
static const char __pyx_k_console_set_color[] = "console_set_color";
static const char __pyx_k_flush_if_required[] = "flush_if_required";
static const char __pyx_k_mat4_decompose_lu[] = "mat4_decompose_lu";
static const char __pyx_k_mat4_det_by_gauss[] = "mat4_det_by_gauss";
static const char __pyx_k_mat4_orthographic[] = "mat4_orthographic";
static const char __pyx_k_mesh_cpu_cylinder[] = "mesh_cpu_cylinder";
static const char __pyx_k_mesh_cpu_load_obj[] = "mesh_cpu_load_obj";
static const char __pyx_k_mesh_cpu_triangle[] = "mesh_cpu_triangle";
static const char __pyx_k_noise_opensimplex[] = "noise_opensimplex";
static const char __pyx_k_noise_params_type[] = "noise_params(type=";
static const char __pyx_k_normalized_offset[] = "normalized_offset";
static const char __pyx_k_set_stroke_colorf[] = "set_stroke_colorf";
static const char __pyx_k_use_3d_tex_coords[] = "use_3d_tex_coords";
static const char __pyx_k_utils_append_file[] = "utils_append_file";
static const char __pyx_k_utils_relu_smooth[] = "utils_relu_smooth";
static const char __pyx_k_vertex_count_used[] = "vertex_count_used";
static const char __pyx_k_weighted_strength[] = ", weighted_strength=";
static const char __pyx_k_CONSOLE_COLOR_BLUE[] = "CONSOLE_COLOR_BLUE";
static const char __pyx_k_CONSOLE_COLOR_GRAY[] = "CONSOLE_COLOR_GRAY";
static const char __pyx_k_CUBEMAP_NEGATIVE_X[] = "CUBEMAP_NEGATIVE_X";
static const char __pyx_k_CUBEMAP_NEGATIVE_Y[] = "CUBEMAP_NEGATIVE_Y";
static const char __pyx_k_CUBEMAP_NEGATIVE_Z[] = "CUBEMAP_NEGATIVE_Z";
static const char __pyx_k_CUBEMAP_POSITIVE_X[] = "CUBEMAP_POSITIVE_X";
static const char __pyx_k_CUBEMAP_POSITIVE_Y[] = "CUBEMAP_POSITIVE_Y";
static const char __pyx_k_CUBEMAP_POSITIVE_Z[] = "CUBEMAP_POSITIVE_Z";
static const char __pyx_k_LOG_LEVEL_INTERNAL[] = "LOG_LEVEL_INTERNAL";
static const char __pyx_k_MOUSE_BUTTON_RIGHT[] = "MOUSE_BUTTON_RIGHT";
static const char __pyx_k_add_cubic_bazier2f[] = "add_cubic_bazier2f";
static const char __pyx_k_add_cubic_bazier2v[] = "add_cubic_bazier2v";
static const char __pyx_k_add_shape_out_line[] = "add_shape_out_line";
static const char __pyx_k_advance_normalized[] = "advance_normalized";
static const char __pyx_k_bearing_normalized[] = "bearing_normalized";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_framebuffer_create[] = "framebuffer_create";
static const char __pyx_k_is_point_in_circle[] = "is_point_in_circle";
static const char __pyx_k_ping_pong_strength[] = ", ping_pong_strength=";
static const char __pyx_k_transform_position[] = "transform(position=";
static const char __pyx_k_vertex_shader_path[] = "vertex_shader_path";
static const char __pyx_k_CONSOLE_COLOR_GREEN[] = "CONSOLE_COLOR_GREEN";
static const char __pyx_k_CONSOLE_COLOR_RESET[] = "CONSOLE_COLOR_RESET";
static const char __pyx_k_MOUSE_BUTTON_MIDDLE[] = "MOUSE_BUTTON_MIDDLE";
static const char __pyx_k_aabb_contains_point[] = "aabb_contains_point";
static const char __pyx_k_get_current_context[] = "get_current_context";
static const char __pyx_k_get_internal_handle[] = "get_internal_handle";
static const char __pyx_k_gjk_default_support[] = "gjk_default_support";
static const char __pyx_k_noise_opensimplex2s[] = "noise_opensimplex2s";
static const char __pyx_k_set_current_context[] = "set_current_context";
static const char __pyx_k_texture_coordinates[] = "texture_coordinates";
static const char __pyx_k_utils_get_file_size[] = "utils_get_file_size";
static const char __pyx_k_utils_get_timestamp[] = "utils_get_timestamp";
static const char __pyx_k_utils_is_big_endian[] = "utils_is_big_endian";
static const char __pyx_k_utils_reverse_bytes[] = "utils_reverse_bytes";
static const char __pyx_k_vec2_triple_product[] = "vec2_triple_product";
static const char __pyx_k_vec3_triple_product[] = "vec3_triple_product";
static const char __pyx_k_vec4_triple_product[] = "vec4_triple_product";
static const char __pyx_k_weighted_strength_2[] = "weighted_strength";
static const char __pyx_k_LOGGER_MAX_LOG_FILES[] = "LOGGER_MAX_LOG_FILES";
static const char __pyx_k_aabb_intersects_aabb[] = "aabb_intersects_aabb";
static const char __pyx_k_add_string_with_font[] = "add_string_with_font";
static const char __pyx_k_console_progress_bar[] = "console_progress_bar";
static const char __pyx_k_drag_n_drop_callback[] = "drag_n_drop_callback";
static const char __pyx_k_float_quadratic_lerp[] = "float_quadratic_lerp";
static const char __pyx_k_fragment_shader_path[] = "fragment_shader_path";
static const char __pyx_k_get_uniform_location[] = "get_uniform_location";
static const char __pyx_k_is_point_in_triangle[] = "is_point_in_triangle";
static const char __pyx_k_ping_pong_strength_2[] = "ping_pong_strength";
static const char __pyx_k_pyx_unpickle_widgets[] = "__pyx_unpickle_widgets";
static const char __pyx_k_sat_collision_detect[] = "sat_collision_detect";
static const char __pyx_k_set_stroke_thickness[] = "set_stroke_thickness";
static const char __pyx_k_texture_create_array[] = "texture_create_array";
static const char __pyx_k_texture_create_blank[] = "texture_create_blank";
static const char __pyx_k_vertex_shader_source[] = "vertex_shader_source";
static const char __pyx_k_Failed_to_create_mesh[] = "Failed to create mesh";
static const char __pyx_k_Matrix_must_be_square[] = "Matrix must be square";
static const char __pyx_k_NOISE_TYPE_VALUECUBIC[] = "NOISE_TYPE_VALUECUBIC";
static const char __pyx_k_gl_render_screen_quad[] = "gl_render_screen_quad";
static const char __pyx_k_mouse_button_callback[] = "mouse_button_callback";
static const char __pyx_k_mouse_scroll_callback[] = "mouse_scroll_callback";
static const char __pyx_k_set_projection_matrix[] = "set_projection_matrix";
static const char __pyx_k_utils_relu_derivative[] = "utils_relu_derivative";
static const char __pyx_k_utils_step_derivative[] = "utils_step_derivative";
static const char __pyx_k_utils_super_fast_hash[] = "utils_super_fast_hash";
static const char __pyx_k_utils_tanh_derivative[] = "utils_tanh_derivative";
static const char __pyx_k_LOGGER_LOG_BUFFER_SIZE[] = "LOGGER_LOG_BUFFER_SIZE";
static const char __pyx_k_NOISE_FRACTAL_TYPE_FBM[] = "NOISE_FRACTAL_TYPE_FBM";
static const char __pyx_k_NOISE_TYPE_OPENSIMPLEX[] = "NOISE_TYPE_OPENSIMPLEX";
static const char __pyx_k_calculate_bounding_box[] = "calculate_bounding_box";
static const char __pyx_k_calculate_circumcircle[] = "calculate_circumcircle";
static const char __pyx_k_enable_console_logging[] = "enable_console_logging";
static const char __pyx_k_enable_diffuse_shading[] = "enable_diffuse_shading";
static const char __pyx_k_fragment_shader_source[] = "fragment_shader_source";
static const char __pyx_k_gjk_check_collision_2d[] = "gjk_check_collision_2d";
static const char __pyx_k_logger_attach_log_file[] = "logger_attach_log_file";
static const char __pyx_k_logger_detach_log_file[] = "logger_detach_log_file";
static const char __pyx_k_mat4_rotate_about_axis[] = "mat4_rotate_about_axis";
static const char __pyx_k_texture_create_cubemap[] = "texture_create_cubemap";
static const char __pyx_k_utils_is_little_endian[] = "utils_is_little_endian";
static const char __pyx_k_vec3_rotate_about_axis[] = "vec3_rotate_about_axis";
static const char __pyx_k_Failed_to_create_shader[] = "Failed to create shader";
static const char __pyx_k_Failed_to_create_window[] = "Failed to create window";
static const char __pyx_k_NOISE_FRACTAL_TYPE_NONE[] = "NOISE_FRACTAL_TYPE_NONE";
static const char __pyx_k_add_cubic_bazier_points[] = "add_cubic_bazier_points";
static const char __pyx_k_disable_diffuse_shading[] = "disable_diffuse_shading";
static const char __pyx_k_mouse_position_callback[] = "mouse_position_callback";
static const char __pyx_k_use_texture_coordinates[] = "use_texture_coordinates";
static const char __pyx_k_NOISE_FRACTAL_TYPE_COUNT[] = "NOISE_FRACTAL_TYPE_COUNT";
static const char __pyx_k_NOISE_FRACTAL_TYPE_RIGID[] = "NOISE_FRACTAL_TYPE_RIGID";
static const char __pyx_k_NOISE_TYPE_OPENSIMPLEX2S[] = "NOISE_TYPE_OPENSIMPLEX2S";
static const char __pyx_k_calculate_super_triangle[] = "calculate_super_triangle";
static const char __pyx_k_framebuffer_create_basic[] = "framebuffer_create_basic";
static const char __pyx_k_utils_sigmoid_derivative[] = "utils_sigmoid_derivative";
static const char __pyx_k_NOISE_FRACTAL_TYPE_BILLOW[] = "NOISE_FRACTAL_TYPE_BILLOW";
static const char __pyx_k_add_cubic_bazier_points2f[] = "add_cubic_bazier_points2f";
static const char __pyx_k_add_cubic_bazier_points2v[] = "add_cubic_bazier_points2v";
static const char __pyx_k_calculate_bounding_square[] = "calculate_bounding_square";
static const char __pyx_k_framebuffer_size_callback[] = "framebuffer_size_callback";
static const char __pyx_k_gjk_shape_default_support[] = "gjk_shape_default_support";
static const char __pyx_k_set_texture_coordinate_so[] = "set_texture_coordinate_so";
static const char __pyx_k_texture_create_from_image[] = "texture_create_from_image";
static const char __pyx_k_widgets_is_a_static_class[] = "widgets is a static class";
static const char __pyx_k_BLOOM_SHADER_MODE_UPSAMPLE[] = "BLOOM_SHADER_MODE_UPSAMPLE";
static const char __pyx_k_Failed_to_create_cube_mesh[] = "Failed to create cube mesh";
static const char __pyx_k_Failed_to_create_quad_mesh[] = "Failed to create quad mesh";
static const char __pyx_k_BLOOM_SHADER_MODE_COMPOSITE[] = "BLOOM_SHADER_MODE_COMPOSITE";
static const char __pyx_k_BLOOM_SHADER_MODE_PREFILTER[] = "BLOOM_SHADER_MODE_PREFILTER";
static const char __pyx_k_Failed_to_create_3d_texture[] = "Failed to create 3d texture";
static const char __pyx_k_Failed_to_create_plane_mesh[] = "Failed to create plane mesh";
static const char __pyx_k_Failed_to_get_color_texture[] = "Failed to get color texture";
static const char __pyx_k_Failed_to_get_depth_texture[] = "Failed to get depth texture";
static const char __pyx_k_NOISE_FRACTAL_TYPE_PINGPONG[] = "NOISE_FRACTAL_TYPE_PINGPONG";
static const char __pyx_k_utils_big_endian_to_current[] = "utils_big_endian_to_current";
static const char __pyx_k_utils_relu_leaky_derivative[] = "utils_relu_leaky_derivative";
static const char __pyx_k_BLOOM_SHADER_MODE_DOWNSAMPLE[] = "BLOOM_SHADER_MODE_DOWNSAMPLE";
static const char __pyx_k_Failed_to_create_framebuffer[] = "Failed to create framebuffer";
static const char __pyx_k_Failed_to_create_sphere_mesh[] = "Failed to create sphere mesh";
static const char __pyx_k_apply_transformations_on_cpu[] = "apply_transformations_on_cpu";
static const char __pyx_k_apply_transformations_on_gpu[] = "apply_transformations_on_gpu";
static const char __pyx_k_sat_collision_calculate_axes[] = "sat_collision_calculate_axes";
static const char __pyx_k_sat_collison_overlap_on_axis[] = "sat_collison_overlap_on_axis";
static const char __pyx_k_utils_relu_smooth_derivative[] = "utils_relu_smooth_derivative";
static const char __pyx_k_logger_enable_console_logging[] = "logger_enable_console_logging";
static const char __pyx_k_Failed_to_create_blank_texture[] = "Failed to create blank texture";
static const char __pyx_k_Failed_to_create_cylinder_mesh[] = "Failed to create cylinder mesh";
static const char __pyx_k_Failed_to_create_texture_array[] = "Failed to create texture array";
static const char __pyx_k_Failed_to_create_triangle_mesh[] = "Failed to create triangle mesh";
static const char __pyx_k_Failed_to_get_color_attachment[] = "Failed to get color attachment";
static const char __pyx_k_logger_disable_console_logging[] = "logger_disable_console_logging";
static const char __pyx_k_triangulate_points_incremental[] = "triangulate_points_incremental";
static const char __pyx_k_utils_little_endian_to_current[] = "utils_little_endian_to_current";
static const char __pyx_k_Matrix_index_must_be_a_tuple_of[] = "Matrix index must be a tuple of 2 integers";
static const char __pyx_k_Pickling_of_struct_members_such[] = "Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)";
static const char __pyx_k_framebuffer_create_from_default[] = "framebuffer_create_from_default";
static const char __pyx_k_self_c_font_cannot_be_converted[] = "self.c_font cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_mesh_cannot_be_converted[] = "self.c_mesh cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_ssbo_cannot_be_converted[] = "self.c_ssbo cannot be converted to a Python object for pickling";
static const char __pyx_k_Failed_to_create_basic_framebuff[] = "Failed to create basic framebuffer";
static const char __pyx_k_Failed_to_create_cubemap_texture[] = "Failed to create cubemap texture";
static const char __pyx_k_Failed_to_create_framebuffer_fro[] = "Failed to create framebuffer from default";
static const char __pyx_k_Failed_to_create_texture_from_im[] = "Failed to create texture from image";
static const char __pyx_k_Failed_to_load_mesh_from_obj_fil[] = "Failed to load mesh from obj file";
static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())";
static const char __pyx_k_Matrices_must_have_the_same_size[] = "Matrices must have the same size";
static const char __pyx_k_No_value_specified_for_struct_at[] = "No value specified for struct attribute 'x'";
static const char __pyx_k_Submatrix_must_be_inside_the_mat[] = "Submatrix must be inside the matrix";
static const char __pyx_k_The_number_of_indices_is_greater[] = "The number of indices is greater than the maximum number of indices";
static const char __pyx_k_Values_must_have_the_same_size_a[] = "Values must have the same size as the matrix";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_self_c_bloom_cannot_be_converted[] = "self.c_bloom cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_framebuffer_cannot_be_con[] = "self.c_framebuffer cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_image_cannot_be_converted[] = "self.c_image cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_matrix_cannot_be_converte[] = "self.c_matrix cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_shader_cannot_be_converte[] = "self.c_shader cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_shape_cannot_be_converted[] = "self.c_shape cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_texture_cannot_be_convert[] = "self.c_texture cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_tilemap_cannot_be_convert[] = "self.c_tilemap cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_ubo_cannot_be_converted_t[] = "self.c_ubo cannot be converted to a Python object for pickling";
static const char __pyx_k_self_c_window_cannot_be_converte[] = "self.c_window cannot be converted to a Python object for pickling";
static const char __pyx_k_utils_get_random_with_probabilit[] = "utils_get_random_with_probability";
static const char __pyx_k_Pickling_of_struct_members_such_2[] = "Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)";
static const char __pyx_k_Pickling_of_struct_members_such_3[] = "Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)";
static const char __pyx_k_Pickling_of_struct_members_such_4[] = "Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)";
static const char __pyx_k_Pickling_of_struct_members_such_5[] = "Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)";
static const char __pyx_k_Pickling_of_struct_members_such_6[] = "Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)";
static const char __pyx_k_Pickling_of_struct_members_such_7[] = "Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)";
static const char __pyx_k_Pickling_of_struct_members_such_8[] = "Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)";
static const char __pyx_k_No_value_specified_for_struct_at_2[] = "No value specified for struct attribute 'y'";
static const char __pyx_k_No_value_specified_for_struct_at_3[] = "No value specified for struct attribute 'size'";
static const char __pyx_k_No_value_specified_for_struct_at_4[] = "No value specified for struct attribute 'normalized_size'";
static const char __pyx_k_No_value_specified_for_struct_at_5[] = "No value specified for struct attribute 'offset'";
static const char __pyx_k_No_value_specified_for_struct_at_6[] = "No value specified for struct attribute 'normalized_offset'";
static const char __pyx_k_No_value_specified_for_struct_at_7[] = "No value specified for struct attribute 'bearing'";
static const char __pyx_k_No_value_specified_for_struct_at_8[] = "No value specified for struct attribute 'bearing_normalized'";
static const char __pyx_k_No_value_specified_for_struct_at_9[] = "No value specified for struct attribute 'advance'";
static const char __pyx_k_No_value_specified_for_struct_at_10[] = "No value specified for struct attribute 'advance_normalized'";
static const char __pyx_k_No_value_specified_for_struct_at_11[] = "No value specified for struct attribute 'bitmap'";
static const char __pyx_k_No_value_specified_for_struct_at_12[] = "No value specified for struct attribute 'ch'";
static const char __pyx_k_No_value_specified_for_struct_at_13[] = "No value specified for struct attribute 'z'";
static const char __pyx_k_No_value_specified_for_struct_at_14[] = "No value specified for struct attribute 'w'";
static const char __pyx_k_No_value_specified_for_struct_at_15[] = "No value specified for struct attribute 'position'";
static const char __pyx_k_No_value_specified_for_struct_at_16[] = "No value specified for struct attribute 'normal'";
static const char __pyx_k_No_value_specified_for_struct_at_17[] = "No value specified for struct attribute 'texture_coordinates'";
static const char __pyx_k_No_value_specified_for_struct_at_18[] = "No value specified for struct attribute 'bone_wieghts'";
static const char __pyx_k_No_value_specified_for_struct_at_19[] = "No value specified for struct attribute 'bone_ids'";
static PyObject *__pyx_kp_s_;
static PyObject *__pyx_n_s_AttributeError;
static PyObject *__pyx_n_s_BLOOM_SHADER_MODE_COMPOSITE;
static PyObject *__pyx_n_s_BLOOM_SHADER_MODE_DOWNSAMPLE;
static PyObject *__pyx_n_s_BLOOM_SHADER_MODE_PREFILTER;
static PyObject *__pyx_n_s_BLOOM_SHADER_MODE_UPSAMPLE;
static PyObject *__pyx_n_s_CGL_FALSE;
static PyObject *__pyx_n_s_CGL_TRUE;
static PyObject *__pyx_kp_s_CGL_Window;
static PyObject *__pyx_n_s_CONSOLE_COLOR_BLUE;
static PyObject *__pyx_n_s_CONSOLE_COLOR_GRAY;
static PyObject *__pyx_n_s_CONSOLE_COLOR_GREEN;
static PyObject *__pyx_n_s_CONSOLE_COLOR_RED;
static PyObject *__pyx_n_s_CONSOLE_COLOR_RESET;
static PyObject *__pyx_n_s_CUBEMAP_NEGATIVE_X;
static PyObject *__pyx_n_s_CUBEMAP_NEGATIVE_Y;
static PyObject *__pyx_n_s_CUBEMAP_NEGATIVE_Z;
static PyObject *__pyx_n_s_CUBEMAP_POSITIVE_X;
static PyObject *__pyx_n_s_CUBEMAP_POSITIVE_Y;
static PyObject *__pyx_n_s_CUBEMAP_POSITIVE_Z;
static PyObject *__pyx_n_s_Callable;
static PyObject *__pyx_n_s_E;
static PyObject *__pyx_kp_s_Failed_to_create_3d_texture;
static PyObject *__pyx_kp_s_Failed_to_create_basic_framebuff;
static PyObject *__pyx_kp_s_Failed_to_create_blank_texture;
static PyObject *__pyx_kp_s_Failed_to_create_cube_mesh;
static PyObject *__pyx_kp_s_Failed_to_create_cubemap_texture;
static PyObject *__pyx_kp_s_Failed_to_create_cylinder_mesh;
static PyObject *__pyx_kp_s_Failed_to_create_framebuffer;
static PyObject *__pyx_kp_s_Failed_to_create_framebuffer_fro;
static PyObject *__pyx_kp_s_Failed_to_create_mesh;
static PyObject *__pyx_kp_s_Failed_to_create_plane_mesh;
static PyObject *__pyx_kp_s_Failed_to_create_quad_mesh;
static PyObject *__pyx_kp_s_Failed_to_create_shader;
static PyObject *__pyx_kp_s_Failed_to_create_sphere_mesh;
static PyObject *__pyx_kp_s_Failed_to_create_texture_array;
static PyObject *__pyx_kp_s_Failed_to_create_texture_from_im;
static PyObject *__pyx_kp_s_Failed_to_create_triangle_mesh;
static PyObject *__pyx_kp_s_Failed_to_create_window;
static PyObject *__pyx_kp_s_Failed_to_get_color_attachment;
static PyObject *__pyx_kp_s_Failed_to_get_color_texture;
static PyObject *__pyx_kp_s_Failed_to_get_depth_texture;
static PyObject *__pyx_kp_s_Failed_to_load_mesh_from_obj_fil;
static PyObject *__pyx_kp_s_GPU_Mesh;
static PyObject *__pyx_n_s_Image;
static PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_n_s_KEY_0;
static PyObject *__pyx_n_s_KEY_1;
static PyObject *__pyx_n_s_KEY_2;
static PyObject *__pyx_n_s_KEY_3;
static PyObject *__pyx_n_s_KEY_4;
static PyObject *__pyx_n_s_KEY_5;
static PyObject *__pyx_n_s_KEY_6;
static PyObject *__pyx_n_s_KEY_7;
static PyObject *__pyx_n_s_KEY_8;
static PyObject *__pyx_n_s_KEY_9;
static PyObject *__pyx_n_s_KEY_A;
static PyObject *__pyx_n_s_KEY_APOSTROPHE;
static PyObject *__pyx_n_s_KEY_B;
static PyObject *__pyx_n_s_KEY_BACKSLASH;
static PyObject *__pyx_n_s_KEY_BACKSPACE;
static PyObject *__pyx_n_s_KEY_C;
static PyObject *__pyx_n_s_KEY_CAPS_LOCK;
static PyObject *__pyx_n_s_KEY_COMMA;
static PyObject *__pyx_n_s_KEY_D;
static PyObject *__pyx_n_s_KEY_DELETE;
static PyObject *__pyx_n_s_KEY_DOWN;
static PyObject *__pyx_n_s_KEY_E;
static PyObject *__pyx_n_s_KEY_END;
static PyObject *__pyx_n_s_KEY_ENTER;
static PyObject *__pyx_n_s_KEY_EQUAL;
static PyObject *__pyx_n_s_KEY_ESCAPE;
static PyObject *__pyx_n_s_KEY_F;
static PyObject *__pyx_n_s_KEY_F1;
static PyObject *__pyx_n_s_KEY_F10;
static PyObject *__pyx_n_s_KEY_F11;
static PyObject *__pyx_n_s_KEY_F12;
static PyObject *__pyx_n_s_KEY_F13;
static PyObject *__pyx_n_s_KEY_F14;
static PyObject *__pyx_n_s_KEY_F15;
static PyObject *__pyx_n_s_KEY_F16;
static PyObject *__pyx_n_s_KEY_F17;
static PyObject *__pyx_n_s_KEY_F18;
static PyObject *__pyx_n_s_KEY_F19;
static PyObject *__pyx_n_s_KEY_F2;
static PyObject *__pyx_n_s_KEY_F20;
static PyObject *__pyx_n_s_KEY_F21;
static PyObject *__pyx_n_s_KEY_F22;
static PyObject *__pyx_n_s_KEY_F23;
static PyObject *__pyx_n_s_KEY_F24;
static PyObject *__pyx_n_s_KEY_F25;
static PyObject *__pyx_n_s_KEY_F3;
static PyObject *__pyx_n_s_KEY_F4;
static PyObject *__pyx_n_s_KEY_F5;
static PyObject *__pyx_n_s_KEY_F6;
static PyObject *__pyx_n_s_KEY_F7;
static PyObject *__pyx_n_s_KEY_F8;
static PyObject *__pyx_n_s_KEY_F9;
static PyObject *__pyx_n_s_KEY_G;
static PyObject *__pyx_n_s_KEY_GRAVE_ACCENT;
static PyObject *__pyx_n_s_KEY_H;
static PyObject *__pyx_n_s_KEY_HOME;
static PyObject *__pyx_n_s_KEY_I;
static PyObject *__pyx_n_s_KEY_INSERT;
static PyObject *__pyx_n_s_KEY_J;
static PyObject *__pyx_n_s_KEY_K;
static PyObject *__pyx_n_s_KEY_KP_0;
static PyObject *__pyx_n_s_KEY_KP_1;
static PyObject *__pyx_n_s_KEY_KP_2;
static PyObject *__pyx_n_s_KEY_KP_3;
static PyObject *__pyx_n_s_KEY_KP_4;
static PyObject *__pyx_n_s_KEY_KP_5;
static PyObject *__pyx_n_s_KEY_KP_6;
static PyObject *__pyx_n_s_KEY_KP_7;
static PyObject *__pyx_n_s_KEY_KP_8;
static PyObject *__pyx_n_s_KEY_KP_9;
static PyObject *__pyx_n_s_KEY_KP_ADD;
static PyObject *__pyx_n_s_KEY_KP_DECIMAL;
static PyObject *__pyx_n_s_KEY_KP_DIVIDE;
static PyObject *__pyx_n_s_KEY_KP_ENTER;
static PyObject *__pyx_n_s_KEY_KP_EQUAL;
static PyObject *__pyx_n_s_KEY_KP_MULTIPLY;
static PyObject *__pyx_n_s_KEY_KP_SUBTRACT;
static PyObject *__pyx_n_s_KEY_L;
static PyObject *__pyx_n_s_KEY_LEFT;
static PyObject *__pyx_n_s_KEY_LEFT_ALT;
static PyObject *__pyx_n_s_KEY_LEFT_BRACKET;
static PyObject *__pyx_n_s_KEY_LEFT_CONTROL;
static PyObject *__pyx_n_s_KEY_LEFT_SHIFT;
static PyObject *__pyx_n_s_KEY_LEFT_SUPER;
static PyObject *__pyx_n_s_KEY_M;
static PyObject *__pyx_n_s_KEY_MENU;
static PyObject *__pyx_n_s_KEY_MINUS;
static PyObject *__pyx_n_s_KEY_N;
static PyObject *__pyx_n_s_KEY_NUM_LOCK;
static PyObject *__pyx_n_s_KEY_O;
static PyObject *__pyx_n_s_KEY_P;
static PyObject *__pyx_n_s_KEY_PAGE_DOWN;
static PyObject *__pyx_n_s_KEY_PAGE_UP;
static PyObject *__pyx_n_s_KEY_PAUSE;
static PyObject *__pyx_n_s_KEY_PERIOD;
static PyObject *__pyx_n_s_KEY_PRINT_SCREEN;
static PyObject *__pyx_n_s_KEY_Q;
static PyObject *__pyx_n_s_KEY_R;
static PyObject *__pyx_n_s_KEY_RIGHT;
static PyObject *__pyx_n_s_KEY_RIGHT_ALT;
static PyObject *__pyx_n_s_KEY_RIGHT_BRACKET;
static PyObject *__pyx_n_s_KEY_RIGHT_CONTROL;
static PyObject *__pyx_n_s_KEY_RIGHT_SHIFT;
static PyObject *__pyx_n_s_KEY_RIGHT_SUPER;
static PyObject *__pyx_n_s_KEY_S;
static PyObject *__pyx_n_s_KEY_SCROLL_LOCK;
static PyObject *__pyx_n_s_KEY_SEMICOLON;
static PyObject *__pyx_n_s_KEY_SLASH;
static PyObject *__pyx_n_s_KEY_SPACE;
static PyObject *__pyx_n_s_KEY_T;
static PyObject *__pyx_n_s_KEY_TAB;
static PyObject *__pyx_n_s_KEY_U;
static PyObject *__pyx_n_s_KEY_UNKNOWN;
static PyObject *__pyx_n_s_KEY_UP;
static PyObject *__pyx_n_s_KEY_V;
static PyObject *__pyx_n_s_KEY_W;
static PyObject *__pyx_n_s_KEY_WORLD_1;
static PyObject *__pyx_n_s_KEY_WORLD_2;
static PyObject *__pyx_n_s_KEY_X;
static PyObject *__pyx_n_s_KEY_Y;
static PyObject *__pyx_n_s_KEY_Z;
static PyObject *__pyx_n_s_KeyError;
static PyObject *__pyx_n_s_LOGGER_LOG_BUFFER_SIZE;
static PyObject *__pyx_n_s_LOGGER_MAX_LOG_FILES;
static PyObject *__pyx_n_s_LOG_LEVEL_ERROR;
static PyObject *__pyx_n_s_LOG_LEVEL_INFO;
static PyObject *__pyx_n_s_LOG_LEVEL_INTERNAL;
static PyObject *__pyx_n_s_LOG_LEVEL_TRACE;
static PyObject *__pyx_n_s_LOG_LEVEL_WARN;
static PyObject *__pyx_n_s_MOUSE_BUTTON_1;
static PyObject *__pyx_n_s_MOUSE_BUTTON_2;
static PyObject *__pyx_n_s_MOUSE_BUTTON_3;
static PyObject *__pyx_n_s_MOUSE_BUTTON_4;
static PyObject *__pyx_n_s_MOUSE_BUTTON_5;
static PyObject *__pyx_n_s_MOUSE_BUTTON_6;
static PyObject *__pyx_n_s_MOUSE_BUTTON_7;
static PyObject *__pyx_n_s_MOUSE_BUTTON_8;
static PyObject *__pyx_n_s_MOUSE_BUTTON_LAST;
static PyObject *__pyx_n_s_MOUSE_BUTTON_LEFT;
static PyObject *__pyx_n_s_MOUSE_BUTTON_MIDDLE;
static PyObject *__pyx_n_s_MOUSE_BUTTON_RIGHT;
static PyObject *__pyx_kp_s_Matrices_must_have_the_same_size;
static PyObject *__pyx_kp_s_Matrix_index_must_be_a_tuple_of;
static PyObject *__pyx_kp_s_Matrix_must_be_square;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_n_s_NOISE_FRACTAL_TYPE_BILLOW;
static PyObject *__pyx_n_s_NOISE_FRACTAL_TYPE_COUNT;
static PyObject *__pyx_n_s_NOISE_FRACTAL_TYPE_FBM;
static PyObject *__pyx_n_s_NOISE_FRACTAL_TYPE_NONE;
static PyObject *__pyx_n_s_NOISE_FRACTAL_TYPE_PINGPONG;
static PyObject *__pyx_n_s_NOISE_FRACTAL_TYPE_RIGID;
static PyObject *__pyx_n_s_NOISE_TYPE_COUNT;
static PyObject *__pyx_n_s_NOISE_TYPE_OPENSIMPLEX;
static PyObject *__pyx_n_s_NOISE_TYPE_OPENSIMPLEX2S;
static PyObject *__pyx_n_s_NOISE_TYPE_PERLIN;
static PyObject *__pyx_n_s_NOISE_TYPE_VALUE;
static PyObject *__pyx_n_s_NOISE_TYPE_VALUECUBIC;
static PyObject *__pyx_n_s_NOISE_TYPE_WORLEY;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_10;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_11;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_12;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_13;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_14;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_15;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_16;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_17;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_18;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_19;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_2;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_3;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_4;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_5;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_6;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_7;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_8;
static PyObject *__pyx_kp_s_No_value_specified_for_struct_at_9;
static PyObject *__pyx_n_s_PI;
static PyObject *__pyx_n_s_PIL;
static PyObject *__pyx_n_s_PI_2;
static PyObject *__pyx_n_s_PRESS;
static PyObject *__pyx_n_s_PickleError;
static PyObject *__pyx_kp_s_Pickling_of_struct_members_such;
static PyObject *__pyx_kp_s_Pickling_of_struct_members_such_2;
static PyObject *__pyx_kp_s_Pickling_of_struct_members_such_3;
static PyObject *__pyx_kp_s_Pickling_of_struct_members_such_4;
static PyObject *__pyx_kp_s_Pickling_of_struct_members_such_5;
static PyObject *__pyx_kp_s_Pickling_of_struct_members_such_6;
static PyObject *__pyx_kp_s_Pickling_of_struct_members_such_7;
static PyObject *__pyx_kp_s_Pickling_of_struct_members_such_8;
static PyObject *__pyx_n_s_RELEASE;
static PyObject *__pyx_n_s_REPEAT;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_SQRT2;
static PyObject *__pyx_n_s_SQRT3;
static PyObject *__pyx_n_s_SQRT5;
static PyObject *__pyx_n_s_SQRT6;
static PyObject *__pyx_n_s_SQRT7;
static PyObject *__pyx_n_s_SQRT8;
static PyObject *__pyx_n_s_Shader;
static PyObject *__pyx_kp_s_Submatrix_must_be_inside_the_mat;
static PyObject *__pyx_n_s_TWO_PI;
static PyObject *__pyx_kp_s_The_number_of_indices_is_greater;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_kp_s_Values_must_have_the_same_size_a;
static PyObject *__pyx_n_s_WINDOW_TABLE;
static PyObject *__pyx_kp_s__13;
static PyObject *__pyx_kp_s__14;
static PyObject *__pyx_n_s__2;
static PyObject *__pyx_kp_s__22;
static PyObject *__pyx_kp_s__23;
static PyObject *__pyx_kp_s__3;
static PyObject *__pyx_kp_u__3;
static PyObject *__pyx_kp_s__4;
static PyObject *__pyx_kp_u__4;
static PyObject *__pyx_n_s_a;
static PyObject *__pyx_n_s_a_x;
static PyObject *__pyx_n_s_a_y;
static PyObject *__pyx_n_s_aabb_contains_point;
static PyObject *__pyx_n_s_aabb_intersects_aabb;
static PyObject *__pyx_n_s_aabb_max;
static PyObject *__pyx_n_s_aabb_max_a;
static PyObject *__pyx_n_s_aabb_max_b;
static PyObject *__pyx_n_s_aabb_min;
static PyObject *__pyx_n_s_aabb_min_a;
static PyObject *__pyx_n_s_aabb_min_b;
static PyObject *__pyx_n_s_add_arc2f;
static PyObject *__pyx_n_s_add_character;
static PyObject *__pyx_n_s_add_circle;
static PyObject *__pyx_n_s_add_circle2f;
static PyObject *__pyx_n_s_add_circler;
static PyObject *__pyx_n_s_add_circler2fr;
static PyObject *__pyx_n_s_add_cubic_bazier;
static PyObject *__pyx_n_s_add_cubic_bazier2f;
static PyObject *__pyx_n_s_add_cubic_bazier2v;
static PyObject *__pyx_n_s_add_cubic_bazier_points;
static PyObject *__pyx_n_s_add_cubic_bazier_points2f;
static PyObject *__pyx_n_s_add_cubic_bazier_points2v;
static PyObject *__pyx_n_s_add_line;
static PyObject *__pyx_n_s_add_line2f;
static PyObject *__pyx_n_s_add_mesh;
static PyObject *__pyx_n_s_add_oval;
static PyObject *__pyx_n_s_add_oval2f;
static PyObject *__pyx_n_s_add_quad;
static PyObject *__pyx_n_s_add_quad_8f;
static PyObject *__pyx_n_s_add_rect;
static PyObject *__pyx_n_s_add_rect2f;
static PyObject *__pyx_n_s_add_shape_out_line;
static PyObject *__pyx_n_s_add_string;
static PyObject *__pyx_n_s_add_string_with_font;
static PyObject *__pyx_n_s_add_triangle;
static PyObject *__pyx_n_s_add_vertex;
static PyObject *__pyx_n_s_add_vertex_p;
static PyObject *__pyx_n_s_add_vertex_p3f;
static PyObject *__pyx_n_s_add_vertex_p3ft;
static PyObject *__pyx_n_s_add_vertex_p3ft2f;
static PyObject *__pyx_n_s_add_vertex_pt;
static PyObject *__pyx_n_s_add_vertex_pt2f;
static PyObject *__pyx_n_s_advance;
static PyObject *__pyx_n_s_advance_normalized;
static PyObject *__pyx_n_s_angle;
static PyObject *__pyx_n_s_apply_transformations_on_cpu;
static PyObject *__pyx_n_s_apply_transformations_on_gpu;
static PyObject *__pyx_n_s_array;
static PyObject *__pyx_n_s_aspect;
static PyObject *__pyx_n_s_axes;
static PyObject *__pyx_n_s_axes_count;
static PyObject *__pyx_n_s_axis;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_n_s_b_x;
static PyObject *__pyx_n_s_b_y;
static PyObject *__pyx_n_s_bearing;
static PyObject *__pyx_n_s_bearing_normalized;
static PyObject *__pyx_n_s_begin;
static PyObject *__pyx_n_s_begin_int;
static PyObject *__pyx_n_s_binding;
static PyObject *__pyx_n_s_bitmap;
static PyObject *__pyx_kp_u_bloom;
static PyObject *__pyx_n_s_bloom_2;
static PyObject *__pyx_n_s_bone_ids;
static PyObject *__pyx_n_s_bone_wieghts;
static PyObject *__pyx_n_s_bottom;
static PyObject *__pyx_n_s_buffer;
static PyObject *__pyx_n_s_c;
static PyObject *__pyx_n_s_c_font_character;
static PyObject *__pyx_n_s_c_framebuffer;
static PyObject *__pyx_n_s_c_indices;
static PyObject *__pyx_n_s_c_mesh;
static PyObject *__pyx_n_s_c_num_indices;
static PyObject *__pyx_n_s_c_points;
static PyObject *__pyx_n_s_c_probabilities;
static PyObject *__pyx_n_s_c_texture;
static PyObject *__pyx_n_s_c_vertex;
static PyObject *__pyx_n_s_c_vertices;
static PyObject *__pyx_n_s_c_x;
static PyObject *__pyx_n_s_c_y;
static PyObject *__pyx_n_s_calc_adjugate;
static PyObject *__pyx_n_s_calc_inverse;
static PyObject *__pyx_n_s_calc_transpose;
static PyObject *__pyx_n_s_calculate_bounding_box;
static PyObject *__pyx_n_s_calculate_bounding_square;
static PyObject *__pyx_n_s_calculate_circumcircle;
static PyObject *__pyx_n_s_calculate_super_triangle;
static PyObject *__pyx_n_s_center;
static PyObject *__pyx_n_s_cgl;
static PyObject *__pyx_kp_s_cgl_wrapper_pyx;
static PyObject *__pyx_n_s_ch;
static PyObject *__pyx_n_s_channels;
static PyObject *__pyx_n_s_circle_radius;
static PyObject *__pyx_n_s_clear;
static PyObject *__pyx_n_s_clear_console;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_close_callback;
static PyObject *__pyx_n_s_cls;
static PyObject *__pyx_n_s_color;
static PyObject *__pyx_n_s_column;
static PyObject *__pyx_n_s_complete_char;
static PyObject *__pyx_n_s_console_progress_bar;
static PyObject *__pyx_n_s_console_set_color;
static PyObject *__pyx_n_s_control_1;
static PyObject *__pyx_n_s_control_1_x;
static PyObject *__pyx_n_s_control_1_y;
static PyObject *__pyx_n_s_control_2;
static PyObject *__pyx_n_s_control_2_x;
static PyObject *__pyx_n_s_control_2_y;
static PyObject *__pyx_n_s_copy;
static PyObject *__pyx_n_s_create_context;
static PyObject *__pyx_n_s_ctx;
static PyObject *__pyx_n_s_d;
static PyObject *__pyx_n_s_d_x;
static PyObject *__pyx_n_s_d_y;
static PyObject *__pyx_n_s_data;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_decorated;
static PyObject *__pyx_n_s_deepcopy;
static PyObject *__pyx_n_s_deg;
static PyObject *__pyx_n_s_deg_to_rad;
static PyObject *__pyx_n_s_depth;
static PyObject *__pyx_n_s_destroy;
static PyObject *__pyx_n_s_destroy_context;
static PyObject *__pyx_n_s_dict;
static PyObject *__pyx_n_s_disable_diffuse_shading;
static PyObject *__pyx_n_s_drag_n_drop_callback;
static PyObject *__pyx_n_s_dst;
static PyObject *__pyx_n_s_dst_offset;
static PyObject *__pyx_n_s_enable_console_logging;
static PyObject *__pyx_n_s_enable_diffuse_shading;
static PyObject *__pyx_n_s_encode;
static PyObject *__pyx_n_s_end;
static PyObject *__pyx_n_s_end_angle;
static PyObject *__pyx_n_s_end_x;
static PyObject *__pyx_n_s_end_y;
static PyObject *__pyx_n_s_enebled;
static PyObject *__pyx_n_s_eye;
static PyObject *__pyx_n_s_f_radius;
static PyObject *__pyx_n_s_face;
static PyObject *__pyx_n_s_far;
static PyObject *__pyx_n_u_file_font;
static PyObject *__pyx_n_s_float_cubic_lerp;
static PyObject *__pyx_n_s_float_lerp;
static PyObject *__pyx_n_s_float_quadratic_lerp;
static PyObject *__pyx_n_s_flush;
static PyObject *__pyx_n_s_flush_if_required;
static PyObject *__pyx_n_s_font;
static PyObject *__pyx_kp_u_font_character;
static PyObject *__pyx_n_s_font_character_2;
static PyObject *__pyx_n_s_font_size;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_formatf;
static PyObject *__pyx_n_s_fov;
static PyObject *__pyx_kp_u_fractal_type;
static PyObject *__pyx_n_s_fractal_type_2;
static PyObject *__pyx_n_s_fragment_shader_path;
static PyObject *__pyx_n_s_fragment_shader_source;
static PyObject *__pyx_kp_u_framebuffer;
static PyObject *__pyx_n_s_framebuffer_2;
static PyObject *__pyx_n_s_framebuffer_create;
static PyObject *__pyx_n_s_framebuffer_create_basic;
static PyObject *__pyx_n_s_framebuffer_create_from_default;
static PyObject *__pyx_n_s_framebuffer_size_callback;
static PyObject *__pyx_n_s_free;
static PyObject *__pyx_kp_u_frequency;
static PyObject *__pyx_n_s_frequency_2;
static PyObject *__pyx_n_s_front;
static PyObject *__pyx_n_s_function_name;
static PyObject *__pyx_n_s_g;
static PyObject *__pyx_kp_u_gain;
static PyObject *__pyx_n_s_gain_2;
static PyObject *__pyx_n_s_get_auto_upload;
static PyObject *__pyx_n_s_get_current_context;
static PyObject *__pyx_n_s_get_id;
static PyObject *__pyx_n_s_get_internal_handle;
static PyObject *__pyx_n_s_get_position;
static PyObject *__pyx_n_s_get_size;
static PyObject *__pyx_n_s_get_uniform_location;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_gjk_check_collision_2d;
static PyObject *__pyx_n_s_gjk_default_support;
static PyObject *__pyx_n_s_gjk_epa_2d;
static PyObject *__pyx_n_s_gjk_shape_default_support;
static PyObject *__pyx_n_s_gl_clear;
static PyObject *__pyx_n_s_gl_init;
static PyObject *__pyx_n_s_gl_render_screen_quad;
static PyObject *__pyx_n_s_gl_shutdown;
static PyObject *__pyx_n_s_height;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_kp_u_image;
static PyObject *__pyx_n_s_image_2;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_incomplete_char;
static PyObject *__pyx_n_s_index;
static PyObject *__pyx_n_s_index_count;
static PyObject *__pyx_n_s_index_count_used;
static PyObject *__pyx_n_s_indices;
static PyObject *__pyx_n_s_init;
static PyObject *__pyx_n_s_internal_format;
static PyObject *__pyx_n_s_is_point_in_circle;
static PyObject *__pyx_n_s_is_point_in_triangle;
static PyObject *__pyx_n_s_is_square;
static PyObject *__pyx_n_s_iterations;
static PyObject *__pyx_kp_u_ivec4;
static PyObject *__pyx_n_s_ivec4_2;
static PyObject *__pyx_n_s_key_callback;
static PyObject *__pyx_n_s_l;
static PyObject *__pyx_n_s_l_obj;
static PyObject *__pyx_kp_u_lacunarity;
static PyObject *__pyx_n_s_lacunarity_2;
static PyObject *__pyx_n_s_layer;
static PyObject *__pyx_n_s_left;
static PyObject *__pyx_n_s_length;
static PyObject *__pyx_n_s_length_squared;
static PyObject *__pyx_n_s_level;
static PyObject *__pyx_n_s_light_color;
static PyObject *__pyx_n_s_light_pos;
static PyObject *__pyx_n_s_load_object;
static PyObject *__pyx_n_s_log_error;
static PyObject *__pyx_n_s_log_format;
static PyObject *__pyx_n_s_log_info;
static PyObject *__pyx_n_s_log_internal;
static PyObject *__pyx_n_s_log_trace;
static PyObject *__pyx_n_s_log_warn;
static PyObject *__pyx_n_s_logger_attach_log_file;
static PyObject *__pyx_n_s_logger_detach_log_file;
static PyObject *__pyx_n_s_logger_disable_console_logging;
static PyObject *__pyx_n_s_logger_enable_console_logging;
static PyObject *__pyx_n_s_logger_flush;
static PyObject *__pyx_n_s_logger_init;
static PyObject *__pyx_n_s_logger_log;
static PyObject *__pyx_n_s_logger_shutdown;
static PyObject *__pyx_n_s_m;
static PyObject *__pyx_n_s_maax;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_mat;
static PyObject *__pyx_n_s_mat4;
static PyObject *__pyx_n_s_mat4_adjoint;
static PyObject *__pyx_n_s_mat4_decompose_lu;
static PyObject *__pyx_n_s_mat4_det;
static PyObject *__pyx_n_s_mat4_det_by_gauss;
static PyObject *__pyx_n_s_mat4_det_by_lu;
static PyObject *__pyx_n_s_mat4_gauss_elim;
static PyObject *__pyx_n_s_mat4_identity;
static PyObject *__pyx_n_s_mat4_inverse;
static PyObject *__pyx_n_s_mat4_lerp;
static PyObject *__pyx_n_s_mat4_look_at;
static PyObject *__pyx_n_s_mat4_mul;
static PyObject *__pyx_n_s_mat4_mul_vec4;
static PyObject *__pyx_n_s_mat4_orthographic;
static PyObject *__pyx_n_s_mat4_perspective;
static PyObject *__pyx_n_s_mat4_rank;
static PyObject *__pyx_n_s_mat4_rotate_about_axis;
static PyObject *__pyx_n_s_mat4_rotate_x;
static PyObject *__pyx_n_s_mat4_rotate_y;
static PyObject *__pyx_n_s_mat4_rotate_z;
static PyObject *__pyx_n_s_mat4_scale;
static PyObject *__pyx_n_s_mat4_trace;
static PyObject *__pyx_n_s_mat4_translate;
static PyObject *__pyx_n_s_mat4_transpose;
static PyObject *__pyx_n_s_mat4_zero;
static PyObject *__pyx_kp_s_mat4x4;
static PyObject *__pyx_kp_s_matrix;
static PyObject *__pyx_n_s_matrix_2;
static PyObject *__pyx_n_s_max_axes;
static PyObject *__pyx_n_s_max_indices;
static PyObject *__pyx_n_s_max_size;
static PyObject *__pyx_n_s_max_vertices;
static PyObject *__pyx_n_s_mean;
static PyObject *__pyx_n_s_memory_font;
static PyObject *__pyx_n_s_mesh;
static PyObject *__pyx_kp_u_mesh_cpu;
static PyObject *__pyx_n_s_mesh_cpu_2;
static PyObject *__pyx_n_s_mesh_cpu_create;
static PyObject *__pyx_n_s_mesh_cpu_cube;
static PyObject *__pyx_n_s_mesh_cpu_cylinder;
static PyObject *__pyx_n_s_mesh_cpu_load_obj;
static PyObject *__pyx_n_s_mesh_cpu_plane;
static PyObject *__pyx_n_s_mesh_cpu_quad;
static PyObject *__pyx_n_s_mesh_cpu_sphere;
static PyObject *__pyx_n_s_mesh_cpu_triangle;
static PyObject *__pyx_kp_u_mesh_gpu;
static PyObject *__pyx_n_s_mesh_gpu_2;
static PyObject *__pyx_kp_u_mesh_vertex;
static PyObject *__pyx_n_s_mesh_vertex_2;
static PyObject *__pyx_n_s_mian;
static PyObject *__pyx_n_s_milliseconds;
static PyObject *__pyx_n_s_mouse_button_callback;
static PyObject *__pyx_n_s_mouse_position_callback;
static PyObject *__pyx_n_s_mouse_scroll_callback;
static PyObject *__pyx_n_s_n;
static PyObject *__pyx_n_s_n_vector;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_name_2;
static PyObject *__pyx_n_s_near;
static PyObject *__pyx_n_s_new;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_noise_get;
static PyObject *__pyx_n_s_noise_init;
static PyObject *__pyx_n_s_noise_opensimplex;
static PyObject *__pyx_n_s_noise_opensimplex2s;
static PyObject *__pyx_n_s_noise_params;
static PyObject *__pyx_kp_u_noise_params_type;
static PyObject *__pyx_n_s_noise_perlin;
static PyObject *__pyx_n_s_noise_shutdown;
static PyObject *__pyx_n_s_noise_value;
static PyObject *__pyx_n_s_noise_valuecubic;
static PyObject *__pyx_n_s_noise_worley;
static PyObject *__pyx_n_s_normal;
static PyObject *__pyx_n_s_normalized_offset;
static PyObject *__pyx_n_s_normalized_size;
static PyObject *__pyx_n_s_not_loaded;
static PyObject *__pyx_n_s_np;
static PyObject *__pyx_n_s_nt;
static PyObject *__pyx_n_s_obj;
static PyObject *__pyx_kp_u_octaves;
static PyObject *__pyx_n_s_octaves_2;
static PyObject *__pyx_n_s_offset;
static PyObject *__pyx_n_s_offset_x;
static PyObject *__pyx_n_s_offset_y;
static PyObject *__pyx_n_s_open;
static PyObject *__pyx_n_s_os;
static PyObject *__pyx_n_s_overlap_amount;
static PyObject *__pyx_n_s_padding;
static PyObject *__pyx_n_s_path;
static PyObject *__pyx_n_s_pickle;
static PyObject *__pyx_kp_u_ping_pong_strength;
static PyObject *__pyx_n_s_ping_pong_strength_2;
static PyObject *__pyx_n_s_point;
static PyObject *__pyx_n_s_points;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_n_s_position;
static PyObject *__pyx_n_s_position_x;
static PyObject *__pyx_n_s_position_y;
static PyObject *__pyx_n_s_prefix;
static PyObject *__pyx_n_s_printf_blue;
static PyObject *__pyx_n_s_printf_gray;
static PyObject *__pyx_n_s_printf_green;
static PyObject *__pyx_n_s_printf_red;
static PyObject *__pyx_n_s_probabilities;
static PyObject *__pyx_n_s_progress;
static PyObject *__pyx_n_s_ptr;
static PyObject *__pyx_n_s_pyx_PickleError;
static PyObject *__pyx_n_s_pyx_checksum;
static PyObject *__pyx_n_s_pyx_result;
static PyObject *__pyx_n_s_pyx_state;
static PyObject *__pyx_n_s_pyx_type;
static PyObject *__pyx_n_s_pyx_unpickle_widgets;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_n_s_r;
static PyObject *__pyx_n_s_r_a;
static PyObject *__pyx_n_s_r_b;
static PyObject *__pyx_n_s_r_c;
static PyObject *__pyx_n_s_r_d;
static PyObject *__pyx_n_s_rad;
static PyObject *__pyx_n_s_rad_to_deg;
static PyObject *__pyx_n_s_radius;
static PyObject *__pyx_n_s_radius0;
static PyObject *__pyx_n_s_radius1;
static PyObject *__pyx_n_s_radius_x;
static PyObject *__pyx_n_s_radius_y;
static PyObject *__pyx_n_s_random;
static PyObject *__pyx_n_s_random_gaussian;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_reduce;
static PyObject *__pyx_n_s_reduce_cython;
static PyObject *__pyx_n_s_reduce_ex;
static PyObject *__pyx_n_s_res;
static PyObject *__pyx_n_s_res_u;
static PyObject *__pyx_n_s_res_v;
static PyObject *__pyx_n_s_resolution;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_right;
static PyObject *__pyx_n_s_rotation;
static PyObject *__pyx_kp_u_rotation_2;
static PyObject *__pyx_n_s_row;
static PyObject *__pyx_n_s_sat_collision_calculate_axes;
static PyObject *__pyx_n_s_sat_collision_detect;
static PyObject *__pyx_n_s_sat_collison_overlap_on_axis;
static PyObject *__pyx_n_s_scale;
static PyObject *__pyx_kp_u_scale_2;
static PyObject *__pyx_n_s_scale_x;
static PyObject *__pyx_n_s_scale_y;
static PyObject *__pyx_n_s_seed;
static PyObject *__pyx_n_s_segments;
static PyObject *__pyx_kp_s_self_c_bloom_cannot_be_converted;
static PyObject *__pyx_kp_s_self_c_font_cannot_be_converted;
static PyObject *__pyx_kp_s_self_c_framebuffer_cannot_be_con;
static PyObject *__pyx_kp_s_self_c_image_cannot_be_converted;
static PyObject *__pyx_kp_s_self_c_matrix_cannot_be_converte;
static PyObject *__pyx_kp_s_self_c_mesh_cannot_be_converted;
static PyObject *__pyx_kp_s_self_c_shader_cannot_be_converte;
static PyObject *__pyx_kp_s_self_c_shape_cannot_be_converted;
static PyObject *__pyx_kp_s_self_c_ssbo_cannot_be_converted;
static PyObject *__pyx_kp_s_self_c_texture_cannot_be_convert;
static PyObject *__pyx_kp_s_self_c_tilemap_cannot_be_convert;
static PyObject *__pyx_kp_s_self_c_ubo_cannot_be_converted_t;
static PyObject *__pyx_kp_s_self_c_window_cannot_be_converte;
static PyObject *__pyx_n_s_set_auto_upload;
static PyObject *__pyx_n_s_set_current_context;
static PyObject *__pyx_n_s_set_fill_color;
static PyObject *__pyx_n_s_set_fill_colorf;
static PyObject *__pyx_n_s_set_fill_mode;
static PyObject *__pyx_n_s_set_font_texture;
static PyObject *__pyx_n_s_set_model_matrix;
static PyObject *__pyx_n_s_set_projection_matrix;
static PyObject *__pyx_n_s_set_stroke_color;
static PyObject *__pyx_n_s_set_stroke_colorf;
static PyObject *__pyx_n_s_set_stroke_thickness;
static PyObject *__pyx_n_s_set_texture;
static PyObject *__pyx_n_s_set_texture_coordinate_so;
static PyObject *__pyx_n_s_set_view_matrix;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_kp_u_shader;
static PyObject *__pyx_n_s_shader_2;
static PyObject *__pyx_kp_u_shape;
static PyObject *__pyx_n_s_shape_2;
static PyObject *__pyx_n_s_shd;
static PyObject *__pyx_n_s_shutdown;
static PyObject *__pyx_n_s_simplex;
static PyObject *__pyx_n_s_simplex_out;
static PyObject *__pyx_n_s_simplex_out_ptr;
static PyObject *__pyx_n_s_simplex_ptr;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_size_x;
static PyObject *__pyx_n_s_size_y;
static PyObject *__pyx_n_s_src;
static PyObject *__pyx_n_s_src_offset;
static PyObject *__pyx_kp_u_ssbo;
static PyObject *__pyx_n_s_ssbo_2;
static PyObject *__pyx_n_s_ssbo_binding;
static PyObject *__pyx_n_s_ssbo_copy;
static PyObject *__pyx_n_s_st;
static PyObject *__pyx_n_s_start;
static PyObject *__pyx_n_s_start_angle;
static PyObject *__pyx_n_s_start_x;
static PyObject *__pyx_n_s_start_y;
static PyObject *__pyx_n_s_static_draw;
static PyObject *__pyx_n_s_staticmethod;
static PyObject *__pyx_n_s_std_dev;
static PyObject *__pyx_kp_s_stringsource;
static PyObject *__pyx_n_s_suffix;
static PyObject *__pyx_n_s_sx;
static PyObject *__pyx_n_s_sy;
static PyObject *__pyx_n_s_system;
static PyObject *__pyx_n_s_t;
static PyObject *__pyx_n_s_t0;
static PyObject *__pyx_n_s_t1;
static PyObject *__pyx_n_s_target;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_tex;
static PyObject *__pyx_n_s_text_init;
static PyObject *__pyx_n_s_text_shutdown;
static PyObject *__pyx_kp_u_texture;
static PyObject *__pyx_n_s_texture_2;
static PyObject *__pyx_n_s_texture_coordinates;
static PyObject *__pyx_n_s_texture_creae_3d;
static PyObject *__pyx_n_s_texture_create_array;
static PyObject *__pyx_n_s_texture_create_blank;
static PyObject *__pyx_n_s_texture_create_cubemap;
static PyObject *__pyx_n_s_texture_create_from_image;
static PyObject *__pyx_n_s_texture_dst;
static PyObject *__pyx_n_s_texture_index;
static PyObject *__pyx_n_s_texture_src;
static PyObject *__pyx_n_s_texture_x_max;
static PyObject *__pyx_n_s_texture_x_min;
static PyObject *__pyx_n_s_texture_y_max;
static PyObject *__pyx_n_s_texture_y_min;
static PyObject *__pyx_n_s_theta;
static PyObject *__pyx_n_s_tile_count_x;
static PyObject *__pyx_n_s_tile_count_y;
static PyObject *__pyx_n_s_tile_size_x;
static PyObject *__pyx_n_s_tile_size_y;
static PyObject *__pyx_n_s_tile_x;
static PyObject *__pyx_n_s_tile_y;
static PyObject *__pyx_kp_u_tilemap;
static PyObject *__pyx_n_s_tilemap_2;
static PyObject *__pyx_n_s_title;
static PyObject *__pyx_n_s_tobytes;
static PyObject *__pyx_n_s_top;
static PyObject *__pyx_n_s_transform;
static PyObject *__pyx_kp_u_transform_position;
static PyObject *__pyx_n_s_triangulate_points_incremental;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_typef;
static PyObject *__pyx_n_s_typing;
static PyObject *__pyx_n_s_u;
static PyObject *__pyx_n_s_u_obj;
static PyObject *__pyx_kp_u_ubo;
static PyObject *__pyx_n_s_ubo_2;
static PyObject *__pyx_n_s_uniform;
static PyObject *__pyx_n_s_up;
static PyObject *__pyx_n_s_update;
static PyObject *__pyx_n_s_use_3d_tex_coords;
static PyObject *__pyx_n_s_use_texture_coordinates;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_utils_append_file;
static PyObject *__pyx_n_s_utils_big_endian_to_current;
static PyObject *__pyx_n_s_utils_crc32;
static PyObject *__pyx_n_s_utils_crc64;
static PyObject *__pyx_n_s_utils_fast_rand;
static PyObject *__pyx_n_s_utils_fast_srand;
static PyObject *__pyx_n_s_utils_get_file_size;
static PyObject *__pyx_n_s_utils_get_random_with_probabilit;
static PyObject *__pyx_n_s_utils_get_time;
static PyObject *__pyx_n_s_utils_get_timestamp;
static PyObject *__pyx_n_s_utils_is_big_endian;
static PyObject *__pyx_n_s_utils_is_little_endian;
static PyObject *__pyx_n_s_utils_little_endian_to_current;
static PyObject *__pyx_n_s_utils_rand31;
static PyObject *__pyx_n_s_utils_read_file;
static PyObject *__pyx_n_s_utils_relu;
static PyObject *__pyx_n_s_utils_relu_derivative;
static PyObject *__pyx_n_s_utils_relu_leaky;
static PyObject *__pyx_n_s_utils_relu_leaky_derivative;
static PyObject *__pyx_n_s_utils_relu_smooth;
static PyObject *__pyx_n_s_utils_relu_smooth_derivative;
static PyObject *__pyx_n_s_utils_reverse_bytes;
static PyObject *__pyx_n_s_utils_rot13;
static PyObject *__pyx_n_s_utils_sigmoid;
static PyObject *__pyx_n_s_utils_sigmoid_derivative;
static PyObject *__pyx_n_s_utils_sleep;
static PyObject *__pyx_n_s_utils_srand31;
static PyObject *__pyx_n_s_utils_step;
static PyObject *__pyx_n_s_utils_step_derivative;
static PyObject *__pyx_n_s_utils_super_fast_hash;
static PyObject *__pyx_n_s_utils_tanh;
static PyObject *__pyx_n_s_utils_tanh_derivative;
static PyObject *__pyx_n_s_utils_write_file;
static PyObject *__pyx_n_s_utils_xorshf96;
static PyObject *__pyx_n_s_v;
static PyObject *__pyx_n_s_value;
static PyObject *__pyx_n_s_values;
static PyObject *__pyx_n_s_vec;
static PyObject *__pyx_kp_u_vec2;
static PyObject *__pyx_n_s_vec2_2;
static PyObject *__pyx_n_s_vec2_triple_product;
static PyObject *__pyx_kp_u_vec3;
static PyObject *__pyx_n_s_vec3_2;
static PyObject *__pyx_n_s_vec3_reflect;
static PyObject *__pyx_n_s_vec3_rotate_about_axis;
static PyObject *__pyx_n_s_vec3_triple_product;
static PyObject *__pyx_kp_u_vec4;
static PyObject *__pyx_n_s_vec4_2;
static PyObject *__pyx_n_s_vec4_triple_product;
static PyObject *__pyx_n_s_vertex_count;
static PyObject *__pyx_n_s_vertex_count_used;
static PyObject *__pyx_n_s_vertex_shader_path;
static PyObject *__pyx_n_s_vertex_shader_source;
static PyObject *__pyx_n_s_vertices;
static PyObject *__pyx_n_s_vertices_count;
static PyObject *__pyx_n_s_w;
static PyObject *__pyx_kp_u_weighted_strength;
static PyObject *__pyx_n_s_weighted_strength_2;
static PyObject *__pyx_n_s_widgets;
static PyObject *__pyx_kp_s_widgets_is_a_static_class;
static PyObject *__pyx_n_s_width;
static PyObject *__pyx_kp_u_window;
static PyObject *__pyx_n_s_window_2;
static PyObject *__pyx_n_s_wnd;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_y;
static PyObject *__pyx_n_s_z;
static PyObject *__pyx_pf_3cgl_clear_console(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_2free(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr); /* proto */
static PyObject *__pyx_pf_3cgl_4init(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_6shutdown(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_8utils_sleep(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_milliseconds); /* proto */
static PyObject *__pyx_pf_3cgl_10utils_read_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_3cgl_12utils_get_file_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_3cgl_14utils_append_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_16utils_write_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_18utils_get_time(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_20utils_get_timestamp(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_22utils_is_little_endian(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_24utils_is_big_endian(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_26utils_get_random_with_probability(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_probabilities); /* proto */
static PyObject *__pyx_pf_3cgl_28utils_reverse_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_30utils_little_endian_to_current(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_32utils_big_endian_to_current(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_34utils_fast_srand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seed); /* proto */
static PyObject *__pyx_pf_3cgl_36utils_fast_rand(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_38utils_xorshf96(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_40utils_srand31(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seed); /* proto */
static PyObject *__pyx_pf_3cgl_42utils_rand31(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_44utils_sigmoid(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_46utils_sigmoid_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_48utils_relu(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_50utils_relu_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_52utils_tanh(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_54utils_tanh_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_56utils_step(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_58utils_step_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_60utils_relu_leaky(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_62utils_relu_leaky_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_64utils_relu_smooth(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_66utils_relu_smooth_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_3cgl_68console_set_color(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_color); /* proto */
static PyObject *__pyx_pf_3cgl_70printf_red(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_3cgl_72printf_green(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_3cgl_74printf_gray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_3cgl_76printf_blue(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format); /* proto */
static PyObject *__pyx_pf_3cgl_78console_progress_bar(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_progress, PyObject *__pyx_v_width, PyObject *__pyx_v_prefix, PyObject *__pyx_v_suffix, PyObject *__pyx_v_complete_char, PyObject *__pyx_v_incomplete_char); /* proto */
static PyObject *__pyx_pf_3cgl_80logger_init(CYTHON_UNUSED PyObject *__pyx_self, bool __pyx_v_enable_console_logging); /* proto */
static PyObject *__pyx_pf_3cgl_82logger_shutdown(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_84logger_attach_log_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_3cgl_86logger_detach_log_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_3cgl_88logger_flush(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_90logger_disable_console_logging(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_92logger_enable_console_logging(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_94logger_log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_level, PyObject *__pyx_v_log_format); /* proto */
static PyObject *__pyx_pf_3cgl_96log_trace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_log_format); /* proto */
static PyObject *__pyx_pf_3cgl_98log_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_log_format); /* proto */
static PyObject *__pyx_pf_3cgl_100log_warn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_log_format); /* proto */
static PyObject *__pyx_pf_3cgl_102log_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_log_format); /* proto */
static PyObject *__pyx_pf_3cgl_104log_internal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_log_format); /* proto */
static PyObject *__pyx_pf_3cgl_106utils_crc32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_108utils_crc64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_110utils_rot13(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_112utils_super_fast_hash(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_114deg_to_rad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_deg); /* proto */
static PyObject *__pyx_pf_3cgl_116rad_to_deg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rad); /* proto */
static PyObject *__pyx_pf_3cgl_118float_lerp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a, double __pyx_v_b, double __pyx_v_t); /* proto */
static PyObject *__pyx_pf_3cgl_120float_quadratic_lerp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a, double __pyx_v_b, double __pyx_v_c, double __pyx_v_t); /* proto */
static PyObject *__pyx_pf_3cgl_122float_cubic_lerp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a, double __pyx_v_b, double __pyx_v_c, double __pyx_v_d, double __pyx_v_t); /* proto */
static int __pyx_pf_3cgl_4vec2___init__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, double __pyx_v_x, double __pyx_v_y); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_2__repr__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_4__str__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_6__bytes__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_3cgl_4vec2_8__len__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_10__getitem__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_pf_3cgl_4vec2_12__setitem__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_14__eq__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_16__ne__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other); /* proto */
static Py_hash_t __pyx_pf_3cgl_4vec2_18__hash__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_20__getattr__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static int __pyx_pf_3cgl_4vec2_22__setattr__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_24__add__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_26__sub__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_28__mul__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_30__truediv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_32__floordiv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_34dot(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_36cross(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_38length(struct __pyx_obj_3cgl_vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_40length_squared(struct __pyx_obj_3cgl_vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_42normalized(struct __pyx_obj_3cgl_vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec2 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec2_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec2 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static struct __pyx_obj_3cgl_vec2 *__pyx_pf_3cgl_124vec2_triple_product(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_a, struct __pyx_obj_3cgl_vec2 *__pyx_v_b, struct __pyx_obj_3cgl_vec2 *__pyx_v_c); /* proto */
static int __pyx_pf_3cgl_4vec3___init__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_2__repr__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_4__str__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_6__bytes__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_3cgl_4vec3_8__len__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec3 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_10__getitem__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_pf_3cgl_4vec3_12__setitem__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_14__eq__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_16__ne__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static Py_hash_t __pyx_pf_3cgl_4vec3_18__hash__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_20__getattr__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static int __pyx_pf_3cgl_4vec3_22__setattr__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_24__add__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_26__sub__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_28__mul__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_30__truediv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_32__floordiv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_34dot(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_36cross(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_38length(struct __pyx_obj_3cgl_vec3 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_40length_squared(struct __pyx_obj_3cgl_vec3 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_42normalized(struct __pyx_obj_3cgl_vec3 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec3 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec3_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec3 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_126vec3_reflect(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_n); /* proto */
static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_128vec3_rotate_about_axis(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_v, struct __pyx_obj_3cgl_vec3 *__pyx_v_axis, double __pyx_v_theta); /* proto */
static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_130vec3_triple_product(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c); /* proto */
static int __pyx_pf_3cgl_4vec4___init__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, double __pyx_v_w); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_2__repr__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_4__str__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_6__bytes__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_3cgl_4vec4_8__len__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_10__getitem__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_pf_3cgl_4vec4_12__setitem__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_14__eq__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_16__ne__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other); /* proto */
static Py_hash_t __pyx_pf_3cgl_4vec4_18__hash__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_20__getattr__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static int __pyx_pf_3cgl_4vec4_22__setattr__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_24__add__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_26__sub__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_28__mul__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_30__truediv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_32__floordiv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_34dot(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_36cross(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_38length(struct __pyx_obj_3cgl_vec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_40length_squared(struct __pyx_obj_3cgl_vec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_42normalized(struct __pyx_obj_3cgl_vec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4vec4_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec4 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static struct __pyx_obj_3cgl_vec4 *__pyx_pf_3cgl_132vec4_triple_product(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_a, struct __pyx_obj_3cgl_vec4 *__pyx_v_b, struct __pyx_obj_3cgl_vec4 *__pyx_v_c); /* proto */
static int __pyx_pf_3cgl_5ivec4___init__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z, PyObject *__pyx_v_w); /* proto */
static PyObject *__pyx_pf_3cgl_5ivec4_2__repr__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5ivec4_4__str__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5ivec4_6__getitem__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_pf_3cgl_5ivec4_8__setitem__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
static Py_hash_t __pyx_pf_3cgl_5ivec4_10__hash__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5ivec4_12__getattr__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static int __pyx_pf_3cgl_5ivec4_14__setattr__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_5ivec4_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ivec4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5ivec4_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3cgl_4mat4___init__(struct __pyx_obj_3cgl_mat4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4mat4_2__repr__(struct __pyx_obj_3cgl_mat4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4mat4_4__str__(struct __pyx_obj_3cgl_mat4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4mat4_6__mul__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_other); /* proto */
static Py_hash_t __pyx_pf_3cgl_4mat4_8__hash__(struct __pyx_obj_3cgl_mat4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4mat4_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mat4 *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4mat4_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mat4 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_134mat4_mul(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_a, struct __pyx_obj_3cgl_mat4 *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_3cgl_136mat4_det(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3cgl_138mat4_det_by_lu(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3cgl_140mat4_det_by_gauss(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static struct __pyx_obj_3cgl_vec4 *__pyx_pf_3cgl_142mat4_mul_vec4(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m, struct __pyx_obj_3cgl_vec4 *__pyx_v_v); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_144mat4_inverse(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_146mat4_transpose(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_148mat4_adjoint(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_150mat4_gauss_elim(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3cgl_152mat4_rank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3cgl_154mat4_trace(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_156mat4_rotate_about_axis(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_axis, double __pyx_v_angle); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_158mat4_look_at(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_eye, struct __pyx_obj_3cgl_vec3 *__pyx_v_target, struct __pyx_obj_3cgl_vec3 *__pyx_v_up); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_160mat4_lerp(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_a, struct __pyx_obj_3cgl_mat4 *__pyx_v_b, double __pyx_v_t); /* proto */
static PyObject *__pyx_pf_3cgl_162mat4_decompose_lu(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m, struct __pyx_obj_3cgl_mat4 *__pyx_v_l, struct __pyx_obj_3cgl_mat4 *__pyx_v_u); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_164mat4_perspective(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fov, double __pyx_v_aspect, double __pyx_v_near, double __pyx_v_far); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_166mat4_orthographic(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_left, double __pyx_v_right, double __pyx_v_bottom, double __pyx_v_top, double __pyx_v_near, double __pyx_v_far); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_168mat4_zero(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_170mat4_identity(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_172mat4_scale(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_174mat4_translate(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_176mat4_rotate_x(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_angle); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_178mat4_rotate_y(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_angle); /* proto */
static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_180mat4_rotate_z(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_angle); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_8position___get__(struct __pyx_obj_3cgl_transform *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_9transform_8position_2__set__(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_8rotation___get__(struct __pyx_obj_3cgl_transform *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_9transform_8rotation_2__set__(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_5scale___get__(struct __pyx_obj_3cgl_transform *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_9transform_5scale_2__set__(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_6matrix___get__(struct __pyx_obj_3cgl_transform *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_9transform_6matrix_2__set__(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_value); /* proto */
static int __pyx_pf_3cgl_9transform___cinit__(struct __pyx_obj_3cgl_transform *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_9transform_2__init__(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_position, struct __pyx_obj_3cgl_vec3 *__pyx_v_rotation, struct __pyx_obj_3cgl_vec3 *__pyx_v_scale); /* proto */
static Py_hash_t __pyx_pf_3cgl_9transform_4__hash__(struct __pyx_obj_3cgl_transform *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_6__repr__(struct __pyx_obj_3cgl_transform *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_8__eq__(struct __pyx_obj_3cgl_transform *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_10__str__(struct __pyx_obj_3cgl_transform *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_12load_matrix(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_14set_parent(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_transform *__pyx_v_parent); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_16update(struct __pyx_obj_3cgl_transform *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_transform *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_9transform_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_transform *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_4size___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_5trace___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_11determinant___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_7inverse___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_9transpose___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_8adjugate___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_6matrix___init__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_n); /* proto */
static void __pyx_pf_3cgl_6matrix_2__dealloc__(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_4load_array(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_array, PyObject *__pyx_v_m, PyObject *__pyx_v_n); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_6__add__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, struct __pyx_obj_3cgl_matrix *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_8__sub__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, struct __pyx_obj_3cgl_matrix *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_10__mul__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, struct __pyx_obj_3cgl_matrix *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_12scaled(struct __pyx_obj_3cgl_matrix *__pyx_v_self, double __pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_14scale(struct __pyx_obj_3cgl_matrix *__pyx_v_self, double __pyx_v_other); /* proto */
static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_16calc_transpose(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_18transpose_inplace(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_20load_identity(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_22__getitem__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static int __pyx_pf_3cgl_6matrix_24__setitem__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_key, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_26__repr__(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_28__str__(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_30set_row(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_32__eq__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, struct __pyx_obj_3cgl_matrix *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_34get_row(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_row); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_36set_column(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_column, PyObject *__pyx_v_values); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_38get_column(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_column); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_40is_square(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_42is_symmetric(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_44is_ortho(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_46is_identity(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_48is_zero(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_50calc_inverse(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_52clone(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_54print_mat(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_56gaus_jordan(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_58submatrix(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_column, PyObject *__pyx_v_m, PyObject *__pyx_v_n); /* proto */
static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_60calc_adjugate(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_62make_zero(struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_64randomize(struct __pyx_obj_3cgl_matrix *__pyx_v_self, double __pyx_v_mian, double __pyx_v_maax); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_66__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_matrix *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6matrix_68__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_matrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_6window_14close_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_12key_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_21mouse_button_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_23mouse_position_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_21mouse_scroll_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_25framebuffer_size_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_20drag_n_drop_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_5width___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_6height___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_1x___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_1y___get__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_6window___init__(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_title, bool __pyx_v_decorated); /* proto */
static void __pyx_pf_3cgl_6window_2__dealloc__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_6window_4__hash__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_6destroy(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_8get_id(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_10poll_events(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_12should_close(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_14swap_buffers(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_16set_title(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_title); /* proto */
static PyObject *__pyx_pf_3cgl_6window_18set_size(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height); /* proto */
static PyObject *__pyx_pf_3cgl_6window_20set_position(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_3cgl_6window_22set_hidden(struct __pyx_obj_3cgl_window *__pyx_v_self, bool __pyx_v_hidden); /* proto */
static PyObject *__pyx_pf_3cgl_6window_24set_user_data(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_6window_26get_user_data(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_28get_size(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_30set_close_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_3cgl_6window_32set_key_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_3cgl_6window_34set_mouse_button_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_3cgl_6window_36set_mouse_position_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_3cgl_6window_38set_mouse_scroll_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_3cgl_6window_40set_framebuffer_size_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_3cgl_6window_42set_drag_n_drop_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback); /* proto */
static PyObject *__pyx_pf_3cgl_6window_44get_position(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_46get_framebuffer_size(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_48resecure_callbaks(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_50make_context_current(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_52get_glfw_handle(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_54get_key(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_3cgl_6window_56is_key_pressed(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_key); /* proto */
static PyObject *__pyx_pf_3cgl_6window_58get_mouse_button(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_button); /* proto */
static PyObject *__pyx_pf_3cgl_6window_60get_cursor_pos(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_62__repr__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_64__str__(struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_66__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_window *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6window_68__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_window *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_5image_5width___get__(struct __pyx_obj_3cgl_image *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5image_6height___get__(struct __pyx_obj_3cgl_image *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5image_8channels___get__(struct __pyx_obj_3cgl_image *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5image_4data___get__(struct __pyx_obj_3cgl_image *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_5image___init__(struct __pyx_obj_3cgl_image *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_5image_2__hash__(struct __pyx_obj_3cgl_image *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5image_4__repr__(struct __pyx_obj_3cgl_image *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5image_6__str__(struct __pyx_obj_3cgl_image *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5image_8load_image(struct __pyx_obj_3cgl_image *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_3cgl_5image_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_image *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5image_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_image *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_11mesh_vertex_8position___get__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_11mesh_vertex_8position_2__set__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_11mesh_vertex_6normal___get__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_11mesh_vertex_6normal_2__set__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_11mesh_vertex_19texture_coordinates___get__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_11mesh_vertex_19texture_coordinates_2__set__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_11mesh_vertex_12bone_wieghts___get__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_11mesh_vertex_12bone_wieghts_2__set__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_11mesh_vertex_8bone_ids___get__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_11mesh_vertex_8bone_ids_2__set__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, struct __pyx_obj_3cgl_ivec4 *__pyx_v_value); /* proto */
static int __pyx_pf_3cgl_11mesh_vertex___init__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, PyObject *__pyx_v_c_vertex); /* proto */
static Py_hash_t __pyx_pf_3cgl_11mesh_vertex_2__hash__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11mesh_vertex_4__repr__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11mesh_vertex_6__str__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11mesh_vertex_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11mesh_vertex_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_11index_count___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_16index_count_used___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_7indices___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_8mesh_cpu_7indices_2__set__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_12vertex_count___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_17vertex_count_used___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_8vertices___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_8mesh_cpu___init__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static void __pyx_pf_3cgl_8mesh_cpu_2__dealloc__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_8mesh_cpu_4__hash__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_6__repr__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_8__str__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_10destroy(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_12recalculate_normals(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_14load_obj(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_16add_mesh(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_mesh); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_18add_cube(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, bool __pyx_v_use_texture_coordinates); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_20add_triangle(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_22add_quad(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c, struct __pyx_obj_3cgl_vec3 *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_24add_sphere(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, PyObject *__pyx_v_res_u, PyObject *__pyx_v_res_v); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_26add_cylinder(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec3 *__pyx_v_end, double __pyx_v_radius0, double __pyx_v_radius1, PyObject *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_28offset_vetices(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_offset); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_30scale_vertices(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, double __pyx_v_scale); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_32transform_vertices(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_transform); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_34get_c_initialization_code(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, PyObject *__pyx_v_function_name); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_36__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_cpu_38__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_182mesh_cpu_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index_count, PyObject *__pyx_v_vertex_count); /* proto */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_184mesh_cpu_load_obj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path); /* proto */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_186mesh_cpu_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c); /* proto */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_188mesh_cpu_quad(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c, struct __pyx_obj_3cgl_vec3 *__pyx_v_d); /* proto */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_190mesh_cpu_plane(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_front, struct __pyx_obj_3cgl_vec3 *__pyx_v_right, PyObject *__pyx_v_resolution, double __pyx_v_scale); /* proto */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_192mesh_cpu_cube(CYTHON_UNUSED PyObject *__pyx_self, bool __pyx_v_use_3d_tex_coords); /* proto */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_194mesh_cpu_sphere(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_res_u, PyObject *__pyx_v_res_v); /* proto */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_196mesh_cpu_cylinder(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec3 *__pyx_v_end, double __pyx_v_radius0, double __pyx_v_radius1, PyObject *__pyx_v_resolution); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_5width___get__(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_6height___get__(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_7texture___init__(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static void __pyx_pf_3cgl_7texture_2__dealloc__(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_7texture_4__hash__(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_6__repr__(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_8__eq__(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_10__str__(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_12destroy(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_14load_image(struct __pyx_obj_3cgl_texture *__pyx_v_self, struct __pyx_obj_3cgl_image *__pyx_v_image); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_16bind(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_slot); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_18cubemap_set_face(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_face, struct __pyx_obj_3cgl_image *__pyx_v_image); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_20array_set_layer_data(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_layer, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_22set_data(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_24set_sub_data(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_26set_pixel_data(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_28set_user_data(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_30get_user_data(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_32get_internal_handle(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_34get_size(struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_36set_scaling_method(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_scaling_method); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_38set_wrapping_method(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_wrapping_method); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_texture *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7texture_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_texture *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_198texture_create_from_image(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_image *__pyx_v_image); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_200texture_create_blank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, GLenum __pyx_v_formatf, GLenum __pyx_v_internal_format, GLenum __pyx_v_typef); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_202texture_create_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_depth, GLenum __pyx_v_formatf, GLenum __pyx_v_internal_format, GLenum __pyx_v_typef); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_204texture_creae_3d(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_depth, GLenum __pyx_v_formatf, GLenum __pyx_v_internal_format, GLenum __pyx_v_typef); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_206texture_create_cubemap(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_3cgl_11framebuffer___init__(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static void __pyx_pf_3cgl_11framebuffer_2__dealloc__(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_4__repr__(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_6__str__(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_11framebuffer_8__hash__(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_10destroy(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_12get_id(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_14add_color_attachment(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, struct __pyx_obj_3cgl_texture *__pyx_v_tex); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_11framebuffer_16get_color_attacment(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_18bind(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_20set_user_data(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_22get_user_data(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_24read_pixels(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_width, PyObject *__pyx_v_height); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_26get_mouse_pick_id(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_index); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_11framebuffer_28get_color_texture(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_11framebuffer_30get_depth_texture(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_framebuffer *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_11framebuffer_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static struct __pyx_obj_3cgl_framebuffer *__pyx_pf_3cgl_208framebuffer_create_from_default(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_window *__pyx_v_wnd); /* proto */
static struct __pyx_obj_3cgl_framebuffer *__pyx_pf_3cgl_210framebuffer_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height); /* proto */
static struct __pyx_obj_3cgl_framebuffer *__pyx_pf_3cgl_212framebuffer_create_basic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height); /* proto */
static PyObject *__pyx_pf_3cgl_214gl_clear(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_r, double __pyx_v_g, double __pyx_v_b, double __pyx_v_a); /* proto */
static PyObject *__pyx_pf_3cgl_216gl_init(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_218gl_shutdown(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_220gl_render_screen_quad(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_4name___get__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_8mesh_gpu___init__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static void __pyx_pf_3cgl_8mesh_gpu_2__dealloc__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_4__repr__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_6__str__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_8mesh_gpu_8__hash__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_10destroy(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_12get_id(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_14render(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_16render_instanced(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, PyObject *__pyx_v_count); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_18set_user_data(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_20get_user_data(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_22upload_mesh_cpu(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_mesh, bool __pyx_v_static_draw); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_8mesh_gpu_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_4name___get__(struct __pyx_obj_3cgl_shader *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_6shader___init__(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static void __pyx_pf_3cgl_6shader_2__dealloc__(struct __pyx_obj_3cgl_shader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_4__repr__(struct __pyx_obj_3cgl_shader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_6__str__(struct __pyx_obj_3cgl_shader *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_6shader_8__hash__(struct __pyx_obj_3cgl_shader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_10destroy(struct __pyx_obj_3cgl_shader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_12get_id(struct __pyx_obj_3cgl_shader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_14set_user_data(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_16get_user_data(struct __pyx_obj_3cgl_shader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_18load_from_file(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_vertex_shader_path, PyObject *__pyx_v_fragment_shader_path); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_20load(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_vertex_shader_source, PyObject *__pyx_v_fragment_shader_source); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_22load_compute_from_file(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_compute_shader_path); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_24load_compute(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_compute_shader_source); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_26bind(struct __pyx_obj_3cgl_shader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_28get_uniform_location(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_30set_uniform_mat4(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_obj_3cgl_mat4 *__pyx_v_mat); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_32set_uniform_vec4(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_obj_3cgl_vec4 *__pyx_v_vec); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_34set_uniform_vec3(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_obj_3cgl_vec3 *__pyx_v_vec); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_36set_uniform_vec2(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_obj_3cgl_vec2 *__pyx_v_vec); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_38set_uniform_float(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_40set_uniform_int(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_42set_uniform_bool(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, bool __pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_44set_uniform_doublt(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_46set_uniform_vec2v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, double __pyx_v_x, double __pyx_v_y); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_48set_uniform_vec3v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_50set_uniform_vec4v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, double __pyx_v_w); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_52set_uniform_ivec2v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_54set_uniform_ivec3v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_56set_uniform_ivec4v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z, PyObject *__pyx_v_w); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_58compute_dispatch(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_shader *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_6shader_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_shader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_4size___get__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_4ssbo___init__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static void __pyx_pf_3cgl_4ssbo_2__dealloc__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_4__repr__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_6__str__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_4ssbo_8__hash__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_10bind(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_12bind_base(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_14set_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_data, bool __pyx_v_static_draw); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_16set_sub_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_offset, bool __pyx_v_static_draw); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_18get_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_max_size); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_20get_sub_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_22get_size(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_24set_user_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_26get_user_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_28get_id(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_30destroy(struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ssbo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4ssbo_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ssbo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_222ssbo_copy(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_ssbo *__pyx_v_dst, struct __pyx_obj_3cgl_ssbo *__pyx_v_src, PyObject *__pyx_v_src_offset, PyObject *__pyx_v_dst_offset, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_4size___get__(struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_3ubo___init__(struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static void __pyx_pf_3cgl_3ubo_2__dealloc__(struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_4__repr__(struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_6__str__(struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_3ubo_8__hash__(struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_10destroy(struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_12bind(struct __pyx_obj_3cgl_ubo *__pyx_v_self, struct __pyx_obj_3cgl_shader *__pyx_v_shd, PyObject *__pyx_v_name, PyObject *__pyx_v_binding); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_14set_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self, PyObject *__pyx_v_data, bool __pyx_v_static_draw); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_16set_sub_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_data, bool __pyx_v_static_draw); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_18get_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self, PyObject *__pyx_v_max_size); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_20get_sub_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_22get_size(struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_24set_user_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_26get_user_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_28get_id(struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ubo *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_3ubo_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ubo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_5shape_14vertices_count___get__(struct __pyx_obj_3cgl_shape *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5shape_8vertices___get__(struct __pyx_obj_3cgl_shape *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5shape_8position___get__(struct __pyx_obj_3cgl_shape *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_5shape_8position_2__set__(struct __pyx_obj_3cgl_shape *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_5shape_8rotation___get__(struct __pyx_obj_3cgl_shape *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_5shape_8rotation_2__set__(struct __pyx_obj_3cgl_shape *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_5shape_5scale___get__(struct __pyx_obj_3cgl_shape *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_5shape_5scale_2__set__(struct __pyx_obj_3cgl_shape *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value); /* proto */
static int __pyx_pf_3cgl_5shape___init__(struct __pyx_obj_3cgl_shape *__pyx_v_self, PyObject *__pyx_v_vertices_count); /* proto */
static void __pyx_pf_3cgl_5shape_2__dealloc__(struct __pyx_obj_3cgl_shape *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5shape_4__repr__(struct __pyx_obj_3cgl_shape *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5shape_6__str__(struct __pyx_obj_3cgl_shape *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5shape_8__getitem__(struct __pyx_obj_3cgl_shape *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
static int __pyx_pf_3cgl_5shape_10__setitem__(struct __pyx_obj_3cgl_shape *__pyx_v_self, PyObject *__pyx_v_index, struct __pyx_obj_3cgl_vec3 *__pyx_v_value); /* proto */
static Py_ssize_t __pyx_pf_3cgl_5shape_12__len__(struct __pyx_obj_3cgl_shape *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5shape_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_shape *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5shape_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_shape *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_224sat_collison_overlap_on_axis(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_shape *__pyx_v_b, struct __pyx_obj_3cgl_vec2 *__pyx_v_axis); /* proto */
static PyObject *__pyx_pf_3cgl_226sat_collision_detect(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_shape *__pyx_v_b); /* proto */
static PyObject *__pyx_pf_3cgl_228sat_collision_calculate_axes(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, PyObject *__pyx_v_max_axes); /* proto */
static PyObject *__pyx_pf_3cgl_230is_point_in_circle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_point, double __pyx_v_circle_radius); /* proto */
static PyObject *__pyx_pf_3cgl_232is_point_in_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_point, struct __pyx_obj_3cgl_vec2 *__pyx_v_a, struct __pyx_obj_3cgl_vec2 *__pyx_v_b, struct __pyx_obj_3cgl_vec2 *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_3cgl_234calculate_circumcircle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_a, struct __pyx_obj_3cgl_vec2 *__pyx_v_b, struct __pyx_obj_3cgl_vec2 *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_3cgl_236calculate_super_triangle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vertices, double __pyx_v_padding); /* proto */
static PyObject *__pyx_pf_3cgl_238calculate_bounding_square(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vertices, double __pyx_v_padding); /* proto */
static PyObject *__pyx_pf_3cgl_240calculate_bounding_box(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vertices, double __pyx_v_padding); /* proto */
static PyObject *__pyx_pf_3cgl_242random_gaussian(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_mean, double __pyx_v_std_dev); /* proto */
static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_244gjk_shape_default_support(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_d); /* proto */
static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_246gjk_default_support(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_shape *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_3cgl_248gjk_check_collision_2d(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_shape *__pyx_v_b); /* proto */
static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_250gjk_epa_2d(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_shape *__pyx_v_b, PyObject *__pyx_v_simplex); /* proto */
static PyObject *__pyx_pf_3cgl_252aabb_contains_point(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_min, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_max, struct __pyx_obj_3cgl_vec2 *__pyx_v_point); /* proto */
static PyObject *__pyx_pf_3cgl_254aabb_intersects_aabb(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_min_a, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_max_a, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_min_b, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_max_b); /* proto */
static PyObject *__pyx_pf_3cgl_256triangulate_points_incremental(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_points); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_5width___get__(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_6height___get__(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_10iterations___get__(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_9threshold___get__(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_5bloom_9threshold_2__set__(struct __pyx_obj_3cgl_bloom *__pyx_v_self, double __pyx_v_threshold); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_4knee___get__(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_5bloom_4knee_2__set__(struct __pyx_obj_3cgl_bloom *__pyx_v_self, double __pyx_v_knee); /* proto */
static int __pyx_pf_3cgl_5bloom___init__(struct __pyx_obj_3cgl_bloom *__pyx_v_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_iterations); /* proto */
static void __pyx_pf_3cgl_5bloom_2__dealloc__(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_4__repr__(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_6__str__(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_5bloom_8__hash__(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_10set_threshold(struct __pyx_obj_3cgl_bloom *__pyx_v_self, double __pyx_v_threshold); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_12get_threshold(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_14set_knee(struct __pyx_obj_3cgl_bloom *__pyx_v_self, double __pyx_v_knee); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_16get_knee(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_18set_offset(struct __pyx_obj_3cgl_bloom *__pyx_v_self, double __pyx_v_offset_x, double __pyx_v_offset_y); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_20apply(struct __pyx_obj_3cgl_bloom *__pyx_v_self, struct __pyx_obj_3cgl_texture *__pyx_v_tex); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_22apply2(struct __pyx_obj_3cgl_bloom *__pyx_v_self, struct __pyx_obj_3cgl_texture *__pyx_v_texture_src, struct __pyx_obj_3cgl_texture *__pyx_v_texture_dst); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_5bloom_24get_lod_texture(struct __pyx_obj_3cgl_bloom *__pyx_v_self, PyObject *__pyx_v_lod); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_5bloom_26get_prefiltered_texture(struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_bloom *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_5bloom_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_bloom *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_12tile_count_x___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_12tile_count_y___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_11tile_size_x___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_11tile_size_y___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_12ssbo_binding___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_11auto_upload___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_7tilemap_11auto_upload_2__set__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, bool __pyx_v_auto_upload); /* proto */
static int __pyx_pf_3cgl_7tilemap___init__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_tile_count_x, PyObject *__pyx_v_tile_count_y, PyObject *__pyx_v_tile_size_x, PyObject *__pyx_v_tile_size_y, PyObject *__pyx_v_ssbo_binding); /* proto */
static void __pyx_pf_3cgl_7tilemap_2__dealloc__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_4__repr__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_6__str__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_7tilemap_8__hash__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_10set_auto_upload(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, bool __pyx_v_auto_upload); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_12get_auto_upload(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_14upload(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_16set_tile_color(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_tile_x, PyObject *__pyx_v_tile_y, double __pyx_v_r, double __pyx_v_g, double __pyx_v_b); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_18set_tile_texture_from_array(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_tile_x, PyObject *__pyx_v_tile_y, PyObject *__pyx_v_texture_index); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_20set_tile_texture_from_tileset(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_tile_x, PyObject *__pyx_v_tile_y, double __pyx_v_texture_x_min, double __pyx_v_texture_y_min, double __pyx_v_texture_x_max, double __pyx_v_texture_y_max); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_22set_all_tile_color(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, double __pyx_v_r, double __pyx_v_g, double __pyx_v_b); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_24set_all_tile_texture_from_array(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_texture_index); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_26set_all_tile_texture_from_tileset(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, double __pyx_v_texture_x_min, double __pyx_v_texture_y_min, double __pyx_v_texture_x_max, double __pyx_v_texture_y_max); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_28clear_tile(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_tile_x, PyObject *__pyx_v_tile_y); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_30clear_all_tile(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_32render(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, double __pyx_v_scale_x, double __pyx_v_scale_y, double __pyx_v_offset_x, double __pyx_v_offset_y, struct __pyx_obj_3cgl_texture *__pyx_v_tex); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_34reset(struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_36__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_tilemap *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7tilemap_38__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_tilemap *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_4size___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_7bearing___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_7advance___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_15normalized_size___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_17normalized_offset___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_18bearing_normalized___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_18advance_normalized___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_9character___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_14font_character___init__(struct __pyx_obj_3cgl_font_character *__pyx_v_self, struct CGL_font_character __pyx_v_c_font_character); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_2__repr__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_4__str__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static Py_hash_t __pyx_pf_3cgl_14font_character_6__hash__(struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_font_character *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_14font_character_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_font_character *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_3cgl_4font___init__(struct __pyx_obj_3cgl_font *__pyx_v_self); /* proto */
static void __pyx_pf_3cgl_4font_2__dealloc__(struct __pyx_obj_3cgl_font *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4font_4destroy(struct __pyx_obj_3cgl_font *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4font_6load_from_memory(struct __pyx_obj_3cgl_font *__pyx_v_self, PyObject *__pyx_v_data); /* proto */
static PyObject *__pyx_pf_3cgl_4font_8load(struct __pyx_obj_3cgl_font *__pyx_v_self, PyObject *__pyx_v_path); /* proto */
static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_4font_10get_atlas(struct __pyx_obj_3cgl_font *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4font_12build_atlas(struct __pyx_obj_3cgl_font *__pyx_v_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_font_size); /* proto */
static PyObject *__pyx_pf_3cgl_4font_14bake_to_texture(struct __pyx_obj_3cgl_font *__pyx_v_self, PyObject *__pyx_v_strng); /* proto */
static PyObject *__pyx_pf_3cgl_4font_16get_characters(struct __pyx_obj_3cgl_font *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4font_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_font *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_4font_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_font *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_258text_init(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_260text_shutdown(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_3cgl_7widgets___init__(CYTHON_UNUSED struct __pyx_obj_3cgl_widgets *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_2create_context(PyObject *__pyx_v_max_vertices, PyObject *__pyx_v_max_indices); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_4destroy_context(PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_6get_current_context(void); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_8set_current_context(PyObject *__pyx_v_ctx); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_10init(void); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_12shutdown(void); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_14begin(void); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_16begin_int(double __pyx_v_scale_x, double __pyx_v_scale_y, double __pyx_v_offset_x, double __pyx_v_offset_y); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_18end(void); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_20flush(void); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_22flush_if_required(void); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_24add_vertex(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_26add_mesh(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_28add_vertex_p(struct __pyx_obj_3cgl_vec3 *__pyx_v_v); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_30add_vertex_p3f(double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_32add_vertex_pt(struct __pyx_obj_3cgl_vec3 *__pyx_v_v, struct __pyx_obj_3cgl_vec2 *__pyx_v_t); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_34add_vertex_p3ft(double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, struct __pyx_obj_3cgl_vec2 *__pyx_v_t); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_36add_vertex_pt2f(struct __pyx_obj_3cgl_vec3 *__pyx_v_v, double __pyx_v_t0, double __pyx_v_t1); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_38add_vertex_p3ft2f(double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, double __pyx_v_u, double __pyx_v_v); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_40set_stroke_color(struct __pyx_obj_3cgl_vec4 *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_42set_stroke_colorf(double __pyx_v_r, double __pyx_v_g, double __pyx_v_b, double __pyx_v_a); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_44set_stroke_thickness(double __pyx_v_t); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_46set_fill_color(struct __pyx_obj_3cgl_vec4 *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_48set_fill_colorf(double __pyx_v_r, double __pyx_v_g, double __pyx_v_b, double __pyx_v_a); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_50set_fill_mode(bool __pyx_v_enebled); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_52set_projection_matrix(struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_54enable_diffuse_shading(struct __pyx_obj_3cgl_vec3 *__pyx_v_light_pos, struct __pyx_obj_3cgl_vec3 *__pyx_v_light_color); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_56disable_diffuse_shading(void); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_58set_view_matrix(struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_60set_model_matrix(struct __pyx_obj_3cgl_mat4 *__pyx_v_m); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_62set_texture(struct __pyx_obj_3cgl_texture *__pyx_v_tex); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_64set_font_texture(struct __pyx_obj_3cgl_texture *__pyx_v_tex); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_66set_texture_coordinate_so(double __pyx_v_scale_x, double __pyx_v_scale_y, double __pyx_v_offset_x, double __pyx_v_offset_y); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_68apply_transformations_on_cpu(void); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_70apply_transformations_on_gpu(void); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_72add_triangle(struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_74add_quad(struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c, struct __pyx_obj_3cgl_vec3 *__pyx_v_d); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_76add_quad_8f(double __pyx_v_a_x, double __pyx_v_a_y, double __pyx_v_b_x, double __pyx_v_b_y, double __pyx_v_c_x, double __pyx_v_c_y, double __pyx_v_d_x, double __pyx_v_d_y); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_78add_line(struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec3 *__pyx_v_end); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_80add_line2f(double __pyx_v_start_x, double __pyx_v_start_y, double __pyx_v_end_x, double __pyx_v_end_y); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_82add_rect(struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec2 *__pyx_v_size); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_84add_rect2f(double __pyx_v_start_x, double __pyx_v_start_y, double __pyx_v_size_x, double __pyx_v_size_y); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_86add_circle(struct __pyx_obj_3cgl_vec3 *__pyx_v_position, double __pyx_v_radius); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_88add_circle2f(double __pyx_v_position_x, double __pyx_v_position_y, double __pyx_v_radius); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_90add_circler(struct __pyx_obj_3cgl_vec3 *__pyx_v_position, double __pyx_v_radius, PyObject *__pyx_v_segments); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_92add_circler2fr(double __pyx_v_position_x, double __pyx_v_position_y, double __pyx_v_radius, PyObject *__pyx_v_segments); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_94add_oval(struct __pyx_obj_3cgl_vec3 *__pyx_v_position, struct __pyx_obj_3cgl_vec2 *__pyx_v_radius); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_96add_oval2f(double __pyx_v_position_x, double __pyx_v_position_y, double __pyx_v_radius_x, double __pyx_v_radius_y); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_98add_arc2f(double __pyx_v_position_x, double __pyx_v_position_y, double __pyx_v_radius, double __pyx_v_start_angle, double __pyx_v_end_angle, PyObject *__pyx_v_segments); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_100add_character(PyObject *__pyx_v_ch, double __pyx_v_x, double __pyx_v_y, double __pyx_v_sx, double __pyx_v_sy); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_102add_string(PyObject *__pyx_v_st, double __pyx_v_x, double __pyx_v_y, double __pyx_v_sx, double __pyx_v_sy); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_104add_cubic_bazier(struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec3 *__pyx_v_end, struct __pyx_obj_3cgl_vec3 *__pyx_v_control_1, struct __pyx_obj_3cgl_vec3 *__pyx_v_control_2, PyObject *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_106add_cubic_bazier2v(struct __pyx_obj_3cgl_vec2 *__pyx_v_start, struct __pyx_obj_3cgl_vec2 *__pyx_v_end, struct __pyx_obj_3cgl_vec2 *__pyx_v_control_1, struct __pyx_obj_3cgl_vec2 *__pyx_v_control_2, PyObject *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_108add_cubic_bazier2f(double __pyx_v_start_x, double __pyx_v_start_y, double __pyx_v_end_x, double __pyx_v_end_y, double __pyx_v_control_1_x, double __pyx_v_control_1_y, double __pyx_v_control_2_x, double __pyx_v_control_2_y, PyObject *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_110add_cubic_bazier_points(struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec3 *__pyx_v_end, struct __pyx_obj_3cgl_vec3 *__pyx_v_control_1, struct __pyx_obj_3cgl_vec3 *__pyx_v_control_2, PyObject *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_112add_cubic_bazier_points2v(struct __pyx_obj_3cgl_vec2 *__pyx_v_start, struct __pyx_obj_3cgl_vec2 *__pyx_v_end, struct __pyx_obj_3cgl_vec2 *__pyx_v_control_1, struct __pyx_obj_3cgl_vec2 *__pyx_v_control_2, PyObject *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_114add_cubic_bazier_points2f(double __pyx_v_start_x, double __pyx_v_start_y, double __pyx_v_end_x, double __pyx_v_end_y, double __pyx_v_control_1_x, double __pyx_v_control_1_y, double __pyx_v_control_2_x, double __pyx_v_control_2_y, PyObject *__pyx_v_res); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_116add_shape_out_line(struct __pyx_obj_3cgl_shape *__pyx_v_shape); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_118add_string_with_font(PyObject *__pyx_v_st, struct __pyx_obj_3cgl_font *__pyx_v_font, double __pyx_v_x, double __pyx_v_y, double __pyx_v_sx, double __pyx_v_scale_y); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_120__reduce_cython__(struct __pyx_obj_3cgl_widgets *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_7widgets_122__setstate_cython__(struct __pyx_obj_3cgl_widgets *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_4type___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_12noise_params_4type_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_12fractal_type___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_12noise_params_12fractal_type_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_7octaves___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_12noise_params_7octaves_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_10lacunarity___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_12noise_params_10lacunarity_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_4gain___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_12noise_params_4gain_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_9frequency___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_12noise_params_9frequency_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_17weighted_strength___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_12noise_params_17weighted_strength_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, double __pyx_v_value); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_18ping_pong_strength___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static int __pyx_pf_3cgl_12noise_params_18ping_pong_strength_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, double __pyx_v_value); /* proto */
static int __pyx_pf_3cgl_12noise_params___init__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_2__repr__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_4__str__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_noise_params *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_3cgl_12noise_params_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_noise_params *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_3cgl_262noise_init(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_264noise_shutdown(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_3cgl_266noise_get(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, struct __pyx_obj_3cgl_noise_params *__pyx_v_np); /* proto */
static PyObject *__pyx_pf_3cgl_268noise_perlin(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_270noise_opensimplex(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_272noise_opensimplex2s(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_274noise_value(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_276noise_valuecubic(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_278noise_worley(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z); /* proto */
static PyObject *__pyx_pf_3cgl_280__pyx_unpickle_widgets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_tp_new_3cgl_vec2(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_vec3(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_vec4(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_ivec4(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_mat4(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_transform(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_matrix(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_window(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_image(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_mesh_vertex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_mesh_cpu(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_texture(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_framebuffer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_mesh_gpu(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_shader(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_ssbo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_ubo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_shape(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_bloom(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_tilemap(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_font_character(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_font(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_widgets(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_3cgl_noise_params(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyString_Type_encode = {0, &__pyx_n_s_encode, 0, 0, 0};
static PyObject *__pyx_float_0_0;
static PyObject *__pyx_float_1_0;
static PyObject *__pyx_float_180_0;
static PyObject *__pyx_float_1_41421356237309504880;
static PyObject *__pyx_float_1_57079632679489661923;
static PyObject *__pyx_float_1_73205080756887729352;
static PyObject *__pyx_float_2_23606797749978969640;
static PyObject *__pyx_float_2_44948974278317809820;
static PyObject *__pyx_float_2_64575131106459059050;
static PyObject *__pyx_float_2_71828182845904523536;
static PyObject *__pyx_float_2_82842712474619009760;
static PyObject *__pyx_float_3_14159265358979323846;
static PyObject *__pyx_float_6_28318530717958647692;
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_3;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_5;
static PyObject *__pyx_int_6;
static PyObject *__pyx_int_7;
static PyObject *__pyx_int_32;
static PyObject *__pyx_int_39;
static PyObject *__pyx_int_44;
static PyObject *__pyx_int_45;
static PyObject *__pyx_int_46;
static PyObject *__pyx_int_47;
static PyObject *__pyx_int_48;
static PyObject *__pyx_int_49;
static PyObject *__pyx_int_50;
static PyObject *__pyx_int_51;
static PyObject *__pyx_int_52;
static PyObject *__pyx_int_53;
static PyObject *__pyx_int_54;
static PyObject *__pyx_int_55;
static PyObject *__pyx_int_56;
static PyObject *__pyx_int_57;
static PyObject *__pyx_int_59;
static PyObject *__pyx_int_61;
static PyObject *__pyx_int_65;
static PyObject *__pyx_int_66;
static PyObject *__pyx_int_67;
static PyObject *__pyx_int_68;
static PyObject *__pyx_int_69;
static PyObject *__pyx_int_70;
static PyObject *__pyx_int_71;
static PyObject *__pyx_int_72;
static PyObject *__pyx_int_73;
static PyObject *__pyx_int_74;
static PyObject *__pyx_int_75;
static PyObject *__pyx_int_76;
static PyObject *__pyx_int_77;
static PyObject *__pyx_int_78;
static PyObject *__pyx_int_79;
static PyObject *__pyx_int_80;
static PyObject *__pyx_int_81;
static PyObject *__pyx_int_82;
static PyObject *__pyx_int_83;
static PyObject *__pyx_int_84;
static PyObject *__pyx_int_85;
static PyObject *__pyx_int_86;
static PyObject *__pyx_int_87;
static PyObject *__pyx_int_88;
static PyObject *__pyx_int_89;
static PyObject *__pyx_int_90;
static PyObject *__pyx_int_91;
static PyObject *__pyx_int_92;
static PyObject *__pyx_int_93;
static PyObject *__pyx_int_96;
static PyObject *__pyx_int_161;
static PyObject *__pyx_int_162;
static PyObject *__pyx_int_256;
static PyObject *__pyx_int_257;
static PyObject *__pyx_int_258;
static PyObject *__pyx_int_259;
static PyObject *__pyx_int_260;
static PyObject *__pyx_int_261;
static PyObject *__pyx_int_262;
static PyObject *__pyx_int_263;
static PyObject *__pyx_int_264;
static PyObject *__pyx_int_265;
static PyObject *__pyx_int_266;
static PyObject *__pyx_int_267;
static PyObject *__pyx_int_268;
static PyObject *__pyx_int_269;
static PyObject *__pyx_int_280;
static PyObject *__pyx_int_281;
static PyObject *__pyx_int_282;
static PyObject *__pyx_int_283;
static PyObject *__pyx_int_284;
static PyObject *__pyx_int_290;
static PyObject *__pyx_int_291;
static PyObject *__pyx_int_292;
static PyObject *__pyx_int_293;
static PyObject *__pyx_int_294;
static PyObject *__pyx_int_295;
static PyObject *__pyx_int_296;
static PyObject *__pyx_int_297;
static PyObject *__pyx_int_298;
static PyObject *__pyx_int_299;
static PyObject *__pyx_int_300;
static PyObject *__pyx_int_301;
static PyObject *__pyx_int_302;
static PyObject *__pyx_int_303;
static PyObject *__pyx_int_304;
static PyObject *__pyx_int_305;
static PyObject *__pyx_int_306;
static PyObject *__pyx_int_307;
static PyObject *__pyx_int_308;
static PyObject *__pyx_int_309;
static PyObject *__pyx_int_310;
static PyObject *__pyx_int_311;
static PyObject *__pyx_int_312;
static PyObject *__pyx_int_313;
static PyObject *__pyx_int_314;
static PyObject *__pyx_int_320;
static PyObject *__pyx_int_321;
static PyObject *__pyx_int_322;
static PyObject *__pyx_int_323;
static PyObject *__pyx_int_324;
static PyObject *__pyx_int_325;
static PyObject *__pyx_int_326;
static PyObject *__pyx_int_327;
static PyObject *__pyx_int_328;
static PyObject *__pyx_int_329;
static PyObject *__pyx_int_330;
static PyObject *__pyx_int_331;
static PyObject *__pyx_int_332;
static PyObject *__pyx_int_333;
static PyObject *__pyx_int_334;
static PyObject *__pyx_int_335;
static PyObject *__pyx_int_336;
static PyObject *__pyx_int_340;
static PyObject *__pyx_int_341;
static PyObject *__pyx_int_342;
static PyObject *__pyx_int_343;
static PyObject *__pyx_int_344;
static PyObject *__pyx_int_345;
static PyObject *__pyx_int_346;
static PyObject *__pyx_int_347;
static PyObject *__pyx_int_348;
static PyObject *__pyx_int_4096;
static PyObject *__pyx_int_10000;
static PyObject *__pyx_int_34069;
static PyObject *__pyx_int_34070;
static PyObject *__pyx_int_34071;
static PyObject *__pyx_int_34072;
static PyObject *__pyx_int_34073;
static PyObject *__pyx_int_34074;
static PyObject *__pyx_int_100000000;
static PyObject *__pyx_int_222419149;
static PyObject *__pyx_int_228825662;
static PyObject *__pyx_int_238750788;
static PyObject *__pyx_int_neg_1;
static struct __pyx_obj_3cgl_noise_params *__pyx_k__85;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
static PyObject *__pyx_tuple__60;
static PyObject *__pyx_tuple__61;
static PyObject *__pyx_tuple__62;
static PyObject *__pyx_tuple__63;
static PyObject *__pyx_tuple__64;
static PyObject *__pyx_tuple__65;
static PyObject *__pyx_tuple__66;
static PyObject *__pyx_tuple__67;
static PyObject *__pyx_tuple__68;
static PyObject *__pyx_tuple__69;
static PyObject *__pyx_tuple__70;
static PyObject *__pyx_tuple__71;
static PyObject *__pyx_tuple__72;
static PyObject *__pyx_tuple__73;
static PyObject *__pyx_tuple__74;
static PyObject *__pyx_tuple__75;
static PyObject *__pyx_tuple__76;
static PyObject *__pyx_tuple__77;
static PyObject *__pyx_tuple__78;
static PyObject *__pyx_tuple__79;
static PyObject *__pyx_tuple__80;
static PyObject *__pyx_tuple__81;
static PyObject *__pyx_tuple__82;
static PyObject *__pyx_tuple__83;
static PyObject *__pyx_tuple__84;
static PyObject *__pyx_tuple__86;
static PyObject *__pyx_tuple__87;
static PyObject *__pyx_tuple__88;
static PyObject *__pyx_tuple__89;
static PyObject *__pyx_tuple__90;
static PyObject *__pyx_tuple__91;
static PyObject *__pyx_tuple__92;
static PyObject *__pyx_tuple__93;
static PyObject *__pyx_tuple__94;
static PyObject *__pyx_tuple__95;
static PyObject *__pyx_tuple__96;
static PyObject *__pyx_tuple__97;
static PyObject *__pyx_tuple__98;
static PyObject *__pyx_tuple__99;
static PyObject *__pyx_tuple__100;
static PyObject *__pyx_tuple__101;
static PyObject *__pyx_tuple__102;
static PyObject *__pyx_tuple__103;
static PyObject *__pyx_tuple__104;
static PyObject *__pyx_tuple__105;
static PyObject *__pyx_tuple__107;
static PyObject *__pyx_tuple__111;
static PyObject *__pyx_tuple__113;
static PyObject *__pyx_tuple__115;
static PyObject *__pyx_tuple__117;
static PyObject *__pyx_tuple__119;
static PyObject *__pyx_tuple__122;
static PyObject *__pyx_tuple__126;
static PyObject *__pyx_tuple__128;
static PyObject *__pyx_tuple__130;
static PyObject *__pyx_tuple__132;
static PyObject *__pyx_tuple__134;
static PyObject *__pyx_tuple__138;
static PyObject *__pyx_tuple__141;
static PyObject *__pyx_tuple__143;
static PyObject *__pyx_tuple__145;
static PyObject *__pyx_tuple__147;
static PyObject *__pyx_tuple__149;
static PyObject *__pyx_tuple__151;
static PyObject *__pyx_tuple__153;
static PyObject *__pyx_tuple__155;
static PyObject *__pyx_tuple__157;
static PyObject *__pyx_tuple__159;
static PyObject *__pyx_tuple__161;
static PyObject *__pyx_tuple__163;
static PyObject *__pyx_tuple__165;
static PyObject *__pyx_tuple__167;
static PyObject *__pyx_tuple__169;
static PyObject *__pyx_tuple__171;
static PyObject *__pyx_tuple__173;
static PyObject *__pyx_tuple__175;
static PyObject *__pyx_tuple__177;
static PyObject *__pyx_tuple__180;
static PyObject *__pyx_tuple__182;
static PyObject *__pyx_tuple__187;
static PyObject *__pyx_tuple__189;
static PyObject *__pyx_tuple__191;
static PyObject *__pyx_tuple__193;
static PyObject *__pyx_tuple__195;
static PyObject *__pyx_tuple__197;
static PyObject *__pyx_tuple__199;
static PyObject *__pyx_tuple__201;
static PyObject *__pyx_tuple__203;
static PyObject *__pyx_tuple__205;
static PyObject *__pyx_tuple__207;
static PyObject *__pyx_tuple__209;
static PyObject *__pyx_tuple__211;
static PyObject *__pyx_tuple__213;
static PyObject *__pyx_tuple__215;
static PyObject *__pyx_tuple__217;
static PyObject *__pyx_tuple__219;
static PyObject *__pyx_tuple__221;
static PyObject *__pyx_tuple__223;
static PyObject *__pyx_tuple__225;
static PyObject *__pyx_tuple__227;
static PyObject *__pyx_tuple__229;
static PyObject *__pyx_tuple__231;
static PyObject *__pyx_tuple__233;
static PyObject *__pyx_tuple__235;
static PyObject *__pyx_tuple__237;
static PyObject *__pyx_tuple__239;
static PyObject *__pyx_tuple__241;
static PyObject *__pyx_tuple__243;
static PyObject *__pyx_tuple__245;
static PyObject *__pyx_tuple__247;
static PyObject *__pyx_tuple__249;
static PyObject *__pyx_tuple__251;
static PyObject *__pyx_tuple__253;
static PyObject *__pyx_tuple__255;
static PyObject *__pyx_tuple__257;
static PyObject *__pyx_tuple__259;
static PyObject *__pyx_tuple__261;
static PyObject *__pyx_tuple__263;
static PyObject *__pyx_tuple__265;
static PyObject *__pyx_tuple__267;
static PyObject *__pyx_tuple__269;
static PyObject *__pyx_tuple__271;
static PyObject *__pyx_tuple__273;
static PyObject *__pyx_tuple__275;
static PyObject *__pyx_tuple__277;
static PyObject *__pyx_tuple__279;
static PyObject *__pyx_tuple__281;
static PyObject *__pyx_tuple__283;
static PyObject *__pyx_tuple__285;
static PyObject *__pyx_tuple__287;
static PyObject *__pyx_tuple__289;
static PyObject *__pyx_tuple__291;
static PyObject *__pyx_tuple__293;
static PyObject *__pyx_tuple__295;
static PyObject *__pyx_tuple__297;
static PyObject *__pyx_tuple__299;
static PyObject *__pyx_tuple__301;
static PyObject *__pyx_tuple__303;
static PyObject *__pyx_tuple__305;
static PyObject *__pyx_tuple__307;
static PyObject *__pyx_tuple__312;
static PyObject *__pyx_tuple__314;
static PyObject *__pyx_tuple__316;
static PyObject *__pyx_tuple__318;
static PyObject *__pyx_tuple__320;
static PyObject *__pyx_tuple__322;
static PyObject *__pyx_tuple__324;
static PyObject *__pyx_tuple__326;
static PyObject *__pyx_tuple__328;
static PyObject *__pyx_tuple__330;
static PyObject *__pyx_tuple__332;
static PyObject *__pyx_tuple__334;
static PyObject *__pyx_tuple__336;
static PyObject *__pyx_tuple__338;
static PyObject *__pyx_tuple__340;
static PyObject *__pyx_tuple__342;
static PyObject *__pyx_tuple__344;
static PyObject *__pyx_tuple__346;
static PyObject *__pyx_tuple__350;
static PyObject *__pyx_tuple__352;
static PyObject *__pyx_tuple__355;
static PyObject *__pyx_tuple__360;
static PyObject *__pyx_tuple__365;
static PyObject *__pyx_tuple__367;
static PyObject *__pyx_tuple__369;
static PyObject *__pyx_tuple__371;
static PyObject *__pyx_tuple__373;
static PyObject *__pyx_tuple__375;
static PyObject *__pyx_tuple__377;
static PyObject *__pyx_tuple__379;
static PyObject *__pyx_tuple__381;
static PyObject *__pyx_tuple__383;
static PyObject *__pyx_tuple__385;
static PyObject *__pyx_tuple__387;
static PyObject *__pyx_tuple__389;
static PyObject *__pyx_tuple__391;
static PyObject *__pyx_tuple__393;
static PyObject *__pyx_tuple__395;
static PyObject *__pyx_tuple__398;
static PyObject *__pyx_tuple__400;
static PyObject *__pyx_tuple__402;
static PyObject *__pyx_tuple__404;
static PyObject *__pyx_tuple__406;
static PyObject *__pyx_tuple__410;
static PyObject *__pyx_tuple__412;
static PyObject *__pyx_tuple__414;
static PyObject *__pyx_tuple__416;
static PyObject *__pyx_tuple__418;
static PyObject *__pyx_tuple__420;
static PyObject *__pyx_tuple__422;
static PyObject *__pyx_tuple__424;
static PyObject *__pyx_tuple__426;
static PyObject *__pyx_tuple__428;
static PyObject *__pyx_tuple__430;
static PyObject *__pyx_tuple__432;
static PyObject *__pyx_tuple__434;
static PyObject *__pyx_tuple__436;
static PyObject *__pyx_tuple__438;
static PyObject *__pyx_tuple__440;
static PyObject *__pyx_tuple__442;
static PyObject *__pyx_tuple__444;
static PyObject *__pyx_tuple__446;
static PyObject *__pyx_tuple__448;
static PyObject *__pyx_tuple__450;
static PyObject *__pyx_tuple__452;
static PyObject *__pyx_tuple__454;
static PyObject *__pyx_tuple__456;
static PyObject *__pyx_tuple__460;
static PyObject *__pyx_tuple__462;
static PyObject *__pyx_tuple__464;
static PyObject *__pyx_tuple__466;
static PyObject *__pyx_tuple__468;
static PyObject *__pyx_tuple__470;
static PyObject *__pyx_tuple__472;
static PyObject *__pyx_tuple__474;
static PyObject *__pyx_codeobj__106;
static PyObject *__pyx_codeobj__108;
static PyObject *__pyx_codeobj__109;
static PyObject *__pyx_codeobj__110;
static PyObject *__pyx_codeobj__112;
static PyObject *__pyx_codeobj__114;
static PyObject *__pyx_codeobj__116;
static PyObject *__pyx_codeobj__118;
static PyObject *__pyx_codeobj__120;
static PyObject *__pyx_codeobj__121;
static PyObject *__pyx_codeobj__123;
static PyObject *__pyx_codeobj__124;
static PyObject *__pyx_codeobj__125;
static PyObject *__pyx_codeobj__127;
static PyObject *__pyx_codeobj__129;
static PyObject *__pyx_codeobj__131;
static PyObject *__pyx_codeobj__133;
static PyObject *__pyx_codeobj__135;
static PyObject *__pyx_codeobj__136;
static PyObject *__pyx_codeobj__137;
static PyObject *__pyx_codeobj__139;
static PyObject *__pyx_codeobj__140;
static PyObject *__pyx_codeobj__142;
static PyObject *__pyx_codeobj__144;
static PyObject *__pyx_codeobj__146;
static PyObject *__pyx_codeobj__148;
static PyObject *__pyx_codeobj__150;
static PyObject *__pyx_codeobj__152;
static PyObject *__pyx_codeobj__154;
static PyObject *__pyx_codeobj__156;
static PyObject *__pyx_codeobj__158;
static PyObject *__pyx_codeobj__160;
static PyObject *__pyx_codeobj__162;
static PyObject *__pyx_codeobj__164;
static PyObject *__pyx_codeobj__166;
static PyObject *__pyx_codeobj__168;
static PyObject *__pyx_codeobj__170;
static PyObject *__pyx_codeobj__172;
static PyObject *__pyx_codeobj__174;
static PyObject *__pyx_codeobj__176;
static PyObject *__pyx_codeobj__178;
static PyObject *__pyx_codeobj__179;
static PyObject *__pyx_codeobj__181;
static PyObject *__pyx_codeobj__183;
static PyObject *__pyx_codeobj__184;
static PyObject *__pyx_codeobj__185;
static PyObject *__pyx_codeobj__186;
static PyObject *__pyx_codeobj__188;
static PyObject *__pyx_codeobj__190;
static PyObject *__pyx_codeobj__192;
static PyObject *__pyx_codeobj__194;
static PyObject *__pyx_codeobj__196;
static PyObject *__pyx_codeobj__198;
static PyObject *__pyx_codeobj__200;
static PyObject *__pyx_codeobj__202;
static PyObject *__pyx_codeobj__204;
static PyObject *__pyx_codeobj__206;
static PyObject *__pyx_codeobj__208;
static PyObject *__pyx_codeobj__210;
static PyObject *__pyx_codeobj__212;
static PyObject *__pyx_codeobj__214;
static PyObject *__pyx_codeobj__216;
static PyObject *__pyx_codeobj__218;
static PyObject *__pyx_codeobj__220;
static PyObject *__pyx_codeobj__222;
static PyObject *__pyx_codeobj__224;
static PyObject *__pyx_codeobj__226;
static PyObject *__pyx_codeobj__228;
static PyObject *__pyx_codeobj__230;
static PyObject *__pyx_codeobj__232;
static PyObject *__pyx_codeobj__234;
static PyObject *__pyx_codeobj__236;
static PyObject *__pyx_codeobj__238;
static PyObject *__pyx_codeobj__240;
static PyObject *__pyx_codeobj__242;
static PyObject *__pyx_codeobj__244;
static PyObject *__pyx_codeobj__246;
static PyObject *__pyx_codeobj__248;
static PyObject *__pyx_codeobj__250;
static PyObject *__pyx_codeobj__252;
static PyObject *__pyx_codeobj__254;
static PyObject *__pyx_codeobj__256;
static PyObject *__pyx_codeobj__258;
static PyObject *__pyx_codeobj__260;
static PyObject *__pyx_codeobj__262;
static PyObject *__pyx_codeobj__264;
static PyObject *__pyx_codeobj__266;
static PyObject *__pyx_codeobj__268;
static PyObject *__pyx_codeobj__270;
static PyObject *__pyx_codeobj__272;
static PyObject *__pyx_codeobj__274;
static PyObject *__pyx_codeobj__276;
static PyObject *__pyx_codeobj__278;
static PyObject *__pyx_codeobj__280;
static PyObject *__pyx_codeobj__282;
static PyObject *__pyx_codeobj__284;
static PyObject *__pyx_codeobj__286;
static PyObject *__pyx_codeobj__288;
static PyObject *__pyx_codeobj__290;
static PyObject *__pyx_codeobj__292;
static PyObject *__pyx_codeobj__294;
static PyObject *__pyx_codeobj__296;
static PyObject *__pyx_codeobj__298;
static PyObject *__pyx_codeobj__300;
static PyObject *__pyx_codeobj__302;
static PyObject *__pyx_codeobj__304;
static PyObject *__pyx_codeobj__306;
static PyObject *__pyx_codeobj__308;
static PyObject *__pyx_codeobj__309;
static PyObject *__pyx_codeobj__310;
static PyObject *__pyx_codeobj__311;
static PyObject *__pyx_codeobj__313;
static PyObject *__pyx_codeobj__315;
static PyObject *__pyx_codeobj__317;
static PyObject *__pyx_codeobj__319;
static PyObject *__pyx_codeobj__321;
static PyObject *__pyx_codeobj__323;
static PyObject *__pyx_codeobj__325;
static PyObject *__pyx_codeobj__327;
static PyObject *__pyx_codeobj__329;
static PyObject *__pyx_codeobj__331;
static PyObject *__pyx_codeobj__333;
static PyObject *__pyx_codeobj__335;
static PyObject *__pyx_codeobj__337;
static PyObject *__pyx_codeobj__339;
static PyObject *__pyx_codeobj__341;
static PyObject *__pyx_codeobj__343;
static PyObject *__pyx_codeobj__345;
static PyObject *__pyx_codeobj__347;
static PyObject *__pyx_codeobj__348;
static PyObject *__pyx_codeobj__349;
static PyObject *__pyx_codeobj__351;
static PyObject *__pyx_codeobj__353;
static PyObject *__pyx_codeobj__354;
static PyObject *__pyx_codeobj__356;
static PyObject *__pyx_codeobj__357;
static PyObject *__pyx_codeobj__358;
static PyObject *__pyx_codeobj__359;
static PyObject *__pyx_codeobj__361;
static PyObject *__pyx_codeobj__362;
static PyObject *__pyx_codeobj__363;
static PyObject *__pyx_codeobj__364;
static PyObject *__pyx_codeobj__366;
static PyObject *__pyx_codeobj__368;
static PyObject *__pyx_codeobj__370;
static PyObject *__pyx_codeobj__372;
static PyObject *__pyx_codeobj__374;
static PyObject *__pyx_codeobj__376;
static PyObject *__pyx_codeobj__378;
static PyObject *__pyx_codeobj__380;
static PyObject *__pyx_codeobj__382;
static PyObject *__pyx_codeobj__384;
static PyObject *__pyx_codeobj__386;
static PyObject *__pyx_codeobj__388;
static PyObject *__pyx_codeobj__390;
static PyObject *__pyx_codeobj__392;
static PyObject *__pyx_codeobj__394;
static PyObject *__pyx_codeobj__396;
static PyObject *__pyx_codeobj__397;
static PyObject *__pyx_codeobj__399;
static PyObject *__pyx_codeobj__401;
static PyObject *__pyx_codeobj__403;
static PyObject *__pyx_codeobj__405;
static PyObject *__pyx_codeobj__407;
static PyObject *__pyx_codeobj__408;
static PyObject *__pyx_codeobj__409;
static PyObject *__pyx_codeobj__411;
static PyObject *__pyx_codeobj__413;
static PyObject *__pyx_codeobj__415;
static PyObject *__pyx_codeobj__417;
static PyObject *__pyx_codeobj__419;
static PyObject *__pyx_codeobj__421;
static PyObject *__pyx_codeobj__423;
static PyObject *__pyx_codeobj__425;
static PyObject *__pyx_codeobj__427;
static PyObject *__pyx_codeobj__429;
static PyObject *__pyx_codeobj__431;
static PyObject *__pyx_codeobj__433;
static PyObject *__pyx_codeobj__435;
static PyObject *__pyx_codeobj__437;
static PyObject *__pyx_codeobj__439;
static PyObject *__pyx_codeobj__441;
static PyObject *__pyx_codeobj__443;
static PyObject *__pyx_codeobj__445;
static PyObject *__pyx_codeobj__447;
static PyObject *__pyx_codeobj__449;
static PyObject *__pyx_codeobj__451;
static PyObject *__pyx_codeobj__453;
static PyObject *__pyx_codeobj__455;
static PyObject *__pyx_codeobj__457;
static PyObject *__pyx_codeobj__458;
static PyObject *__pyx_codeobj__459;
static PyObject *__pyx_codeobj__461;
static PyObject *__pyx_codeobj__463;
static PyObject *__pyx_codeobj__465;
static PyObject *__pyx_codeobj__467;
static PyObject *__pyx_codeobj__469;
static PyObject *__pyx_codeobj__471;
static PyObject *__pyx_codeobj__473;
static PyObject *__pyx_codeobj__475;
/* Late includes */

/* "cgl_wrapper.pyx":646
 * CGL_FALSE = 0
 * 
 * def clear_console():             # <<<<<<<<<<<<<<
 *     os.system('cls' if os.name == 'nt' else 'clear')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_1clear_console(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_1clear_console = {"clear_console", (PyCFunction)__pyx_pw_3cgl_1clear_console, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_1clear_console(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear_console (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_clear_console(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_clear_console(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clear_console", 0);

  /* "cgl_wrapper.pyx":647
 * 
 * def clear_console():
 *     os.system('cls' if os.name == 'nt' else 'clear')             # <<<<<<<<<<<<<<
 * 
 * def free(ptr):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_system); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_os); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_nt, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__pyx_t_6) {
    __Pyx_INCREF(__pyx_n_s_cls);
    __pyx_t_2 = __pyx_n_s_cls;
  } else {
    __Pyx_INCREF(__pyx_n_s_clear);
    __pyx_t_2 = __pyx_n_s_clear;
  }
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
    }
  }
  __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":646
 * CGL_FALSE = 0
 * 
 * def clear_console():             # <<<<<<<<<<<<<<
 *     os.system('cls' if os.name == 'nt' else 'clear')
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.clear_console", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":649
 *     os.system('cls' if os.name == 'nt' else 'clear')
 * 
 * def free(ptr):             # <<<<<<<<<<<<<<
 *     stdlib.free(<void*>ptr)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3free(PyObject *__pyx_self, PyObject *__pyx_v_ptr); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_3free = {"free", (PyCFunction)__pyx_pw_3cgl_3free, METH_O, 0};
static PyObject *__pyx_pw_3cgl_3free(PyObject *__pyx_self, PyObject *__pyx_v_ptr) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("free (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_2free(__pyx_self, ((PyObject *)__pyx_v_ptr));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_2free(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_ptr) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("free", 0);

  /* "cgl_wrapper.pyx":650
 * 
 * def free(ptr):
 *     stdlib.free(<void*>ptr)             # <<<<<<<<<<<<<<
 * 
 * def init() -> bool:
 */
  free(((void *)__pyx_v_ptr));

  /* "cgl_wrapper.pyx":649
 *     os.system('cls' if os.name == 'nt' else 'clear')
 * 
 * def free(ptr):             # <<<<<<<<<<<<<<
 *     stdlib.free(<void*>ptr)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":652
 *     stdlib.free(<void*>ptr)
 * 
 * def init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_init()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_5init = {"init", (PyCFunction)__pyx_pw_3cgl_5init, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_5init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4init(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4init(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init", 0);

  /* "cgl_wrapper.pyx":653
 * 
 * def init() -> bool:
 *     return CGL_init()             # <<<<<<<<<<<<<<
 * 
 * def shutdown():
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_init()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":652
 *     stdlib.free(<void*>ptr)
 * 
 * def init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_init()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":655
 *     return CGL_init()
 * 
 * def shutdown():             # <<<<<<<<<<<<<<
 *     CGL_shutdown()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7shutdown = {"shutdown", (PyCFunction)__pyx_pw_3cgl_7shutdown, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_7shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shutdown(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shutdown(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("shutdown", 0);

  /* "cgl_wrapper.pyx":656
 * 
 * def shutdown():
 *     CGL_shutdown()             # <<<<<<<<<<<<<<
 * 
 * def utils_sleep(milliseconds: int):
 */
  CGL_shutdown();

  /* "cgl_wrapper.pyx":655
 *     return CGL_init()
 * 
 * def shutdown():             # <<<<<<<<<<<<<<
 *     CGL_shutdown()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":658
 *     CGL_shutdown()
 * 
 * def utils_sleep(milliseconds: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_sleep(milliseconds)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9utils_sleep(PyObject *__pyx_self, PyObject *__pyx_v_milliseconds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_9utils_sleep = {"utils_sleep", (PyCFunction)__pyx_pw_3cgl_9utils_sleep, METH_O, 0};
static PyObject *__pyx_pw_3cgl_9utils_sleep(PyObject *__pyx_self, PyObject *__pyx_v_milliseconds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_sleep (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8utils_sleep(__pyx_self, ((PyObject *)__pyx_v_milliseconds));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8utils_sleep(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_milliseconds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_sizei __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_sleep", 0);

  /* "cgl_wrapper.pyx":659
 * 
 * def utils_sleep(milliseconds: int):
 *     CGL_utils_sleep(milliseconds)             # <<<<<<<<<<<<<<
 * 
 * def utils_read_file(path: str) -> bytes:
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint64_t(__pyx_v_milliseconds); if (unlikely((__pyx_t_1 == ((CGL_sizei)-1)) && PyErr_Occurred())) __PYX_ERR(0, 659, __pyx_L1_error)
  CGL_utils_sleep(__pyx_t_1);

  /* "cgl_wrapper.pyx":658
 *     CGL_shutdown()
 * 
 * def utils_sleep(milliseconds: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_sleep(milliseconds)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.utils_sleep", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":661
 *     CGL_utils_sleep(milliseconds)
 * 
 * def utils_read_file(path: str) -> bytes:             # <<<<<<<<<<<<<<
 *     cdef CGL_sizei size
 *     cdef CGL_byte* data = CGL_utils_read_file(path.encode(), &size)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11utils_read_file(PyObject *__pyx_self, PyObject *__pyx_v_path); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_11utils_read_file = {"utils_read_file", (PyCFunction)__pyx_pw_3cgl_11utils_read_file, METH_O, 0};
static PyObject *__pyx_pw_3cgl_11utils_read_file(PyObject *__pyx_self, PyObject *__pyx_v_path) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_read_file (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 661, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_10utils_read_file(__pyx_self, ((PyObject*)__pyx_v_path));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_10utils_read_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) {
  CGL_sizei __pyx_v_size;
  CGL_byte *__pyx_v_data;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_read_file", 0);

  /* "cgl_wrapper.pyx":663
 * def utils_read_file(path: str) -> bytes:
 *     cdef CGL_sizei size
 *     cdef CGL_byte* data = CGL_utils_read_file(path.encode(), &size)             # <<<<<<<<<<<<<<
 *     if data is NULL:
 *         raise MemoryError()
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 663, __pyx_L1_error)
  __pyx_v_data = CGL_utils_read_file(__pyx_t_2, (&__pyx_v_size));
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":664
 *     cdef CGL_sizei size
 *     cdef CGL_byte* data = CGL_utils_read_file(path.encode(), &size)
 *     if data is NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     result = copy.deepcopy(data[:size])
 */
  __pyx_t_3 = ((__pyx_v_data == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "cgl_wrapper.pyx":665
 *     cdef CGL_byte* data = CGL_utils_read_file(path.encode(), &size)
 *     if data is NULL:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     result = copy.deepcopy(data[:size])
 *     with nogil:
 */
    PyErr_NoMemory(); __PYX_ERR(0, 665, __pyx_L1_error)

    /* "cgl_wrapper.pyx":664
 *     cdef CGL_sizei size
 *     cdef CGL_byte* data = CGL_utils_read_file(path.encode(), &size)
 *     if data is NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     result = copy.deepcopy(data[:size])
 */
  }

  /* "cgl_wrapper.pyx":666
 *     if data is NULL:
 *         raise MemoryError()
 *     result = copy.deepcopy(data[:size])             # <<<<<<<<<<<<<<
 *     with nogil:
 *         stdlib.free(data)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_data + 0, __pyx_v_size - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_result = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":667
 *         raise MemoryError()
 *     result = copy.deepcopy(data[:size])
 *     with nogil:             # <<<<<<<<<<<<<<
 *         stdlib.free(data)
 *     return result
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "cgl_wrapper.pyx":668
 *     result = copy.deepcopy(data[:size])
 *     with nogil:
 *         stdlib.free(data)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
        free(__pyx_v_data);
      }

      /* "cgl_wrapper.pyx":667
 *         raise MemoryError()
 *     result = copy.deepcopy(data[:size])
 *     with nogil:             # <<<<<<<<<<<<<<
 *         stdlib.free(data)
 *     return result
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L6;
        }
        __pyx_L6:;
      }
  }

  /* "cgl_wrapper.pyx":669
 *     with nogil:
 *         stdlib.free(data)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def utils_get_file_size(path: str) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyBytes_CheckExact(__pyx_v_result))||((__pyx_v_result) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_result)->tp_name), 0))) __PYX_ERR(0, 669, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = ((PyObject*)__pyx_v_result);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":661
 *     CGL_utils_sleep(milliseconds)
 * 
 * def utils_read_file(path: str) -> bytes:             # <<<<<<<<<<<<<<
 *     cdef CGL_sizei size
 *     cdef CGL_byte* data = CGL_utils_read_file(path.encode(), &size)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.utils_read_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":671
 *     return result
 * 
 * def utils_get_file_size(path: str) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_get_file_size(path.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_13utils_get_file_size(PyObject *__pyx_self, PyObject *__pyx_v_path); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_13utils_get_file_size = {"utils_get_file_size", (PyCFunction)__pyx_pw_3cgl_13utils_get_file_size, METH_O, 0};
static PyObject *__pyx_pw_3cgl_13utils_get_file_size(PyObject *__pyx_self, PyObject *__pyx_v_path) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_get_file_size (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 671, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_12utils_get_file_size(__pyx_self, ((PyObject*)__pyx_v_path));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12utils_get_file_size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_byte const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_get_file_size", 0);

  /* "cgl_wrapper.pyx":672
 * 
 * def utils_get_file_size(path: str) -> int:
 *     return CGL_utils_get_file_size(path.encode())             # <<<<<<<<<<<<<<
 * 
 * def utils_append_file(path: str, data: bytes) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 672, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t(CGL_utils_get_file_size(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":671
 *     return result
 * 
 * def utils_get_file_size(path: str) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_get_file_size(path.encode())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.utils_get_file_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":674
 *     return CGL_utils_get_file_size(path.encode())
 * 
 * def utils_append_file(path: str, data: bytes) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_append_file(path.encode(), data, len(data))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_15utils_append_file(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_15utils_append_file = {"utils_append_file", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_15utils_append_file, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_15utils_append_file(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_data = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_append_file (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("utils_append_file", 1, 2, 2, 1); __PYX_ERR(0, 674, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "utils_append_file") < 0)) __PYX_ERR(0, 674, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_path = ((PyObject*)values[0]);
    __pyx_v_data = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("utils_append_file", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 674, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_append_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 674, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 674, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_14utils_append_file(__pyx_self, __pyx_v_path, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14utils_append_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_byte const *__pyx_t_2;
  CGL_byte const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_append_file", 0);

  /* "cgl_wrapper.pyx":675
 * 
 * def utils_append_file(path: str, data: bytes) -> bool:
 *     return CGL_utils_append_file(path.encode(), data, len(data))             # <<<<<<<<<<<<<<
 * 
 * def utils_write_file(path : str, data : bytes) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 675, __pyx_L1_error)
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 675, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 675, __pyx_L1_error)
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 675, __pyx_L1_error)
  }
  __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 675, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyBool_FromLong(CGL_utils_append_file(__pyx_t_2, __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":674
 *     return CGL_utils_get_file_size(path.encode())
 * 
 * def utils_append_file(path: str, data: bytes) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_append_file(path.encode(), data, len(data))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.utils_append_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":677
 *     return CGL_utils_append_file(path.encode(), data, len(data))
 * 
 * def utils_write_file(path : str, data : bytes) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_write_file(path.encode(), data, len(data))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_17utils_write_file(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_17utils_write_file = {"utils_write_file", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_17utils_write_file, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_17utils_write_file(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_path = 0;
  PyObject *__pyx_v_data = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_write_file (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("utils_write_file", 1, 2, 2, 1); __PYX_ERR(0, 677, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "utils_write_file") < 0)) __PYX_ERR(0, 677, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_path = ((PyObject*)values[0]);
    __pyx_v_data = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("utils_write_file", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 677, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_write_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 677, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 677, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_16utils_write_file(__pyx_self, __pyx_v_path, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_16utils_write_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_byte const *__pyx_t_2;
  CGL_byte const *__pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_write_file", 0);

  /* "cgl_wrapper.pyx":678
 * 
 * def utils_write_file(path : str, data : bytes) -> bool:
 *     return CGL_utils_write_file(path.encode(), data, len(data))             # <<<<<<<<<<<<<<
 * 
 * def utils_get_time() -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 678, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 678, __pyx_L1_error)
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 678, __pyx_L1_error)
  }
  __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 678, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyBool_FromLong(CGL_utils_write_file(__pyx_t_2, __pyx_t_3, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":677
 *     return CGL_utils_append_file(path.encode(), data, len(data))
 * 
 * def utils_write_file(path : str, data : bytes) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_write_file(path.encode(), data, len(data))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.utils_write_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":680
 *     return CGL_utils_write_file(path.encode(), data, len(data))
 * 
 * def utils_get_time() -> float:             # <<<<<<<<<<<<<<
 *     return CGL_utils_get_time()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_19utils_get_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_19utils_get_time = {"utils_get_time", (PyCFunction)__pyx_pw_3cgl_19utils_get_time, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_19utils_get_time(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_get_time (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_18utils_get_time(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_18utils_get_time(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_get_time", 0);

  /* "cgl_wrapper.pyx":681
 * 
 * def utils_get_time() -> float:
 *     return CGL_utils_get_time()             # <<<<<<<<<<<<<<
 * 
 * def utils_get_timestamp() -> str:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_utils_get_time()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":680
 *     return CGL_utils_write_file(path.encode(), data, len(data))
 * 
 * def utils_get_time() -> float:             # <<<<<<<<<<<<<<
 *     return CGL_utils_get_time()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.utils_get_time", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":683
 *     return CGL_utils_get_time()
 * 
 * def utils_get_timestamp() -> str:             # <<<<<<<<<<<<<<
 *     cdef CGL_byte buffer[128]
 *     CGL_utils_get_timestamp(buffer)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_21utils_get_timestamp(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_21utils_get_timestamp = {"utils_get_timestamp", (PyCFunction)__pyx_pw_3cgl_21utils_get_timestamp, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_21utils_get_timestamp(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_get_timestamp (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_20utils_get_timestamp(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_20utils_get_timestamp(CYTHON_UNUSED PyObject *__pyx_self) {
  CGL_byte __pyx_v_buffer[0x80];
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_get_timestamp", 0);

  /* "cgl_wrapper.pyx":685
 * def utils_get_timestamp() -> str:
 *     cdef CGL_byte buffer[128]
 *     CGL_utils_get_timestamp(buffer)             # <<<<<<<<<<<<<<
 *     return buffer.decode()
 * 
 */
  CGL_utils_get_timestamp(__pyx_v_buffer);

  /* "cgl_wrapper.pyx":686
 *     cdef CGL_byte buffer[128]
 *     CGL_utils_get_timestamp(buffer)
 *     return buffer.decode()             # <<<<<<<<<<<<<<
 * 
 * def utils_is_little_endian() -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_decode_c_string(__pyx_v_buffer, 0, strlen(__pyx_v_buffer), NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(PyString_CheckExact(__pyx_t_1))||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 686, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":683
 *     return CGL_utils_get_time()
 * 
 * def utils_get_timestamp() -> str:             # <<<<<<<<<<<<<<
 *     cdef CGL_byte buffer[128]
 *     CGL_utils_get_timestamp(buffer)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.utils_get_timestamp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":688
 *     return buffer.decode()
 * 
 * def utils_is_little_endian() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_little_endian()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_23utils_is_little_endian(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_23utils_is_little_endian = {"utils_is_little_endian", (PyCFunction)__pyx_pw_3cgl_23utils_is_little_endian, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_23utils_is_little_endian(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_is_little_endian (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_22utils_is_little_endian(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_22utils_is_little_endian(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_is_little_endian", 0);

  /* "cgl_wrapper.pyx":689
 * 
 * def utils_is_little_endian() -> bool:
 *     return CGL_utils_is_little_endian()             # <<<<<<<<<<<<<<
 * 
 * def utils_is_big_endian() -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_utils_is_little_endian()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":688
 *     return buffer.decode()
 * 
 * def utils_is_little_endian() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_little_endian()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.utils_is_little_endian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":691
 *     return CGL_utils_is_little_endian()
 * 
 * def utils_is_big_endian() -> bool:             # <<<<<<<<<<<<<<
 *     return not CGL_utils_is_little_endian()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_25utils_is_big_endian(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_25utils_is_big_endian = {"utils_is_big_endian", (PyCFunction)__pyx_pw_3cgl_25utils_is_big_endian, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_25utils_is_big_endian(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_is_big_endian (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_24utils_is_big_endian(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_24utils_is_big_endian(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_is_big_endian", 0);

  /* "cgl_wrapper.pyx":692
 * 
 * def utils_is_big_endian() -> bool:
 *     return not CGL_utils_is_little_endian()             # <<<<<<<<<<<<<<
 * 
 * def utils_get_random_with_probability(probabilities) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((!(CGL_utils_is_little_endian() != 0))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":691
 *     return CGL_utils_is_little_endian()
 * 
 * def utils_is_big_endian() -> bool:             # <<<<<<<<<<<<<<
 *     return not CGL_utils_is_little_endian()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.utils_is_big_endian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":694
 *     return not CGL_utils_is_little_endian()
 * 
 * def utils_get_random_with_probability(probabilities) -> int:             # <<<<<<<<<<<<<<
 *     cdef CGL_float* c_probabilities
 *     c_probabilities = <CGL_float*>stdlib.malloc(len(probabilities) * sizeof(CGL_float))
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_27utils_get_random_with_probability(PyObject *__pyx_self, PyObject *__pyx_v_probabilities); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_27utils_get_random_with_probability = {"utils_get_random_with_probability", (PyCFunction)__pyx_pw_3cgl_27utils_get_random_with_probability, METH_O, 0};
static PyObject *__pyx_pw_3cgl_27utils_get_random_with_probability(PyObject *__pyx_self, PyObject *__pyx_v_probabilities) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_get_random_with_probability (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_26utils_get_random_with_probability(__pyx_self, ((PyObject *)__pyx_v_probabilities));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_26utils_get_random_with_probability(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_probabilities) {
  CGL_float *__pyx_v_c_probabilities;
  Py_ssize_t __pyx_v_i;
  CGL_sizei __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  Py_ssize_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  CGL_float __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_get_random_with_probability", 0);

  /* "cgl_wrapper.pyx":696
 * def utils_get_random_with_probability(probabilities) -> int:
 *     cdef CGL_float* c_probabilities
 *     c_probabilities = <CGL_float*>stdlib.malloc(len(probabilities) * sizeof(CGL_float))             # <<<<<<<<<<<<<<
 *     if c_probabilities is NULL:
 *         raise MemoryError()
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_probabilities); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 696, __pyx_L1_error)
  __pyx_v_c_probabilities = ((CGL_float *)malloc((__pyx_t_1 * (sizeof(CGL_float)))));

  /* "cgl_wrapper.pyx":697
 *     cdef CGL_float* c_probabilities
 *     c_probabilities = <CGL_float*>stdlib.malloc(len(probabilities) * sizeof(CGL_float))
 *     if c_probabilities is NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     for i in range(len(probabilities)):
 */
  __pyx_t_2 = ((__pyx_v_c_probabilities == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":698
 *     c_probabilities = <CGL_float*>stdlib.malloc(len(probabilities) * sizeof(CGL_float))
 *     if c_probabilities is NULL:
 *         raise MemoryError()             # <<<<<<<<<<<<<<
 *     for i in range(len(probabilities)):
 *         c_probabilities[i] = probabilities[i]
 */
    PyErr_NoMemory(); __PYX_ERR(0, 698, __pyx_L1_error)

    /* "cgl_wrapper.pyx":697
 *     cdef CGL_float* c_probabilities
 *     c_probabilities = <CGL_float*>stdlib.malloc(len(probabilities) * sizeof(CGL_float))
 *     if c_probabilities is NULL:             # <<<<<<<<<<<<<<
 *         raise MemoryError()
 *     for i in range(len(probabilities)):
 */
  }

  /* "cgl_wrapper.pyx":699
 *     if c_probabilities is NULL:
 *         raise MemoryError()
 *     for i in range(len(probabilities)):             # <<<<<<<<<<<<<<
 *         c_probabilities[i] = probabilities[i]
 *     result = CGL_utils_get_random_with_probability(c_probabilities, len(probabilities))
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_probabilities); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 699, __pyx_L1_error)
  __pyx_t_3 = __pyx_t_1;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "cgl_wrapper.pyx":700
 *         raise MemoryError()
 *     for i in range(len(probabilities)):
 *         c_probabilities[i] = probabilities[i]             # <<<<<<<<<<<<<<
 *     result = CGL_utils_get_random_with_probability(c_probabilities, len(probabilities))
 *     with nogil:
 */
    __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_probabilities, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_6 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    (__pyx_v_c_probabilities[__pyx_v_i]) = __pyx_t_6;
  }

  /* "cgl_wrapper.pyx":701
 *     for i in range(len(probabilities)):
 *         c_probabilities[i] = probabilities[i]
 *     result = CGL_utils_get_random_with_probability(c_probabilities, len(probabilities))             # <<<<<<<<<<<<<<
 *     with nogil:
 *         stdlib.free(c_probabilities)
 */
  __pyx_t_1 = PyObject_Length(__pyx_v_probabilities); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 701, __pyx_L1_error)
  __pyx_v_result = CGL_utils_get_random_with_probability(__pyx_v_c_probabilities, __pyx_t_1);

  /* "cgl_wrapper.pyx":702
 *         c_probabilities[i] = probabilities[i]
 *     result = CGL_utils_get_random_with_probability(c_probabilities, len(probabilities))
 *     with nogil:             # <<<<<<<<<<<<<<
 *         stdlib.free(c_probabilities)
 *     return result
 */
  {
      #ifdef WITH_THREAD
      PyThreadState *_save;
      Py_UNBLOCK_THREADS
      __Pyx_FastGIL_Remember();
      #endif
      /*try:*/ {

        /* "cgl_wrapper.pyx":703
 *     result = CGL_utils_get_random_with_probability(c_probabilities, len(probabilities))
 *     with nogil:
 *         stdlib.free(c_probabilities)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
        free(__pyx_v_c_probabilities);
      }

      /* "cgl_wrapper.pyx":702
 *         c_probabilities[i] = probabilities[i]
 *     result = CGL_utils_get_random_with_probability(c_probabilities, len(probabilities))
 *     with nogil:             # <<<<<<<<<<<<<<
 *         stdlib.free(c_probabilities)
 *     return result
 */
      /*finally:*/ {
        /*normal exit:*/{
          #ifdef WITH_THREAD
          __Pyx_FastGIL_Forget();
          Py_BLOCK_THREADS
          #endif
          goto __pyx_L8;
        }
        __pyx_L8:;
      }
  }

  /* "cgl_wrapper.pyx":704
 *     with nogil:
 *         stdlib.free(c_probabilities)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def utils_reverse_bytes(data: bytes):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_5 = __Pyx_PyInt_From_uint64_t(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":694
 *     return not CGL_utils_is_little_endian()
 * 
 * def utils_get_random_with_probability(probabilities) -> int:             # <<<<<<<<<<<<<<
 *     cdef CGL_float* c_probabilities
 *     c_probabilities = <CGL_float*>stdlib.malloc(len(probabilities) * sizeof(CGL_float))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.utils_get_random_with_probability", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":706
 *     return result
 * 
 * def utils_reverse_bytes(data: bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_reverse_bytes(<void*>data, len(data))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_29utils_reverse_bytes(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_29utils_reverse_bytes = {"utils_reverse_bytes", (PyCFunction)__pyx_pw_3cgl_29utils_reverse_bytes, METH_O, 0};
static PyObject *__pyx_pw_3cgl_29utils_reverse_bytes(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_reverse_bytes (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 706, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_28utils_reverse_bytes(__pyx_self, ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_28utils_reverse_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_reverse_bytes", 0);

  /* "cgl_wrapper.pyx":707
 * 
 * def utils_reverse_bytes(data: bytes):
 *     CGL_utils_reverse_bytes(<void*>data, len(data))             # <<<<<<<<<<<<<<
 * 
 * def utils_little_endian_to_current(data : bytes):
 */
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 707, __pyx_L1_error)
  }
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 707, __pyx_L1_error)
  CGL_utils_reverse_bytes(((void *)__pyx_v_data), __pyx_t_1);

  /* "cgl_wrapper.pyx":706
 *     return result
 * 
 * def utils_reverse_bytes(data: bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_reverse_bytes(<void*>data, len(data))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.utils_reverse_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":709
 *     CGL_utils_reverse_bytes(<void*>data, len(data))
 * 
 * def utils_little_endian_to_current(data : bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_little_endian_to_current(<void*>data, len(data))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_31utils_little_endian_to_current(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_31utils_little_endian_to_current = {"utils_little_endian_to_current", (PyCFunction)__pyx_pw_3cgl_31utils_little_endian_to_current, METH_O, 0};
static PyObject *__pyx_pw_3cgl_31utils_little_endian_to_current(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_little_endian_to_current (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 709, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_30utils_little_endian_to_current(__pyx_self, ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_30utils_little_endian_to_current(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_little_endian_to_current", 0);

  /* "cgl_wrapper.pyx":710
 * 
 * def utils_little_endian_to_current(data : bytes):
 *     CGL_utils_little_endian_to_current(<void*>data, len(data))             # <<<<<<<<<<<<<<
 * 
 * def utils_big_endian_to_current(data : bytes):
 */
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 710, __pyx_L1_error)
  }
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 710, __pyx_L1_error)
  CGL_utils_little_endian_to_current(((void *)__pyx_v_data), __pyx_t_1);

  /* "cgl_wrapper.pyx":709
 *     CGL_utils_reverse_bytes(<void*>data, len(data))
 * 
 * def utils_little_endian_to_current(data : bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_little_endian_to_current(<void*>data, len(data))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.utils_little_endian_to_current", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":712
 *     CGL_utils_little_endian_to_current(<void*>data, len(data))
 * 
 * def utils_big_endian_to_current(data : bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_big_endian_to_current(<void*>data, len(data))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_33utils_big_endian_to_current(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_33utils_big_endian_to_current = {"utils_big_endian_to_current", (PyCFunction)__pyx_pw_3cgl_33utils_big_endian_to_current, METH_O, 0};
static PyObject *__pyx_pw_3cgl_33utils_big_endian_to_current(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_big_endian_to_current (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 712, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_32utils_big_endian_to_current(__pyx_self, ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_32utils_big_endian_to_current(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_big_endian_to_current", 0);

  /* "cgl_wrapper.pyx":713
 * 
 * def utils_big_endian_to_current(data : bytes):
 *     CGL_utils_big_endian_to_current(<void*>data, len(data))             # <<<<<<<<<<<<<<
 * 
 * def utils_fast_srand(seed: int):
 */
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 713, __pyx_L1_error)
  }
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 713, __pyx_L1_error)
  CGL_utils_big_endian_to_current(((void *)__pyx_v_data), __pyx_t_1);

  /* "cgl_wrapper.pyx":712
 *     CGL_utils_little_endian_to_current(<void*>data, len(data))
 * 
 * def utils_big_endian_to_current(data : bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_big_endian_to_current(<void*>data, len(data))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.utils_big_endian_to_current", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":715
 *     CGL_utils_big_endian_to_current(<void*>data, len(data))
 * 
 * def utils_fast_srand(seed: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_fast_srand(seed)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_35utils_fast_srand(PyObject *__pyx_self, PyObject *__pyx_v_seed); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_35utils_fast_srand = {"utils_fast_srand", (PyCFunction)__pyx_pw_3cgl_35utils_fast_srand, METH_O, 0};
static PyObject *__pyx_pw_3cgl_35utils_fast_srand(PyObject *__pyx_self, PyObject *__pyx_v_seed) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_fast_srand (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_34utils_fast_srand(__pyx_self, ((PyObject *)__pyx_v_seed));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_34utils_fast_srand(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seed) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_fast_srand", 0);

  /* "cgl_wrapper.pyx":716
 * 
 * def utils_fast_srand(seed: int):
 *     CGL_utils_fast_srand(seed)             # <<<<<<<<<<<<<<
 * 
 * def utils_fast_rand() -> int:
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_seed); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 716, __pyx_L1_error)
  CGL_utils_fast_srand(__pyx_t_1);

  /* "cgl_wrapper.pyx":715
 *     CGL_utils_big_endian_to_current(<void*>data, len(data))
 * 
 * def utils_fast_srand(seed: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_fast_srand(seed)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.utils_fast_srand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":718
 *     CGL_utils_fast_srand(seed)
 * 
 * def utils_fast_rand() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_fast_rand()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_37utils_fast_rand(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_37utils_fast_rand = {"utils_fast_rand", (PyCFunction)__pyx_pw_3cgl_37utils_fast_rand, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_37utils_fast_rand(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_fast_rand (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_36utils_fast_rand(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_36utils_fast_rand(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_fast_rand", 0);

  /* "cgl_wrapper.pyx":719
 * 
 * def utils_fast_rand() -> int:
 *     return CGL_utils_fast_rand()             # <<<<<<<<<<<<<<
 * 
 * def utils_xorshf96() -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(CGL_utils_fast_rand()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":718
 *     CGL_utils_fast_srand(seed)
 * 
 * def utils_fast_rand() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_fast_rand()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.utils_fast_rand", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":721
 *     return CGL_utils_fast_rand()
 * 
 * def utils_xorshf96() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_xorshf96()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_39utils_xorshf96(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_39utils_xorshf96 = {"utils_xorshf96", (PyCFunction)__pyx_pw_3cgl_39utils_xorshf96, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_39utils_xorshf96(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_xorshf96 (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_38utils_xorshf96(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_38utils_xorshf96(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_xorshf96", 0);

  /* "cgl_wrapper.pyx":722
 * 
 * def utils_xorshf96() -> int:
 *     return CGL_utils_xorshf96()             # <<<<<<<<<<<<<<
 * 
 * def utils_srand31(seed: int):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_ulong(CGL_utils_xorshf96()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":721
 *     return CGL_utils_fast_rand()
 * 
 * def utils_xorshf96() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_xorshf96()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.utils_xorshf96", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":724
 *     return CGL_utils_xorshf96()
 * 
 * def utils_srand31(seed: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_srand31(seed)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_41utils_srand31(PyObject *__pyx_self, PyObject *__pyx_v_seed); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_41utils_srand31 = {"utils_srand31", (PyCFunction)__pyx_pw_3cgl_41utils_srand31, METH_O, 0};
static PyObject *__pyx_pw_3cgl_41utils_srand31(PyObject *__pyx_self, PyObject *__pyx_v_seed) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_srand31 (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_40utils_srand31(__pyx_self, ((PyObject *)__pyx_v_seed));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_40utils_srand31(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seed) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_uint __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_srand31", 0);

  /* "cgl_wrapper.pyx":725
 * 
 * def utils_srand31(seed: int):
 *     CGL_utils_srand31(seed)             # <<<<<<<<<<<<<<
 * 
 * def utils_rand31() -> int:
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_uint(__pyx_v_seed); if (unlikely((__pyx_t_1 == ((CGL_uint)-1)) && PyErr_Occurred())) __PYX_ERR(0, 725, __pyx_L1_error)
  CGL_utils_srand31(__pyx_t_1);

  /* "cgl_wrapper.pyx":724
 *     return CGL_utils_xorshf96()
 * 
 * def utils_srand31(seed: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_srand31(seed)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.utils_srand31", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":727
 *     CGL_utils_srand31(seed)
 * 
 * def utils_rand31() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_rand31()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_43utils_rand31(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_43utils_rand31 = {"utils_rand31", (PyCFunction)__pyx_pw_3cgl_43utils_rand31, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_43utils_rand31(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_rand31 (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_42utils_rand31(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_42utils_rand31(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_rand31", 0);

  /* "cgl_wrapper.pyx":728
 * 
 * def utils_rand31() -> int:
 *     return CGL_utils_rand31()             # <<<<<<<<<<<<<<
 * 
 * def utils_sigmoid(x: float) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_uint(CGL_utils_rand31()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 728, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":727
 *     CGL_utils_srand31(seed)
 * 
 * def utils_rand31() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_rand31()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.utils_rand31", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":730
 *     return CGL_utils_rand31()
 * 
 * def utils_sigmoid(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_sigmoid(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_45utils_sigmoid(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_45utils_sigmoid = {"utils_sigmoid", (PyCFunction)__pyx_pw_3cgl_45utils_sigmoid, METH_O, 0};
static PyObject *__pyx_pw_3cgl_45utils_sigmoid(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_sigmoid (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 730, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_sigmoid", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_44utils_sigmoid(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_44utils_sigmoid(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_sigmoid", 0);

  /* "cgl_wrapper.pyx":731
 * 
 * def utils_sigmoid(x: float) -> float:
 *     CGL_utils_sigmoid(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_sigmoid_derivative(x: float) -> float:
 */
  (void)(CGL_utils_sigmoid(__pyx_v_x));

  /* "cgl_wrapper.pyx":730
 *     return CGL_utils_rand31()
 * 
 * def utils_sigmoid(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_sigmoid(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":733
 *     CGL_utils_sigmoid(x)
 * 
 * def utils_sigmoid_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_sigmoid_derivative(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_47utils_sigmoid_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_47utils_sigmoid_derivative = {"utils_sigmoid_derivative", (PyCFunction)__pyx_pw_3cgl_47utils_sigmoid_derivative, METH_O, 0};
static PyObject *__pyx_pw_3cgl_47utils_sigmoid_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_sigmoid_derivative (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 733, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_sigmoid_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_46utils_sigmoid_derivative(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_46utils_sigmoid_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_sigmoid_derivative", 0);

  /* "cgl_wrapper.pyx":734
 * 
 * def utils_sigmoid_derivative(x: float) -> float:
 *     CGL_utils_sigmoid_derivative(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_relu(x: float) -> float:
 */
  (void)(CGL_utils_sigmoid_derivative(__pyx_v_x));

  /* "cgl_wrapper.pyx":733
 *     CGL_utils_sigmoid(x)
 * 
 * def utils_sigmoid_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_sigmoid_derivative(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":736
 *     CGL_utils_sigmoid_derivative(x)
 * 
 * def utils_relu(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_49utils_relu(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_49utils_relu = {"utils_relu", (PyCFunction)__pyx_pw_3cgl_49utils_relu, METH_O, 0};
static PyObject *__pyx_pw_3cgl_49utils_relu(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 736, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_relu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_48utils_relu(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_48utils_relu(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu", 0);

  /* "cgl_wrapper.pyx":737
 * 
 * def utils_relu(x: float) -> float:
 *     CGL_utils_relu(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_relu_derivative(x: float) -> float:
 */
  (void)(CGL_utils_relu(__pyx_v_x));

  /* "cgl_wrapper.pyx":736
 *     CGL_utils_sigmoid_derivative(x)
 * 
 * def utils_relu(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":739
 *     CGL_utils_relu(x)
 * 
 * def utils_relu_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_derivative(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_51utils_relu_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_51utils_relu_derivative = {"utils_relu_derivative", (PyCFunction)__pyx_pw_3cgl_51utils_relu_derivative, METH_O, 0};
static PyObject *__pyx_pw_3cgl_51utils_relu_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu_derivative (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 739, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_relu_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_50utils_relu_derivative(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_50utils_relu_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu_derivative", 0);

  /* "cgl_wrapper.pyx":740
 * 
 * def utils_relu_derivative(x: float) -> float:
 *     CGL_utils_relu_derivative(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_tanh(x: float) -> float:
 */
  (void)(CGL_utils_relu_derivative(__pyx_v_x));

  /* "cgl_wrapper.pyx":739
 *     CGL_utils_relu(x)
 * 
 * def utils_relu_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_derivative(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":742
 *     CGL_utils_relu_derivative(x)
 * 
 * def utils_tanh(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_tanh(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_53utils_tanh(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_53utils_tanh = {"utils_tanh", (PyCFunction)__pyx_pw_3cgl_53utils_tanh, METH_O, 0};
static PyObject *__pyx_pw_3cgl_53utils_tanh(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_tanh (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 742, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_tanh", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_52utils_tanh(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_52utils_tanh(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_tanh", 0);

  /* "cgl_wrapper.pyx":743
 * 
 * def utils_tanh(x: float) -> float:
 *     CGL_utils_tanh(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_tanh_derivative(x: float) -> float:
 */
  (void)(CGL_utils_tanh(__pyx_v_x));

  /* "cgl_wrapper.pyx":742
 *     CGL_utils_relu_derivative(x)
 * 
 * def utils_tanh(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_tanh(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":745
 *     CGL_utils_tanh(x)
 * 
 * def utils_tanh_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_tanh_derivative(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_55utils_tanh_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_55utils_tanh_derivative = {"utils_tanh_derivative", (PyCFunction)__pyx_pw_3cgl_55utils_tanh_derivative, METH_O, 0};
static PyObject *__pyx_pw_3cgl_55utils_tanh_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_tanh_derivative (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 745, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_tanh_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_54utils_tanh_derivative(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_54utils_tanh_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_tanh_derivative", 0);

  /* "cgl_wrapper.pyx":746
 * 
 * def utils_tanh_derivative(x: float) -> float:
 *     CGL_utils_tanh_derivative(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_step(x: float) -> float:
 */
  (void)(CGL_utils_tanh_derivative(__pyx_v_x));

  /* "cgl_wrapper.pyx":745
 *     CGL_utils_tanh(x)
 * 
 * def utils_tanh_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_tanh_derivative(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":748
 *     CGL_utils_tanh_derivative(x)
 * 
 * def utils_step(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_step(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_57utils_step(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_57utils_step = {"utils_step", (PyCFunction)__pyx_pw_3cgl_57utils_step, METH_O, 0};
static PyObject *__pyx_pw_3cgl_57utils_step(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_step (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 748, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_step", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_56utils_step(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_56utils_step(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_step", 0);

  /* "cgl_wrapper.pyx":749
 * 
 * def utils_step(x: float) -> float:
 *     CGL_utils_step(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_step_derivative(x: float) -> float:
 */
  (void)(CGL_utils_step(__pyx_v_x));

  /* "cgl_wrapper.pyx":748
 *     CGL_utils_tanh_derivative(x)
 * 
 * def utils_step(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_step(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":751
 *     CGL_utils_step(x)
 * 
 * def utils_step_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_step_derivative(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_59utils_step_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_59utils_step_derivative = {"utils_step_derivative", (PyCFunction)__pyx_pw_3cgl_59utils_step_derivative, METH_O, 0};
static PyObject *__pyx_pw_3cgl_59utils_step_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_step_derivative (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 751, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_step_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_58utils_step_derivative(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_58utils_step_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_step_derivative", 0);

  /* "cgl_wrapper.pyx":752
 * 
 * def utils_step_derivative(x: float) -> float:
 *     CGL_utils_step_derivative(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_relu_leaky(x: float) -> float:
 */
  (void)(CGL_utils_step_derivative(__pyx_v_x));

  /* "cgl_wrapper.pyx":751
 *     CGL_utils_step(x)
 * 
 * def utils_step_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_step_derivative(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":754
 *     CGL_utils_step_derivative(x)
 * 
 * def utils_relu_leaky(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_leaky(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_61utils_relu_leaky(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_61utils_relu_leaky = {"utils_relu_leaky", (PyCFunction)__pyx_pw_3cgl_61utils_relu_leaky, METH_O, 0};
static PyObject *__pyx_pw_3cgl_61utils_relu_leaky(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu_leaky (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 754, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_relu_leaky", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_60utils_relu_leaky(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_60utils_relu_leaky(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu_leaky", 0);

  /* "cgl_wrapper.pyx":755
 * 
 * def utils_relu_leaky(x: float) -> float:
 *     CGL_utils_relu_leaky(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_relu_leaky_derivative(x: float) -> float:
 */
  (void)(CGL_utils_relu_leaky(__pyx_v_x));

  /* "cgl_wrapper.pyx":754
 *     CGL_utils_step_derivative(x)
 * 
 * def utils_relu_leaky(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_leaky(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":757
 *     CGL_utils_relu_leaky(x)
 * 
 * def utils_relu_leaky_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_leaky_derivative(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_63utils_relu_leaky_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_63utils_relu_leaky_derivative = {"utils_relu_leaky_derivative", (PyCFunction)__pyx_pw_3cgl_63utils_relu_leaky_derivative, METH_O, 0};
static PyObject *__pyx_pw_3cgl_63utils_relu_leaky_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu_leaky_derivative (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_relu_leaky_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_62utils_relu_leaky_derivative(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_62utils_relu_leaky_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu_leaky_derivative", 0);

  /* "cgl_wrapper.pyx":758
 * 
 * def utils_relu_leaky_derivative(x: float) -> float:
 *     CGL_utils_relu_leaky_derivative(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_relu_smooth(x: float) -> float:
 */
  (void)(CGL_utils_relu_leaky_derivative(__pyx_v_x));

  /* "cgl_wrapper.pyx":757
 *     CGL_utils_relu_leaky(x)
 * 
 * def utils_relu_leaky_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_leaky_derivative(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":760
 *     CGL_utils_relu_leaky_derivative(x)
 * 
 * def utils_relu_smooth(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_smooth(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_65utils_relu_smooth(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_65utils_relu_smooth = {"utils_relu_smooth", (PyCFunction)__pyx_pw_3cgl_65utils_relu_smooth, METH_O, 0};
static PyObject *__pyx_pw_3cgl_65utils_relu_smooth(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu_smooth (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 760, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_relu_smooth", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_64utils_relu_smooth(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_64utils_relu_smooth(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu_smooth", 0);

  /* "cgl_wrapper.pyx":761
 * 
 * def utils_relu_smooth(x: float) -> float:
 *     CGL_utils_relu_smooth(x)             # <<<<<<<<<<<<<<
 * 
 * def utils_relu_smooth_derivative(x: float) -> float:
 */
  (void)(CGL_utils_relu_smooth(__pyx_v_x));

  /* "cgl_wrapper.pyx":760
 *     CGL_utils_relu_leaky_derivative(x)
 * 
 * def utils_relu_smooth(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_smooth(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":763
 *     CGL_utils_relu_smooth(x)
 * 
 * def utils_relu_smooth_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_smooth_derivative(x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_67utils_relu_smooth_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_67utils_relu_smooth_derivative = {"utils_relu_smooth_derivative", (PyCFunction)__pyx_pw_3cgl_67utils_relu_smooth_derivative, METH_O, 0};
static PyObject *__pyx_pw_3cgl_67utils_relu_smooth_derivative(PyObject *__pyx_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu_smooth_derivative (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 763, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.utils_relu_smooth_derivative", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_66utils_relu_smooth_derivative(__pyx_self, ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_66utils_relu_smooth_derivative(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_relu_smooth_derivative", 0);

  /* "cgl_wrapper.pyx":764
 * 
 * def utils_relu_smooth_derivative(x: float) -> float:
 *     CGL_utils_relu_smooth_derivative(x)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  (void)(CGL_utils_relu_smooth_derivative(__pyx_v_x));

  /* "cgl_wrapper.pyx":763
 *     CGL_utils_relu_smooth(x)
 * 
 * def utils_relu_smooth_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_smooth_derivative(x)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":773
 * CONSOLE_COLOR_BLUE = 4
 * 
 * def console_set_color(color: int):             # <<<<<<<<<<<<<<
 *     if color < 0 or color > 4:
 *         raise ValueError()
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_69console_set_color(PyObject *__pyx_self, PyObject *__pyx_v_color); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_69console_set_color = {"console_set_color", (PyCFunction)__pyx_pw_3cgl_69console_set_color, METH_O, 0};
static PyObject *__pyx_pw_3cgl_69console_set_color(PyObject *__pyx_self, PyObject *__pyx_v_color) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("console_set_color (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_68console_set_color(__pyx_self, ((PyObject *)__pyx_v_color));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_68console_set_color(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_color) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  uint8_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("console_set_color", 0);

  /* "cgl_wrapper.pyx":774
 * 
 * def console_set_color(color: int):
 *     if color < 0 or color > 4:             # <<<<<<<<<<<<<<
 *         raise ValueError()
 *     CGL_console_set_color(color)
 */
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_color, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = PyObject_RichCompare(__pyx_v_color, __pyx_int_4, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 774, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_3;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":775
 * def console_set_color(color: int):
 *     if color < 0 or color > 4:
 *         raise ValueError()             # <<<<<<<<<<<<<<
 *     CGL_console_set_color(color)
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_ValueError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 775, __pyx_L1_error)

    /* "cgl_wrapper.pyx":774
 * 
 * def console_set_color(color: int):
 *     if color < 0 or color > 4:             # <<<<<<<<<<<<<<
 *         raise ValueError()
 *     CGL_console_set_color(color)
 */
  }

  /* "cgl_wrapper.pyx":776
 *     if color < 0 or color > 4:
 *         raise ValueError()
 *     CGL_console_set_color(color)             # <<<<<<<<<<<<<<
 * 
 * def printf_red(format: str):
 */
  __pyx_t_4 = __Pyx_PyInt_As_uint8_t(__pyx_v_color); if (unlikely((__pyx_t_4 == ((uint8_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 776, __pyx_L1_error)
  CGL_console_set_color(__pyx_t_4);

  /* "cgl_wrapper.pyx":773
 * CONSOLE_COLOR_BLUE = 4
 * 
 * def console_set_color(color: int):             # <<<<<<<<<<<<<<
 *     if color < 0 or color > 4:
 *         raise ValueError()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.console_set_color", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":778
 *     CGL_console_set_color(color)
 * 
 * def printf_red(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_red(format.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_71printf_red(PyObject *__pyx_self, PyObject *__pyx_v_format); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_71printf_red = {"printf_red", (PyCFunction)__pyx_pw_3cgl_71printf_red, METH_O, 0};
static PyObject *__pyx_pw_3cgl_71printf_red(PyObject *__pyx_self, PyObject *__pyx_v_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("printf_red (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_format), (&PyString_Type), 1, "format", 1))) __PYX_ERR(0, 778, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_70printf_red(__pyx_self, ((PyObject*)__pyx_v_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_70printf_red(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("printf_red", 0);

  /* "cgl_wrapper.pyx":779
 * 
 * def printf_red(format: str):
 *     CGL_printf_red(format.encode())             # <<<<<<<<<<<<<<
 * 
 * def printf_green(format: str):
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L1_error)
  CGL_printf_red(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":778
 *     CGL_console_set_color(color)
 * 
 * def printf_red(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_red(format.encode())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.printf_red", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":781
 *     CGL_printf_red(format.encode())
 * 
 * def printf_green(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_green(format.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_73printf_green(PyObject *__pyx_self, PyObject *__pyx_v_format); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_73printf_green = {"printf_green", (PyCFunction)__pyx_pw_3cgl_73printf_green, METH_O, 0};
static PyObject *__pyx_pw_3cgl_73printf_green(PyObject *__pyx_self, PyObject *__pyx_v_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("printf_green (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_format), (&PyString_Type), 1, "format", 1))) __PYX_ERR(0, 781, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_72printf_green(__pyx_self, ((PyObject*)__pyx_v_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_72printf_green(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("printf_green", 0);

  /* "cgl_wrapper.pyx":782
 * 
 * def printf_green(format: str):
 *     CGL_printf_green(format.encode())             # <<<<<<<<<<<<<<
 * 
 * def printf_gray(format: str):
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 782, __pyx_L1_error)
  CGL_printf_green(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":781
 *     CGL_printf_red(format.encode())
 * 
 * def printf_green(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_green(format.encode())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.printf_green", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":784
 *     CGL_printf_green(format.encode())
 * 
 * def printf_gray(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_gray(format.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_75printf_gray(PyObject *__pyx_self, PyObject *__pyx_v_format); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_75printf_gray = {"printf_gray", (PyCFunction)__pyx_pw_3cgl_75printf_gray, METH_O, 0};
static PyObject *__pyx_pw_3cgl_75printf_gray(PyObject *__pyx_self, PyObject *__pyx_v_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("printf_gray (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_format), (&PyString_Type), 1, "format", 1))) __PYX_ERR(0, 784, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_74printf_gray(__pyx_self, ((PyObject*)__pyx_v_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_74printf_gray(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("printf_gray", 0);

  /* "cgl_wrapper.pyx":785
 * 
 * def printf_gray(format: str):
 *     CGL_printf_gray(format.encode())             # <<<<<<<<<<<<<<
 * 
 * def printf_blue(format: str):
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 785, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 785, __pyx_L1_error)
  CGL_printf_gray(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":784
 *     CGL_printf_green(format.encode())
 * 
 * def printf_gray(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_gray(format.encode())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.printf_gray", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":787
 *     CGL_printf_gray(format.encode())
 * 
 * def printf_blue(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_blue(format.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_77printf_blue(PyObject *__pyx_self, PyObject *__pyx_v_format); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_77printf_blue = {"printf_blue", (PyCFunction)__pyx_pw_3cgl_77printf_blue, METH_O, 0};
static PyObject *__pyx_pw_3cgl_77printf_blue(PyObject *__pyx_self, PyObject *__pyx_v_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("printf_blue (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_format), (&PyString_Type), 1, "format", 1))) __PYX_ERR(0, 787, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_76printf_blue(__pyx_self, ((PyObject*)__pyx_v_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_76printf_blue(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("printf_blue", 0);

  /* "cgl_wrapper.pyx":788
 * 
 * def printf_blue(format: str):
 *     CGL_printf_blue(format.encode())             # <<<<<<<<<<<<<<
 * 
 * def console_progress_bar(progress: float, width: int, prefix: str, suffix: str, complete_char: str = "#", incomplete_char: str = "_"):
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 788, __pyx_L1_error)
  CGL_printf_blue(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":787
 *     CGL_printf_gray(format.encode())
 * 
 * def printf_blue(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_blue(format.encode())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.printf_blue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":790
 *     CGL_printf_blue(format.encode())
 * 
 * def console_progress_bar(progress: float, width: int, prefix: str, suffix: str, complete_char: str = "#", incomplete_char: str = "_"):             # <<<<<<<<<<<<<<
 *     CGL_console_progress_bar(progress, width, prefix.encode(), suffix.encode(), complete_char[0], incomplete_char[0])
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_79console_progress_bar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_79console_progress_bar = {"console_progress_bar", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_79console_progress_bar, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_79console_progress_bar(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_progress;
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_prefix = 0;
  PyObject *__pyx_v_suffix = 0;
  PyObject *__pyx_v_complete_char = 0;
  PyObject *__pyx_v_incomplete_char = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("console_progress_bar (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_progress,&__pyx_n_s_width,&__pyx_n_s_prefix,&__pyx_n_s_suffix,&__pyx_n_s_complete_char,&__pyx_n_s_incomplete_char,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    values[4] = ((PyObject*)__pyx_kp_s_);
    values[5] = ((PyObject*)__pyx_n_s__2);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_progress)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("console_progress_bar", 0, 4, 6, 1); __PYX_ERR(0, 790, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_prefix)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("console_progress_bar", 0, 4, 6, 2); __PYX_ERR(0, 790, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_suffix)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("console_progress_bar", 0, 4, 6, 3); __PYX_ERR(0, 790, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_complete_char);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_incomplete_char);
          if (value) { values[5] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "console_progress_bar") < 0)) __PYX_ERR(0, 790, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_progress = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_progress == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 790, __pyx_L3_error)
    __pyx_v_width = values[1];
    __pyx_v_prefix = ((PyObject*)values[2]);
    __pyx_v_suffix = ((PyObject*)values[3]);
    __pyx_v_complete_char = ((PyObject*)values[4]);
    __pyx_v_incomplete_char = ((PyObject*)values[5]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("console_progress_bar", 0, 4, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 790, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.console_progress_bar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_prefix), (&PyString_Type), 1, "prefix", 1))) __PYX_ERR(0, 790, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_suffix), (&PyString_Type), 1, "suffix", 1))) __PYX_ERR(0, 790, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_complete_char), (&PyString_Type), 1, "complete_char", 1))) __PYX_ERR(0, 790, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_incomplete_char), (&PyString_Type), 1, "incomplete_char", 1))) __PYX_ERR(0, 790, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_78console_progress_bar(__pyx_self, __pyx_v_progress, __pyx_v_width, __pyx_v_prefix, __pyx_v_suffix, __pyx_v_complete_char, __pyx_v_incomplete_char);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_78console_progress_bar(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_progress, PyObject *__pyx_v_width, PyObject *__pyx_v_prefix, PyObject *__pyx_v_suffix, PyObject *__pyx_v_complete_char, PyObject *__pyx_v_incomplete_char) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  CGL_byte *__pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  CGL_byte *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  CGL_byte __pyx_t_7;
  CGL_byte __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("console_progress_bar", 0);

  /* "cgl_wrapper.pyx":791
 * 
 * def console_progress_bar(progress: float, width: int, prefix: str, suffix: str, complete_char: str = "#", incomplete_char: str = "_"):
 *     CGL_console_progress_bar(progress, width, prefix.encode(), suffix.encode(), complete_char[0], incomplete_char[0])             # <<<<<<<<<<<<<<
 * 
 * LOG_LEVEL_TRACE        = 0
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_AsWritableString(__pyx_t_2); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
  __pyx_t_4 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_suffix); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_AsWritableString(__pyx_t_4); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_complete_char, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyInt_As_CGL_byte(__pyx_t_6); if (unlikely((__pyx_t_7 == ((CGL_byte)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_incomplete_char, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_8 = __Pyx_PyInt_As_CGL_byte(__pyx_t_6); if (unlikely((__pyx_t_8 == ((CGL_byte)-1)) && PyErr_Occurred())) __PYX_ERR(0, 791, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  CGL_console_progress_bar(__pyx_v_progress, __pyx_t_1, __pyx_t_3, __pyx_t_5, __pyx_t_7, __pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":790
 *     CGL_printf_blue(format.encode())
 * 
 * def console_progress_bar(progress: float, width: int, prefix: str, suffix: str, complete_char: str = "#", incomplete_char: str = "_"):             # <<<<<<<<<<<<<<
 *     CGL_console_progress_bar(progress, width, prefix.encode(), suffix.encode(), complete_char[0], incomplete_char[0])
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.console_progress_bar", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":802
 * 
 * 
 * def logger_init(enable_console_logging: bool):             # <<<<<<<<<<<<<<
 *     CGL_logger_init(enable_console_logging)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_81logger_init(PyObject *__pyx_self, PyObject *__pyx_arg_enable_console_logging); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_81logger_init = {"logger_init", (PyCFunction)__pyx_pw_3cgl_81logger_init, METH_O, 0};
static PyObject *__pyx_pw_3cgl_81logger_init(PyObject *__pyx_self, PyObject *__pyx_arg_enable_console_logging) {
  bool __pyx_v_enable_console_logging;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_init (wrapper)", 0);
  assert(__pyx_arg_enable_console_logging); {
    __pyx_v_enable_console_logging = __Pyx_PyObject_IsTrue(__pyx_arg_enable_console_logging); if (unlikely((__pyx_v_enable_console_logging == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 802, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.logger_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_80logger_init(__pyx_self, ((bool)__pyx_v_enable_console_logging));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_80logger_init(CYTHON_UNUSED PyObject *__pyx_self, bool __pyx_v_enable_console_logging) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_init", 0);

  /* "cgl_wrapper.pyx":803
 * 
 * def logger_init(enable_console_logging: bool):
 *     CGL_logger_init(enable_console_logging)             # <<<<<<<<<<<<<<
 * 
 * def logger_shutdown():
 */
  CGL_logger_init(__pyx_v_enable_console_logging);

  /* "cgl_wrapper.pyx":802
 * 
 * 
 * def logger_init(enable_console_logging: bool):             # <<<<<<<<<<<<<<
 *     CGL_logger_init(enable_console_logging)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":805
 *     CGL_logger_init(enable_console_logging)
 * 
 * def logger_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_logger_shutdown()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_83logger_shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_83logger_shutdown = {"logger_shutdown", (PyCFunction)__pyx_pw_3cgl_83logger_shutdown, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_83logger_shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_shutdown (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_82logger_shutdown(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_82logger_shutdown(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_shutdown", 0);

  /* "cgl_wrapper.pyx":806
 * 
 * def logger_shutdown():
 *     CGL_logger_shutdown()             # <<<<<<<<<<<<<<
 * 
 * def logger_attach_log_file(path: str) -> bool:
 */
  CGL_logger_shutdown();

  /* "cgl_wrapper.pyx":805
 *     CGL_logger_init(enable_console_logging)
 * 
 * def logger_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_logger_shutdown()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":808
 *     CGL_logger_shutdown()
 * 
 * def logger_attach_log_file(path: str) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_logger_attach_log_file(path.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_85logger_attach_log_file(PyObject *__pyx_self, PyObject *__pyx_v_path); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_85logger_attach_log_file = {"logger_attach_log_file", (PyCFunction)__pyx_pw_3cgl_85logger_attach_log_file, METH_O, 0};
static PyObject *__pyx_pw_3cgl_85logger_attach_log_file(PyObject *__pyx_self, PyObject *__pyx_v_path) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_attach_log_file (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 808, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_84logger_attach_log_file(__pyx_self, ((PyObject*)__pyx_v_path));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_84logger_attach_log_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("logger_attach_log_file", 0);

  /* "cgl_wrapper.pyx":809
 * 
 * def logger_attach_log_file(path: str) -> bool:
 *     return CGL_logger_attach_log_file(path.encode())             # <<<<<<<<<<<<<<
 * 
 * def logger_detach_log_file(path: str) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 809, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyBool_FromLong(CGL_logger_attach_log_file(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":808
 *     CGL_logger_shutdown()
 * 
 * def logger_attach_log_file(path: str) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_logger_attach_log_file(path.encode())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.logger_attach_log_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":811
 *     return CGL_logger_attach_log_file(path.encode())
 * 
 * def logger_detach_log_file(path: str) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_logger_detach_log_file(path.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_87logger_detach_log_file(PyObject *__pyx_self, PyObject *__pyx_v_path); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_87logger_detach_log_file = {"logger_detach_log_file", (PyCFunction)__pyx_pw_3cgl_87logger_detach_log_file, METH_O, 0};
static PyObject *__pyx_pw_3cgl_87logger_detach_log_file(PyObject *__pyx_self, PyObject *__pyx_v_path) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_detach_log_file (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 811, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_86logger_detach_log_file(__pyx_self, ((PyObject*)__pyx_v_path));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_86logger_detach_log_file(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("logger_detach_log_file", 0);

  /* "cgl_wrapper.pyx":812
 * 
 * def logger_detach_log_file(path: str) -> bool:
 *     return CGL_logger_detach_log_file(path.encode())             # <<<<<<<<<<<<<<
 * 
 * def logger_flush():
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_path); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 812, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyBool_FromLong(CGL_logger_detach_log_file(__pyx_t_2)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":811
 *     return CGL_logger_attach_log_file(path.encode())
 * 
 * def logger_detach_log_file(path: str) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_logger_detach_log_file(path.encode())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.logger_detach_log_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":814
 *     return CGL_logger_detach_log_file(path.encode())
 * 
 * def logger_flush():             # <<<<<<<<<<<<<<
 *     CGL_logger_flush()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_89logger_flush(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_89logger_flush = {"logger_flush", (PyCFunction)__pyx_pw_3cgl_89logger_flush, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_89logger_flush(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_flush (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_88logger_flush(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_88logger_flush(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_flush", 0);

  /* "cgl_wrapper.pyx":815
 * 
 * def logger_flush():
 *     CGL_logger_flush()             # <<<<<<<<<<<<<<
 * 
 * def logger_disable_console_logging():
 */
  CGL_logger_flush();

  /* "cgl_wrapper.pyx":814
 *     return CGL_logger_detach_log_file(path.encode())
 * 
 * def logger_flush():             # <<<<<<<<<<<<<<
 *     CGL_logger_flush()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":817
 *     CGL_logger_flush()
 * 
 * def logger_disable_console_logging():             # <<<<<<<<<<<<<<
 *     CGL_logger_disable_console_logging()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_91logger_disable_console_logging(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_91logger_disable_console_logging = {"logger_disable_console_logging", (PyCFunction)__pyx_pw_3cgl_91logger_disable_console_logging, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_91logger_disable_console_logging(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_disable_console_logging (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_90logger_disable_console_logging(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_90logger_disable_console_logging(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_disable_console_logging", 0);

  /* "cgl_wrapper.pyx":818
 * 
 * def logger_disable_console_logging():
 *     CGL_logger_disable_console_logging()             # <<<<<<<<<<<<<<
 * 
 * def logger_enable_console_logging():
 */
  CGL_logger_disable_console_logging();

  /* "cgl_wrapper.pyx":817
 *     CGL_logger_flush()
 * 
 * def logger_disable_console_logging():             # <<<<<<<<<<<<<<
 *     CGL_logger_disable_console_logging()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":820
 *     CGL_logger_disable_console_logging()
 * 
 * def logger_enable_console_logging():             # <<<<<<<<<<<<<<
 *     CGL_logger_enable_console_logging()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_93logger_enable_console_logging(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_93logger_enable_console_logging = {"logger_enable_console_logging", (PyCFunction)__pyx_pw_3cgl_93logger_enable_console_logging, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_93logger_enable_console_logging(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_enable_console_logging (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_92logger_enable_console_logging(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_92logger_enable_console_logging(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_enable_console_logging", 0);

  /* "cgl_wrapper.pyx":821
 * 
 * def logger_enable_console_logging():
 *     CGL_logger_enable_console_logging()             # <<<<<<<<<<<<<<
 * 
 * def logger_log(level: int, log_format: str):
 */
  CGL_logger_enable_console_logging();

  /* "cgl_wrapper.pyx":820
 *     CGL_logger_disable_console_logging()
 * 
 * def logger_enable_console_logging():             # <<<<<<<<<<<<<<
 *     CGL_logger_enable_console_logging()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":823
 *     CGL_logger_enable_console_logging()
 * 
 * def logger_log(level: int, log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(level, log_format.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_95logger_log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_95logger_log = {"logger_log", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_95logger_log, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_95logger_log(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_level = 0;
  PyObject *__pyx_v_log_format = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("logger_log (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_level,&__pyx_n_s_log_format,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_log_format)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("logger_log", 1, 2, 2, 1); __PYX_ERR(0, 823, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "logger_log") < 0)) __PYX_ERR(0, 823, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_level = values[0];
    __pyx_v_log_format = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("logger_log", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 823, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.logger_log", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log_format), (&PyString_Type), 1, "log_format", 1))) __PYX_ERR(0, 823, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_94logger_log(__pyx_self, __pyx_v_level, __pyx_v_log_format);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_94logger_log(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_level, PyObject *__pyx_v_log_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  char const *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("logger_log", 0);

  /* "cgl_wrapper.pyx":824
 * 
 * def logger_log(level: int, log_format: str):
 *     CGL_logger_log(level, log_format.encode())             # <<<<<<<<<<<<<<
 * 
 * def log_trace(log_format: str):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_level); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_log_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_t_2); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L1_error)
  CGL_logger_log(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":823
 *     CGL_logger_enable_console_logging()
 * 
 * def logger_log(level: int, log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(level, log_format.encode())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.logger_log", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":826
 *     CGL_logger_log(level, log_format.encode())
 * 
 * def log_trace(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_TRACE, log_format.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_97log_trace(PyObject *__pyx_self, PyObject *__pyx_v_log_format); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_97log_trace = {"log_trace", (PyCFunction)__pyx_pw_3cgl_97log_trace, METH_O, 0};
static PyObject *__pyx_pw_3cgl_97log_trace(PyObject *__pyx_self, PyObject *__pyx_v_log_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("log_trace (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log_format), (&PyString_Type), 1, "log_format", 1))) __PYX_ERR(0, 826, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_96log_trace(__pyx_self, ((PyObject*)__pyx_v_log_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_96log_trace(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_log_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_int __pyx_t_2;
  char const *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("log_trace", 0);

  /* "cgl_wrapper.pyx":827
 * 
 * def log_trace(log_format: str):
 *     CGL_logger_log(LOG_LEVEL_TRACE, log_format.encode())             # <<<<<<<<<<<<<<
 * 
 * def log_info(log_format: str):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LOG_LEVEL_TRACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_log_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 827, __pyx_L1_error)
  CGL_logger_log(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":826
 *     CGL_logger_log(level, log_format.encode())
 * 
 * def log_trace(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_TRACE, log_format.encode())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.log_trace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":829
 *     CGL_logger_log(LOG_LEVEL_TRACE, log_format.encode())
 * 
 * def log_info(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_INFO, log_format.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_99log_info(PyObject *__pyx_self, PyObject *__pyx_v_log_format); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_99log_info = {"log_info", (PyCFunction)__pyx_pw_3cgl_99log_info, METH_O, 0};
static PyObject *__pyx_pw_3cgl_99log_info(PyObject *__pyx_self, PyObject *__pyx_v_log_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("log_info (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log_format), (&PyString_Type), 1, "log_format", 1))) __PYX_ERR(0, 829, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_98log_info(__pyx_self, ((PyObject*)__pyx_v_log_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_98log_info(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_log_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_int __pyx_t_2;
  char const *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("log_info", 0);

  /* "cgl_wrapper.pyx":830
 * 
 * def log_info(log_format: str):
 *     CGL_logger_log(LOG_LEVEL_INFO, log_format.encode())             # <<<<<<<<<<<<<<
 * 
 * def log_warn(log_format: str):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LOG_LEVEL_INFO); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_log_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L1_error)
  CGL_logger_log(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":829
 *     CGL_logger_log(LOG_LEVEL_TRACE, log_format.encode())
 * 
 * def log_info(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_INFO, log_format.encode())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.log_info", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":832
 *     CGL_logger_log(LOG_LEVEL_INFO, log_format.encode())
 * 
 * def log_warn(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_WARN, log_format.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_101log_warn(PyObject *__pyx_self, PyObject *__pyx_v_log_format); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_101log_warn = {"log_warn", (PyCFunction)__pyx_pw_3cgl_101log_warn, METH_O, 0};
static PyObject *__pyx_pw_3cgl_101log_warn(PyObject *__pyx_self, PyObject *__pyx_v_log_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("log_warn (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log_format), (&PyString_Type), 1, "log_format", 1))) __PYX_ERR(0, 832, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_100log_warn(__pyx_self, ((PyObject*)__pyx_v_log_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_100log_warn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_log_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_int __pyx_t_2;
  char const *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("log_warn", 0);

  /* "cgl_wrapper.pyx":833
 * 
 * def log_warn(log_format: str):
 *     CGL_logger_log(LOG_LEVEL_WARN, log_format.encode())             # <<<<<<<<<<<<<<
 * 
 * def log_error(log_format: str):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LOG_LEVEL_WARN); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_log_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 833, __pyx_L1_error)
  CGL_logger_log(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":832
 *     CGL_logger_log(LOG_LEVEL_INFO, log_format.encode())
 * 
 * def log_warn(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_WARN, log_format.encode())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.log_warn", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":835
 *     CGL_logger_log(LOG_LEVEL_WARN, log_format.encode())
 * 
 * def log_error(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_ERROR, log_format.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_103log_error(PyObject *__pyx_self, PyObject *__pyx_v_log_format); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_103log_error = {"log_error", (PyCFunction)__pyx_pw_3cgl_103log_error, METH_O, 0};
static PyObject *__pyx_pw_3cgl_103log_error(PyObject *__pyx_self, PyObject *__pyx_v_log_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("log_error (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log_format), (&PyString_Type), 1, "log_format", 1))) __PYX_ERR(0, 835, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_102log_error(__pyx_self, ((PyObject*)__pyx_v_log_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_102log_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_log_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_int __pyx_t_2;
  char const *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("log_error", 0);

  /* "cgl_wrapper.pyx":836
 * 
 * def log_error(log_format: str):
 *     CGL_logger_log(LOG_LEVEL_ERROR, log_format.encode())             # <<<<<<<<<<<<<<
 * 
 * def log_internal(log_format: str):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LOG_LEVEL_ERROR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_log_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 836, __pyx_L1_error)
  CGL_logger_log(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":835
 *     CGL_logger_log(LOG_LEVEL_WARN, log_format.encode())
 * 
 * def log_error(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_ERROR, log_format.encode())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.log_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":838
 *     CGL_logger_log(LOG_LEVEL_ERROR, log_format.encode())
 * 
 * def log_internal(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_INTERNAL, log_format.encode())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_105log_internal(PyObject *__pyx_self, PyObject *__pyx_v_log_format); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_105log_internal = {"log_internal", (PyCFunction)__pyx_pw_3cgl_105log_internal, METH_O, 0};
static PyObject *__pyx_pw_3cgl_105log_internal(PyObject *__pyx_self, PyObject *__pyx_v_log_format) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("log_internal (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log_format), (&PyString_Type), 1, "log_format", 1))) __PYX_ERR(0, 838, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_104log_internal(__pyx_self, ((PyObject*)__pyx_v_log_format));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_104log_internal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_log_format) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_int __pyx_t_2;
  char const *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("log_internal", 0);

  /* "cgl_wrapper.pyx":839
 * 
 * def log_internal(log_format: str):
 *     CGL_logger_log(LOG_LEVEL_INTERNAL, log_format.encode())             # <<<<<<<<<<<<<<
 * 
 * def utils_crc32(data: bytes) -> int:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_LOG_LEVEL_INTERNAL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_encode, __pyx_v_log_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 839, __pyx_L1_error)
  CGL_logger_log(__pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":838
 *     CGL_logger_log(LOG_LEVEL_ERROR, log_format.encode())
 * 
 * def log_internal(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_INTERNAL, log_format.encode())
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.log_internal", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":841
 *     CGL_logger_log(LOG_LEVEL_INTERNAL, log_format.encode())
 * 
 * def utils_crc32(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_crc32(<void*>data, len(data))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_107utils_crc32(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_107utils_crc32 = {"utils_crc32", (PyCFunction)__pyx_pw_3cgl_107utils_crc32, METH_O, 0};
static PyObject *__pyx_pw_3cgl_107utils_crc32(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_crc32 (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 841, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_106utils_crc32(__pyx_self, ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_106utils_crc32(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_crc32", 0);

  /* "cgl_wrapper.pyx":842
 * 
 * def utils_crc32(data: bytes) -> int:
 *     return CGL_utils_crc32(<void*>data, len(data))             # <<<<<<<<<<<<<<
 * 
 * def utils_crc64(data: bytes) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 842, __pyx_L1_error)
  }
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 842, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_uint32_t(CGL_utils_crc32(((void *)__pyx_v_data), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 842, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":841
 *     CGL_logger_log(LOG_LEVEL_INTERNAL, log_format.encode())
 * 
 * def utils_crc32(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_crc32(<void*>data, len(data))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.utils_crc32", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":844
 *     return CGL_utils_crc32(<void*>data, len(data))
 * 
 * def utils_crc64(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_crc64(<void*>data, len(data))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_109utils_crc64(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_109utils_crc64 = {"utils_crc64", (PyCFunction)__pyx_pw_3cgl_109utils_crc64, METH_O, 0};
static PyObject *__pyx_pw_3cgl_109utils_crc64(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_crc64 (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 844, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_108utils_crc64(__pyx_self, ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_108utils_crc64(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_crc64", 0);

  /* "cgl_wrapper.pyx":845
 * 
 * def utils_crc64(data: bytes) -> int:
 *     return CGL_utils_crc64(<void*>data, len(data))             # <<<<<<<<<<<<<<
 * 
 * def utils_rot13(data: bytes) -> bytes:
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 845, __pyx_L1_error)
  }
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 845, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_uint64_t(CGL_utils_crc64(((void *)__pyx_v_data), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":844
 *     return CGL_utils_crc32(<void*>data, len(data))
 * 
 * def utils_crc64(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_crc64(<void*>data, len(data))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.utils_crc64", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":847
 *     return CGL_utils_crc64(<void*>data, len(data))
 * 
 * def utils_rot13(data: bytes) -> bytes:             # <<<<<<<<<<<<<<
 *     result = bytes(len(data))
 *     CGL_utils_rot13(<char*>data, <char*>result)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_111utils_rot13(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_111utils_rot13 = {"utils_rot13", (PyCFunction)__pyx_pw_3cgl_111utils_rot13, METH_O, 0};
static PyObject *__pyx_pw_3cgl_111utils_rot13(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_rot13 (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 847, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_110utils_rot13(__pyx_self, ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_110utils_rot13(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  char *__pyx_t_4;
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_rot13", 0);

  /* "cgl_wrapper.pyx":848
 * 
 * def utils_rot13(data: bytes) -> bytes:
 *     result = bytes(len(data))             # <<<<<<<<<<<<<<
 *     CGL_utils_rot13(<char*>data, <char*>result)
 *     return result
 */
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 848, __pyx_L1_error)
  }
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 848, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 848, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":849
 * def utils_rot13(data: bytes) -> bytes:
 *     result = bytes(len(data))
 *     CGL_utils_rot13(<char*>data, <char*>result)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 849, __pyx_L1_error)
  }
  __pyx_t_4 = __Pyx_PyBytes_AsWritableString(__pyx_v_data); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyBytes_AsWritableString(__pyx_v_result); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 849, __pyx_L1_error)
  CGL_utils_rot13(((char *)__pyx_t_4), ((char *)__pyx_t_5));

  /* "cgl_wrapper.pyx":850
 *     result = bytes(len(data))
 *     CGL_utils_rot13(<char*>data, <char*>result)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def utils_super_fast_hash(data: bytes) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":847
 *     return CGL_utils_crc64(<void*>data, len(data))
 * 
 * def utils_rot13(data: bytes) -> bytes:             # <<<<<<<<<<<<<<
 *     result = bytes(len(data))
 *     CGL_utils_rot13(<char*>data, <char*>result)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.utils_rot13", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":852
 *     return result
 * 
 * def utils_super_fast_hash(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_super_fast_hash(<void*>data, len(data))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_113utils_super_fast_hash(PyObject *__pyx_self, PyObject *__pyx_v_data); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_113utils_super_fast_hash = {"utils_super_fast_hash", (PyCFunction)__pyx_pw_3cgl_113utils_super_fast_hash, METH_O, 0};
static PyObject *__pyx_pw_3cgl_113utils_super_fast_hash(PyObject *__pyx_self, PyObject *__pyx_v_data) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("utils_super_fast_hash (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 852, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_112utils_super_fast_hash(__pyx_self, ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_112utils_super_fast_hash(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("utils_super_fast_hash", 0);

  /* "cgl_wrapper.pyx":853
 * 
 * def utils_super_fast_hash(data: bytes) -> int:
 *     return CGL_utils_super_fast_hash(<void*>data, len(data))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 853, __pyx_L1_error)
  }
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 853, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_uint32_t(CGL_utils_super_fast_hash(((void *)__pyx_v_data), __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":852
 *     return result
 * 
 * def utils_super_fast_hash(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_super_fast_hash(<void*>data, len(data))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.utils_super_fast_hash", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":867
 * SQRT8 = (2.82842712474619009760)
 * 
 * def deg_to_rad(deg):             # <<<<<<<<<<<<<<
 *     return ((deg) * (PI / 180.0))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_115deg_to_rad(PyObject *__pyx_self, PyObject *__pyx_v_deg); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_115deg_to_rad = {"deg_to_rad", (PyCFunction)__pyx_pw_3cgl_115deg_to_rad, METH_O, 0};
static PyObject *__pyx_pw_3cgl_115deg_to_rad(PyObject *__pyx_self, PyObject *__pyx_v_deg) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("deg_to_rad (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_114deg_to_rad(__pyx_self, ((PyObject *)__pyx_v_deg));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_114deg_to_rad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_deg) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("deg_to_rad", 0);

  /* "cgl_wrapper.pyx":868
 * 
 * def deg_to_rad(deg):
 *     return ((deg) * (PI / 180.0))             # <<<<<<<<<<<<<<
 * 
 * def rad_to_deg(rad):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyFloat_DivideObjC(__pyx_t_1, __pyx_float_180_0, 180.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_deg, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":867
 * SQRT8 = (2.82842712474619009760)
 * 
 * def deg_to_rad(deg):             # <<<<<<<<<<<<<<
 *     return ((deg) * (PI / 180.0))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.deg_to_rad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":870
 *     return ((deg) * (PI / 180.0))
 * 
 * def rad_to_deg(rad):             # <<<<<<<<<<<<<<
 *     return ((rad) * (180.0 / PI))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_117rad_to_deg(PyObject *__pyx_self, PyObject *__pyx_v_rad); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_117rad_to_deg = {"rad_to_deg", (PyCFunction)__pyx_pw_3cgl_117rad_to_deg, METH_O, 0};
static PyObject *__pyx_pw_3cgl_117rad_to_deg(PyObject *__pyx_self, PyObject *__pyx_v_rad) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("rad_to_deg (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_116rad_to_deg(__pyx_self, ((PyObject *)__pyx_v_rad));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_116rad_to_deg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_rad) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("rad_to_deg", 0);

  /* "cgl_wrapper.pyx":871
 * 
 * def rad_to_deg(rad):
 *     return ((rad) * (180.0 / PI))             # <<<<<<<<<<<<<<
 * 
 * def float_lerp(a: float, b: float, t: float):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PI); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyFloat_DivideCObj(__pyx_float_180_0, __pyx_t_1, 180.0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_rad, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":870
 *     return ((deg) * (PI / 180.0))
 * 
 * def rad_to_deg(rad):             # <<<<<<<<<<<<<<
 *     return ((rad) * (180.0 / PI))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.rad_to_deg", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":873
 *     return ((rad) * (180.0 / PI))
 * 
 * def float_lerp(a: float, b: float, t: float):             # <<<<<<<<<<<<<<
 *     return ((a) + ((b) - (a)) * (t))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_119float_lerp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_119float_lerp = {"float_lerp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_119float_lerp, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_119float_lerp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_a;
  double __pyx_v_b;
  double __pyx_v_t;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("float_lerp (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_t,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("float_lerp", 1, 3, 3, 1); __PYX_ERR(0, 873, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("float_lerp", 1, 3, 3, 2); __PYX_ERR(0, 873, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "float_lerp") < 0)) __PYX_ERR(0, 873, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_a == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
    __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("float_lerp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 873, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.float_lerp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_118float_lerp(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_t);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_118float_lerp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a, double __pyx_v_b, double __pyx_v_t) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("float_lerp", 0);

  /* "cgl_wrapper.pyx":874
 * 
 * def float_lerp(a: float, b: float, t: float):
 *     return ((a) + ((b) - (a)) * (t))             # <<<<<<<<<<<<<<
 * 
 * def float_quadratic_lerp(a: float, b: float, c: float, t: float) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_a + ((__pyx_v_b - __pyx_v_a) * __pyx_v_t))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":873
 *     return ((rad) * (180.0 / PI))
 * 
 * def float_lerp(a: float, b: float, t: float):             # <<<<<<<<<<<<<<
 *     return ((a) + ((b) - (a)) * (t))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.float_lerp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":876
 *     return ((a) + ((b) - (a)) * (t))
 * 
 * def float_quadratic_lerp(a: float, b: float, c: float, t: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_float_quadratic_lerp(a, b, c, t)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_121float_quadratic_lerp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_121float_quadratic_lerp = {"float_quadratic_lerp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_121float_quadratic_lerp, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_121float_quadratic_lerp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_a;
  double __pyx_v_b;
  double __pyx_v_c;
  double __pyx_v_t;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("float_quadratic_lerp (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,&__pyx_n_s_t,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("float_quadratic_lerp", 1, 4, 4, 1); __PYX_ERR(0, 876, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("float_quadratic_lerp", 1, 4, 4, 2); __PYX_ERR(0, 876, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("float_quadratic_lerp", 1, 4, 4, 3); __PYX_ERR(0, 876, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "float_quadratic_lerp") < 0)) __PYX_ERR(0, 876, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_a = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_a == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L3_error)
    __pyx_v_c = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_c == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L3_error)
    __pyx_v_t = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 876, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("float_quadratic_lerp", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 876, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.float_quadratic_lerp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_120float_quadratic_lerp(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c, __pyx_v_t);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_120float_quadratic_lerp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a, double __pyx_v_b, double __pyx_v_c, double __pyx_v_t) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("float_quadratic_lerp", 0);

  /* "cgl_wrapper.pyx":877
 * 
 * def float_quadratic_lerp(a: float, b: float, c: float, t: float) -> float:
 *     return CGL_float_quadratic_lerp(a, b, c, t)             # <<<<<<<<<<<<<<
 * 
 * def float_cubic_lerp(a: float, b: float, c: float, d: float, t: float) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_float_quadratic_lerp(__pyx_v_a, __pyx_v_b, __pyx_v_c, __pyx_v_t)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":876
 *     return ((a) + ((b) - (a)) * (t))
 * 
 * def float_quadratic_lerp(a: float, b: float, c: float, t: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_float_quadratic_lerp(a, b, c, t)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.float_quadratic_lerp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":879
 *     return CGL_float_quadratic_lerp(a, b, c, t)
 * 
 * def float_cubic_lerp(a: float, b: float, c: float, d: float, t: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_float_cubic_lerp(a, b, c, d, t)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_123float_cubic_lerp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_123float_cubic_lerp = {"float_cubic_lerp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_123float_cubic_lerp, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_123float_cubic_lerp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_a;
  double __pyx_v_b;
  double __pyx_v_c;
  double __pyx_v_d;
  double __pyx_v_t;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("float_cubic_lerp (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,&__pyx_n_s_d,&__pyx_n_s_t,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("float_cubic_lerp", 1, 5, 5, 1); __PYX_ERR(0, 879, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("float_cubic_lerp", 1, 5, 5, 2); __PYX_ERR(0, 879, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("float_cubic_lerp", 1, 5, 5, 3); __PYX_ERR(0, 879, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("float_cubic_lerp", 1, 5, 5, 4); __PYX_ERR(0, 879, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "float_cubic_lerp") < 0)) __PYX_ERR(0, 879, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_a = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_a == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L3_error)
    __pyx_v_c = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_c == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L3_error)
    __pyx_v_d = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_d == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L3_error)
    __pyx_v_t = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("float_cubic_lerp", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 879, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.float_cubic_lerp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_122float_cubic_lerp(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c, __pyx_v_d, __pyx_v_t);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_122float_cubic_lerp(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_a, double __pyx_v_b, double __pyx_v_c, double __pyx_v_d, double __pyx_v_t) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("float_cubic_lerp", 0);

  /* "cgl_wrapper.pyx":880
 * 
 * def float_cubic_lerp(a: float, b: float, c: float, d: float, t: float) -> float:
 *     return CGL_float_cubic_lerp(a, b, c, d, t)             # <<<<<<<<<<<<<<
 * 
 * cdef class vec2:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_float_cubic_lerp(__pyx_v_a, __pyx_v_b, __pyx_v_c, __pyx_v_d, __pyx_v_t)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":879
 *     return CGL_float_quadratic_lerp(a, b, c, t)
 * 
 * def float_cubic_lerp(a: float, b: float, c: float, d: float, t: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_float_cubic_lerp(a, b, c, d, t)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.float_cubic_lerp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":885
 *     cdef CGL_vec2 c_vec2
 * 
 *     def __init__(self, x: float = 0.0, y: float = 0.0):             # <<<<<<<<<<<<<<
 *         self.c_vec2 = CGL_vec2(x, y)
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4vec2_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_4vec2_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 885, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L3_error)
    } else {
      __pyx_v_x = ((double)0.0);
    }
    if (values[1]) {
      __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 885, __pyx_L3_error)
    } else {
      __pyx_v_y = ((double)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 885, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.vec2.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_4vec2___init__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self), __pyx_v_x, __pyx_v_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4vec2___init__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, double __pyx_v_x, double __pyx_v_y) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  struct CGL_vec2 __pyx_t_1;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":886
 * 
 *     def __init__(self, x: float = 0.0, y: float = 0.0):
 *         self.c_vec2 = CGL_vec2(x, y)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_1.x = __pyx_v_x;
  __pyx_t_1.y = __pyx_v_y;
  __pyx_v_self->c_vec2 = __pyx_t_1;

  /* "cgl_wrapper.pyx":885
 *     cdef CGL_vec2 c_vec2
 * 
 *     def __init__(self, x: float = 0.0, y: float = 0.0):             # <<<<<<<<<<<<<<
 *         self.c_vec2 = CGL_vec2(x, y)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":888
 *         self.c_vec2 = CGL_vec2(x, y)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"vec2({self.x}, {self.y})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_2__repr__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_2__repr__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":889
 * 
 *     def __repr__(self):
 *         return f"vec2({self.x}, {self.y})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_vec2);
  __pyx_t_2 += 5;
  __Pyx_GIVEREF(__pyx_kp_u_vec2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_vec2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":888
 *         self.c_vec2 = CGL_vec2(x, y)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"vec2({self.x}, {self.y})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec2.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":891
 *         return f"vec2({self.x}, {self.y})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"vec2({self.x}, {self.y})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_4__str__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_4__str__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":892
 * 
 *     def __str__(self):
 *         return f"vec2({self.x}, {self.y})"             # <<<<<<<<<<<<<<
 * 
 *     def __bytes__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_vec2);
  __pyx_t_2 += 5;
  __Pyx_GIVEREF(__pyx_kp_u_vec2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_vec2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":891
 *         return f"vec2({self.x}, {self.y})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"vec2({self.x}, {self.y})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec2.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":894
 *         return f"vec2({self.x}, {self.y})"
 * 
 *     def __bytes__(self):             # <<<<<<<<<<<<<<
 *         return bytes(self.c_vec2)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_7__bytes__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_7__bytes__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bytes__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_6__bytes__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_6__bytes__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__bytes__", 0);

  /* "cgl_wrapper.pyx":895
 * 
 *     def __bytes__(self):
 *         return bytes(self.c_vec2)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_vec2(__pyx_v_self->c_vec2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":894
 *         return f"vec2({self.x}, {self.y})"
 * 
 *     def __bytes__(self):             # <<<<<<<<<<<<<<
 *         return bytes(self.c_vec2)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.vec2.__bytes__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":897
 *         return bytes(self.c_vec2)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 2
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_3cgl_4vec2_9__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_3cgl_4vec2_9__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_8__len__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_3cgl_4vec2_8__len__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec2 *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "cgl_wrapper.pyx":898
 * 
 *     def __len__(self):
 *         return 2             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index: int):
 */
  __pyx_r = 2;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":897
 *         return bytes(self.c_vec2)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 2
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":900
 *         return 2
 * 
 *     def __getitem__(self, index: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             return self.c_vec2.x
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_10__getitem__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_10__getitem__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "cgl_wrapper.pyx":901
 * 
 *     def __getitem__(self, index: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             return self.c_vec2.x
 *         elif index == 1:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 901, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":902
 *     def __getitem__(self, index: int):
 *         if index == 0:
 *             return self.c_vec2.x             # <<<<<<<<<<<<<<
 *         elif index == 1:
 *             return self.c_vec2.y
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec2.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":901
 * 
 *     def __getitem__(self, index: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             return self.c_vec2.x
 *         elif index == 1:
 */
  }

  /* "cgl_wrapper.pyx":903
 *         if index == 0:
 *             return self.c_vec2.x
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             return self.c_vec2.y
 *         else:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":904
 *             return self.c_vec2.x
 *         elif index == 1:
 *             return self.c_vec2.y             # <<<<<<<<<<<<<<
 *         else:
 *             raise IndexError()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec2.y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":903
 *         if index == 0:
 *             return self.c_vec2.x
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             return self.c_vec2.y
 *         else:
 */
  }

  /* "cgl_wrapper.pyx":906
 *             return self.c_vec2.y
 *         else:
 *             raise IndexError()             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, index: int, value: int):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_IndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 906, __pyx_L1_error)
  }

  /* "cgl_wrapper.pyx":900
 *         return 2
 * 
 *     def __getitem__(self, index: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             return self.c_vec2.x
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec2.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":908
 *             raise IndexError()
 * 
 *     def __setitem__(self, index: int, value: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             self.c_vec2.x = value
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4vec2_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_4vec2_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_12__setitem__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4vec2_12__setitem__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  CGL_float __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "cgl_wrapper.pyx":909
 * 
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             self.c_vec2.x = value
 *         elif index == 1:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":910
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:
 *             self.c_vec2.x = value             # <<<<<<<<<<<<<<
 *         elif index == 1:
 *             self.c_vec2.y = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 910, __pyx_L1_error)
    __pyx_v_self->c_vec2.x = __pyx_t_3;

    /* "cgl_wrapper.pyx":909
 * 
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             self.c_vec2.x = value
 *         elif index == 1:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":911
 *         if index == 0:
 *             self.c_vec2.x = value
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             self.c_vec2.y = value
 *         else:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 911, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":912
 *             self.c_vec2.x = value
 *         elif index == 1:
 *             self.c_vec2.y = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise IndexError()
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 912, __pyx_L1_error)
    __pyx_v_self->c_vec2.y = __pyx_t_3;

    /* "cgl_wrapper.pyx":911
 *         if index == 0:
 *             self.c_vec2.x = value
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             self.c_vec2.y = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":914
 *             self.c_vec2.y = value
 *         else:
 *             raise IndexError()             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other: vec2):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_IndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 914, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 914, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cgl_wrapper.pyx":908
 *             raise IndexError()
 * 
 *     def __setitem__(self, index: int, value: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             self.c_vec2.x = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec2.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":916
 *             raise IndexError()
 * 
 *     def __eq__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return self.c_vec2.x == other.c_vec2.x and self.c_vec2.y == other.c_vec2.y
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_15__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_15__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec2, 1, "other", 0))) __PYX_ERR(0, 916, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_14__eq__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_14__eq__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "cgl_wrapper.pyx":917
 * 
 *     def __eq__(self, other: vec2):
 *         return self.c_vec2.x == other.c_vec2.x and self.c_vec2.y == other.c_vec2.y             # <<<<<<<<<<<<<<
 * 
 *     def __ne__(self, other: vec2):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->c_vec2.x == __pyx_v_other->c_vec2.x);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec2.y == __pyx_v_other->c_vec2.y);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 917, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":916
 *             raise IndexError()
 * 
 *     def __eq__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return self.c_vec2.x == other.c_vec2.x and self.c_vec2.y == other.c_vec2.y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec2.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":919
 *         return self.c_vec2.x == other.c_vec2.x and self.c_vec2.y == other.c_vec2.y
 * 
 *     def __ne__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return self.c_vec2.x != other.c_vec2.x or self.c_vec2.y != other.c_vec2.y
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_17__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_17__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec2, 1, "other", 0))) __PYX_ERR(0, 919, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_16__ne__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_16__ne__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__ne__", 0);

  /* "cgl_wrapper.pyx":920
 * 
 *     def __ne__(self, other: vec2):
 *         return self.c_vec2.x != other.c_vec2.x or self.c_vec2.y != other.c_vec2.y             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->c_vec2.x != __pyx_v_other->c_vec2.x);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec2.y != __pyx_v_other->c_vec2.y);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":919
 *         return self.c_vec2.x == other.c_vec2.x and self.c_vec2.y == other.c_vec2.y
 * 
 *     def __ne__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return self.c_vec2.x != other.c_vec2.x or self.c_vec2.y != other.c_vec2.y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec2.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":922
 *         return self.c_vec2.x != other.c_vec2.x or self.c_vec2.y != other.c_vec2.y
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.c_vec2.x, self.c_vec2.y))
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_4vec2_19__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_4vec2_19__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_18__hash__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_4vec2_18__hash__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":923
 * 
 *     def __hash__(self):
 *         return hash((self.c_vec2.x, self.c_vec2.y))             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, name: str):
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec2.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_vec2.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_4 = PyObject_Hash(__pyx_t_3); if (unlikely(__pyx_t_4 == ((Py_hash_t)-1))) __PYX_ERR(0, 923, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":922
 *         return self.c_vec2.x != other.c_vec2.x or self.c_vec2.y != other.c_vec2.y
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.c_vec2.x, self.c_vec2.y))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec2.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":925
 *         return hash((self.c_vec2.x, self.c_vec2.y))
 * 
 *     def __getattr__(self, name: str):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             return self.c_vec2.x
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_21__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_21__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 925, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_20__getattr__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self), ((PyObject*)__pyx_v_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_20__getattr__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "cgl_wrapper.pyx":926
 * 
 *     def __getattr__(self, name: str):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             return self.c_vec2.x
 *         elif name == "y":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_x, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 926, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":927
 *     def __getattr__(self, name: str):
 *         if name == "x":
 *             return self.c_vec2.x             # <<<<<<<<<<<<<<
 *         elif name == "y":
 *             return self.c_vec2.y
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec2.x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":926
 * 
 *     def __getattr__(self, name: str):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             return self.c_vec2.x
 *         elif name == "y":
 */
  }

  /* "cgl_wrapper.pyx":928
 *         if name == "x":
 *             return self.c_vec2.x
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             return self.c_vec2.y
 *         else:
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_y, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 928, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":929
 *             return self.c_vec2.x
 *         elif name == "y":
 *             return self.c_vec2.y             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec2.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 929, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":928
 *         if name == "x":
 *             return self.c_vec2.x
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             return self.c_vec2.y
 *         else:
 */
  }

  /* "cgl_wrapper.pyx":931
 *             return self.c_vec2.y
 *         else:
 *             raise AttributeError()             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self, name: str, value):
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 931, __pyx_L1_error)
  }

  /* "cgl_wrapper.pyx":925
 *         return hash((self.c_vec2.x, self.c_vec2.y))
 * 
 *     def __getattr__(self, name: str):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             return self.c_vec2.x
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec2.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":933
 *             raise AttributeError()
 * 
 *     def __setattr__(self, name: str, value):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             self.c_vec2.x = value
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4vec2_23__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_4vec2_23__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 933, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_22__setattr__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self), ((PyObject*)__pyx_v_name), ((PyObject *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4vec2_22__setattr__(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  CGL_float __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setattr__", 0);

  /* "cgl_wrapper.pyx":934
 * 
 *     def __setattr__(self, name: str, value):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             self.c_vec2.x = value
 *         elif name == "y":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_x, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 934, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":935
 *     def __setattr__(self, name: str, value):
 *         if name == "x":
 *             self.c_vec2.x = value             # <<<<<<<<<<<<<<
 *         elif name == "y":
 *             self.c_vec2.y = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 935, __pyx_L1_error)
    __pyx_v_self->c_vec2.x = __pyx_t_3;

    /* "cgl_wrapper.pyx":934
 * 
 *     def __setattr__(self, name: str, value):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             self.c_vec2.x = value
 *         elif name == "y":
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":936
 *         if name == "x":
 *             self.c_vec2.x = value
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             self.c_vec2.y = value
 *         else:
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_y, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 936, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":937
 *             self.c_vec2.x = value
 *         elif name == "y":
 *             self.c_vec2.y = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError()
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 937, __pyx_L1_error)
    __pyx_v_self->c_vec2.y = __pyx_t_3;

    /* "cgl_wrapper.pyx":936
 *         if name == "x":
 *             self.c_vec2.x = value
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             self.c_vec2.y = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":939
 *             self.c_vec2.y = value
 *         else:
 *             raise AttributeError()             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other: vec2):
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 939, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cgl_wrapper.pyx":933
 *             raise AttributeError()
 * 
 *     def __setattr__(self, name: str, value):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             self.c_vec2.x = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":941
 *             raise AttributeError()
 * 
 *     def __add__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return vec2(self.x + other.x, self.y + other.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_25__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_25__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec2, 1, "other", 0))) __PYX_ERR(0, 941, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_24__add__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_24__add__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);

  /* "cgl_wrapper.pyx":942
 * 
 *     def __add__(self, other: vec2):
 *         return vec2(self.x + other.x, self.y + other.y)             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self, other: vec2):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":941
 *             raise AttributeError()
 * 
 *     def __add__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return vec2(self.x + other.x, self.y + other.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":944
 *         return vec2(self.x + other.x, self.y + other.y)
 * 
 *     def __sub__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return vec2(self.x - other.x, self.y - other.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_27__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_27__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec2, 1, "other", 0))) __PYX_ERR(0, 944, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_26__sub__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_26__sub__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);

  /* "cgl_wrapper.pyx":945
 * 
 *     def __sub__(self, other: vec2):
 *         return vec2(self.x - other.x, self.y - other.y)             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(self, other: vec2):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":944
 *         return vec2(self.x + other.x, self.y + other.y)
 * 
 *     def __sub__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return vec2(self.x - other.x, self.y - other.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":947
 *         return vec2(self.x - other.x, self.y - other.y)
 * 
 *     def __mul__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return vec2(self.x * other.x, self.y * other.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_29__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_29__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec2, 1, "other", 0))) __PYX_ERR(0, 947, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_28__mul__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_28__mul__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "cgl_wrapper.pyx":948
 * 
 *     def __mul__(self, other: vec2):
 *         return vec2(self.x * other.x, self.y * other.y)             # <<<<<<<<<<<<<<
 * 
 *     def __truediv__(self, other: vec2):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":947
 *         return vec2(self.x - other.x, self.y - other.y)
 * 
 *     def __mul__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return vec2(self.x * other.x, self.y * other.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":950
 *         return vec2(self.x * other.x, self.y * other.y)
 * 
 *     def __truediv__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return vec2(self.x / other.x, self.y / other.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec2, 1, "other", 0))) __PYX_ERR(0, 950, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_30__truediv__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_30__truediv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__truediv__", 0);

  /* "cgl_wrapper.pyx":951
 * 
 *     def __truediv__(self, other: vec2):
 *         return vec2(self.x / other.x, self.y / other.y)             # <<<<<<<<<<<<<<
 * 
 *     def __floordiv__(self, other: vec2):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":950
 *         return vec2(self.x * other.x, self.y * other.y)
 * 
 *     def __truediv__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return vec2(self.x / other.x, self.y / other.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":953
 *         return vec2(self.x / other.x, self.y / other.y)
 * 
 *     def __floordiv__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return vec2(self.x // other.x, self.y // other.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_33__floordiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_33__floordiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__floordiv__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec2, 1, "other", 0))) __PYX_ERR(0, 953, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_32__floordiv__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_32__floordiv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__floordiv__", 0);

  /* "cgl_wrapper.pyx":954
 * 
 *     def __floordiv__(self, other: vec2):
 *         return vec2(self.x // other.x, self.y // other.y)             # <<<<<<<<<<<<<<
 * 
 *     def dot(self, other: vec2):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_FloorDivide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_FloorDivide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":953
 *         return vec2(self.x / other.x, self.y / other.y)
 * 
 *     def __floordiv__(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return vec2(self.x // other.x, self.y // other.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2.__floordiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":956
 *         return vec2(self.x // other.x, self.y // other.y)
 * 
 *     def dot(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return (self.x * other.x) + (self.y * other.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_35dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_35dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dot (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec2, 1, "other", 0))) __PYX_ERR(0, 956, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_34dot(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_34dot(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dot", 0);

  /* "cgl_wrapper.pyx":957
 * 
 *     def dot(self, other: vec2):
 *         return (self.x * other.x) + (self.y * other.y)             # <<<<<<<<<<<<<<
 * 
 *     def cross(self, other: vec2):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 957, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":956
 *         return vec2(self.x // other.x, self.y // other.y)
 * 
 *     def dot(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return (self.x * other.x) + (self.y * other.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":959
 *         return (self.x * other.x) + (self.y * other.y)
 * 
 *     def cross(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return (self.x * other.y) - (self.y * other.x)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_37cross(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_37cross(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cross (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec2, 1, "other", 0))) __PYX_ERR(0, 959, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec2_36cross(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec2 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_36cross(struct __pyx_obj_3cgl_vec2 *__pyx_v_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cross", 0);

  /* "cgl_wrapper.pyx":960
 * 
 *     def cross(self, other: vec2):
 *         return (self.x * other.y) - (self.y * other.x)             # <<<<<<<<<<<<<<
 * 
 *     def length(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":959
 *         return (self.x * other.x) + (self.y * other.y)
 * 
 *     def cross(self, other: vec2):             # <<<<<<<<<<<<<<
 *         return (self.x * other.y) - (self.y * other.x)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2.cross", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":962
 *         return (self.x * other.y) - (self.y * other.x)
 * 
 *     def length(self):             # <<<<<<<<<<<<<<
 *         return math.sqrt((self.x * self.x) + (self.y * self.y))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_39length(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_39length(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_38length(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_38length(struct __pyx_obj_3cgl_vec2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  double __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("length", 0);

  /* "cgl_wrapper.pyx":963
 * 
 *     def length(self):
 *         return math.sqrt((self.x * self.x) + (self.y * self.y))             # <<<<<<<<<<<<<<
 * 
 *     def length_squared(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(sqrt(__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":962
 *         return (self.x * other.y) - (self.y * other.x)
 * 
 *     def length(self):             # <<<<<<<<<<<<<<
 *         return math.sqrt((self.x * self.x) + (self.y * self.y))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2.length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":965
 *         return math.sqrt((self.x * self.x) + (self.y * self.y))
 * 
 *     def length_squared(self):             # <<<<<<<<<<<<<<
 *         return (self.x * self.x) + (self.y * self.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_41length_squared(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_41length_squared(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length_squared (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_40length_squared(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_40length_squared(struct __pyx_obj_3cgl_vec2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("length_squared", 0);

  /* "cgl_wrapper.pyx":966
 * 
 *     def length_squared(self):
 *         return (self.x * self.x) + (self.y * self.y)             # <<<<<<<<<<<<<<
 * 
 *     def normalized(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 966, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":965
 *         return math.sqrt((self.x * self.x) + (self.y * self.y))
 * 
 *     def length_squared(self):             # <<<<<<<<<<<<<<
 *         return (self.x * self.x) + (self.y * self.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2.length_squared", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":968
 *         return (self.x * self.x) + (self.y * self.y)
 * 
 *     def normalized(self):             # <<<<<<<<<<<<<<
 *         length = self.length()
 *         return vec2(self.x / length, self.y / length)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_43normalized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_43normalized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalized (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_42normalized(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_42normalized(struct __pyx_obj_3cgl_vec2 *__pyx_v_self) {
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normalized", 0);

  /* "cgl_wrapper.pyx":969
 * 
 *     def normalized(self):
 *         length = self.length()             # <<<<<<<<<<<<<<
 *         return vec2(self.x / length, self.y / length)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":970
 *     def normalized(self):
 *         length = self.length()
 *         return vec2(self.x / length, self.y / length)             # <<<<<<<<<<<<<<
 * 
 * def vec2_triple_product(a: vec2, b: vec2, c: vec2) -> vec2:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_v_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":968
 *         return (self.x * self.x) + (self.y * self.y)
 * 
 *     def normalized(self):             # <<<<<<<<<<<<<<
 *         length = self.length()
 *         return vec2(self.x / length, self.y / length)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec2.normalized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_44__reduce_cython__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec2 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec2.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec2_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec2_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec2_46__setstate_cython__(((struct __pyx_obj_3cgl_vec2 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec2_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec2 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec2.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":972
 *         return vec2(self.x / length, self.y / length)
 * 
 * def vec2_triple_product(a: vec2, b: vec2, c: vec2) -> vec2:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2 obj = vec2(CGL_vec2_triple_product(a.c_vec2, b.c_vec2, c.c_vec2))
 *     return vec2(obj.x, obj.y)
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_vec2 *__pyx_pw_3cgl_125vec2_triple_product(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_125vec2_triple_product = {"vec2_triple_product", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_125vec2_triple_product, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_vec2 *__pyx_pw_3cgl_125vec2_triple_product(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec2 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_c = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("vec2_triple_product (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec2_triple_product", 1, 3, 3, 1); __PYX_ERR(0, 972, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec2_triple_product", 1, 3, 3, 2); __PYX_ERR(0, 972, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec2_triple_product") < 0)) __PYX_ERR(0, 972, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec2 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec2 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("vec2_triple_product", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 972, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.vec2_triple_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec2, 1, "a", 0))) __PYX_ERR(0, 972, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec2, 1, "b", 0))) __PYX_ERR(0, 972, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec2, 1, "c", 0))) __PYX_ERR(0, 972, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_124vec2_triple_product(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_vec2 *__pyx_pf_3cgl_124vec2_triple_product(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_a, struct __pyx_obj_3cgl_vec2 *__pyx_v_b, struct __pyx_obj_3cgl_vec2 *__pyx_v_c) {
  struct CGL_vec2 __pyx_v_obj;
  struct __pyx_obj_3cgl_vec2 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct CGL_vec2 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec2_triple_product", 0);

  /* "cgl_wrapper.pyx":973
 * 
 * def vec2_triple_product(a: vec2, b: vec2, c: vec2) -> vec2:
 *     cdef CGL_vec2 obj = vec2(CGL_vec2_triple_product(a.c_vec2, b.c_vec2, c.c_vec2))             # <<<<<<<<<<<<<<
 *     return vec2(obj.x, obj.y)
 * 
 */
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_vec2(CGL_vec2_triple_product(__pyx_v_a->c_vec2, __pyx_v_b->c_vec2, __pyx_v_c->c_vec2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_convert__from_py_struct__CGL_vec2(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 973, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_obj = __pyx_t_3;

  /* "cgl_wrapper.pyx":974
 * def vec2_triple_product(a: vec2, b: vec2, c: vec2) -> vec2:
 *     cdef CGL_vec2 obj = vec2(CGL_vec2_triple_product(a.c_vec2, b.c_vec2, c.c_vec2))
 *     return vec2(obj.x, obj.y)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_obj.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_obj.y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":972
 *         return vec2(self.x / length, self.y / length)
 * 
 * def vec2_triple_product(a: vec2, b: vec2, c: vec2) -> vec2:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2 obj = vec2(CGL_vec2_triple_product(a.c_vec2, b.c_vec2, c.c_vec2))
 *     return vec2(obj.x, obj.y)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec2_triple_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":980
 *     cdef CGL_vec3 c_vec3
 * 
 *     def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0):             # <<<<<<<<<<<<<<
 *         self.c_vec3 = CGL_vec3(x, y, z)
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4vec3_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_4vec3_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 980, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 980, __pyx_L3_error)
    } else {
      __pyx_v_x = ((double)0.0);
    }
    if (values[1]) {
      __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 980, __pyx_L3_error)
    } else {
      __pyx_v_y = ((double)0.0);
    }
    if (values[2]) {
      __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 980, __pyx_L3_error)
    } else {
      __pyx_v_z = ((double)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 980, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.vec3.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_4vec3___init__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4vec3___init__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  struct CGL_vec3 __pyx_t_1;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":981
 * 
 *     def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0):
 *         self.c_vec3 = CGL_vec3(x, y, z)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_1.x = __pyx_v_x;
  __pyx_t_1.y = __pyx_v_y;
  __pyx_t_1.z = __pyx_v_z;
  __pyx_v_self->c_vec3 = __pyx_t_1;

  /* "cgl_wrapper.pyx":980
 *     cdef CGL_vec3 c_vec3
 * 
 *     def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0):             # <<<<<<<<<<<<<<
 *         self.c_vec3 = CGL_vec3(x, y, z)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":983
 *         self.c_vec3 = CGL_vec3(x, y, z)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"vec3({self.x}, {self.y}, {self.z})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_2__repr__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_2__repr__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":984
 * 
 *     def __repr__(self):
 *         return f"vec3({self.x}, {self.y}, {self.z})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_vec3);
  __pyx_t_2 += 5;
  __Pyx_GIVEREF(__pyx_kp_u_vec3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_vec3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":983
 *         self.c_vec3 = CGL_vec3(x, y, z)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"vec3({self.x}, {self.y}, {self.z})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec3.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":986
 *         return f"vec3({self.x}, {self.y}, {self.z})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"vec3({self.x}, {self.y}, {self.z})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_4__str__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_4__str__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":987
 * 
 *     def __str__(self):
 *         return f"vec3({self.x}, {self.y}, {self.z})"             # <<<<<<<<<<<<<<
 * 
 *     def __bytes__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_vec3);
  __pyx_t_2 += 5;
  __Pyx_GIVEREF(__pyx_kp_u_vec3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_vec3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":986
 *         return f"vec3({self.x}, {self.y}, {self.z})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"vec3({self.x}, {self.y}, {self.z})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec3.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":989
 *         return f"vec3({self.x}, {self.y}, {self.z})"
 * 
 *     def __bytes__(self):             # <<<<<<<<<<<<<<
 *         return bytes(self.c_vec3)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_7__bytes__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_7__bytes__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bytes__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_6__bytes__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_6__bytes__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__bytes__", 0);

  /* "cgl_wrapper.pyx":990
 * 
 *     def __bytes__(self):
 *         return bytes(self.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_vec3(__pyx_v_self->c_vec3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":989
 *         return f"vec3({self.x}, {self.y}, {self.z})"
 * 
 *     def __bytes__(self):             # <<<<<<<<<<<<<<
 *         return bytes(self.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.vec3.__bytes__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":992
 *         return bytes(self.c_vec3)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 3
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_3cgl_4vec3_9__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_3cgl_4vec3_9__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_8__len__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_3cgl_4vec3_8__len__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec3 *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "cgl_wrapper.pyx":993
 * 
 *     def __len__(self):
 *         return 3             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index: int):
 */
  __pyx_r = 3;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":992
 *         return bytes(self.c_vec3)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 3
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":995
 *         return 3
 * 
 *     def __getitem__(self, index: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             return self.c_vec3.x
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_10__getitem__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_10__getitem__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "cgl_wrapper.pyx":996
 * 
 *     def __getitem__(self, index: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             return self.c_vec3.x
 *         elif index == 1:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":997
 *     def __getitem__(self, index: int):
 *         if index == 0:
 *             return self.c_vec3.x             # <<<<<<<<<<<<<<
 *         elif index == 1:
 *             return self.c_vec3.y
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec3.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 997, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":996
 * 
 *     def __getitem__(self, index: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             return self.c_vec3.x
 *         elif index == 1:
 */
  }

  /* "cgl_wrapper.pyx":998
 *         if index == 0:
 *             return self.c_vec3.x
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             return self.c_vec3.y
 *         elif index == 2:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 998, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":999
 *             return self.c_vec3.x
 *         elif index == 1:
 *             return self.c_vec3.y             # <<<<<<<<<<<<<<
 *         elif index == 2:
 *             return self.c_vec3.z
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec3.y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":998
 *         if index == 0:
 *             return self.c_vec3.x
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             return self.c_vec3.y
 *         elif index == 2:
 */
  }

  /* "cgl_wrapper.pyx":1000
 *         elif index == 1:
 *             return self.c_vec3.y
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             return self.c_vec3.z
 *         else:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1000, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1001
 *             return self.c_vec3.y
 *         elif index == 2:
 *             return self.c_vec3.z             # <<<<<<<<<<<<<<
 *         else:
 *             raise IndexError()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec3.z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1000
 *         elif index == 1:
 *             return self.c_vec3.y
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             return self.c_vec3.z
 *         else:
 */
  }

  /* "cgl_wrapper.pyx":1003
 *             return self.c_vec3.z
 *         else:
 *             raise IndexError()             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, index: int, value: int):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_IndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1003, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1003, __pyx_L1_error)
  }

  /* "cgl_wrapper.pyx":995
 *         return 3
 * 
 *     def __getitem__(self, index: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             return self.c_vec3.x
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec3.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1005
 *             raise IndexError()
 * 
 *     def __setitem__(self, index: int, value: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             self.c_vec3.x = value
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4vec3_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_4vec3_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_12__setitem__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4vec3_12__setitem__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  CGL_float __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "cgl_wrapper.pyx":1006
 * 
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             self.c_vec3.x = value
 *         elif index == 1:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1007
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:
 *             self.c_vec3.x = value             # <<<<<<<<<<<<<<
 *         elif index == 1:
 *             self.c_vec3.y = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1007, __pyx_L1_error)
    __pyx_v_self->c_vec3.x = __pyx_t_3;

    /* "cgl_wrapper.pyx":1006
 * 
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             self.c_vec3.x = value
 *         elif index == 1:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1008
 *         if index == 0:
 *             self.c_vec3.x = value
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             self.c_vec3.y = value
 *         elif index == 2:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1009
 *             self.c_vec3.x = value
 *         elif index == 1:
 *             self.c_vec3.y = value             # <<<<<<<<<<<<<<
 *         elif index == 2:
 *             self.c_vec3.z = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1009, __pyx_L1_error)
    __pyx_v_self->c_vec3.y = __pyx_t_3;

    /* "cgl_wrapper.pyx":1008
 *         if index == 0:
 *             self.c_vec3.x = value
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             self.c_vec3.y = value
 *         elif index == 2:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1010
 *         elif index == 1:
 *             self.c_vec3.y = value
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             self.c_vec3.z = value
 *         else:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1011
 *             self.c_vec3.y = value
 *         elif index == 2:
 *             self.c_vec3.z = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise IndexError()
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1011, __pyx_L1_error)
    __pyx_v_self->c_vec3.z = __pyx_t_3;

    /* "cgl_wrapper.pyx":1010
 *         elif index == 1:
 *             self.c_vec3.y = value
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             self.c_vec3.z = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1013
 *             self.c_vec3.z = value
 *         else:
 *             raise IndexError()             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other: vec3):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_IndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1013, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cgl_wrapper.pyx":1005
 *             raise IndexError()
 * 
 *     def __setitem__(self, index: int, value: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             self.c_vec3.x = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec3.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1015
 *             raise IndexError()
 * 
 *     def __eq__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return self.c_vec3.x == other.c_vec3.x and self.c_vec3.y == other.c_vec3.y and self.c_vec3.z == other.c_vec3.z
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_15__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_15__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1015, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_14__eq__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_14__eq__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "cgl_wrapper.pyx":1016
 * 
 *     def __eq__(self, other: vec3):
 *         return self.c_vec3.x == other.c_vec3.x and self.c_vec3.y == other.c_vec3.y and self.c_vec3.z == other.c_vec3.z             # <<<<<<<<<<<<<<
 * 
 *     def __ne__(self, other: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->c_vec3.x == __pyx_v_other->c_vec3.x);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec3.y == __pyx_v_other->c_vec3.y);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec3.z == __pyx_v_other->c_vec3.z);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1015
 *             raise IndexError()
 * 
 *     def __eq__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return self.c_vec3.x == other.c_vec3.x and self.c_vec3.y == other.c_vec3.y and self.c_vec3.z == other.c_vec3.z
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec3.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1018
 *         return self.c_vec3.x == other.c_vec3.x and self.c_vec3.y == other.c_vec3.y and self.c_vec3.z == other.c_vec3.z
 * 
 *     def __ne__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return self.c_vec3.x != other.c_vec3.x or self.c_vec3.y != other.c_vec3.y or self.c_vec3.z != other.c_vec3.z
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_17__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_17__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1018, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_16__ne__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_16__ne__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__ne__", 0);

  /* "cgl_wrapper.pyx":1019
 * 
 *     def __ne__(self, other: vec3):
 *         return self.c_vec3.x != other.c_vec3.x or self.c_vec3.y != other.c_vec3.y or self.c_vec3.z != other.c_vec3.z             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->c_vec3.x != __pyx_v_other->c_vec3.x);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec3.y != __pyx_v_other->c_vec3.y);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec3.z != __pyx_v_other->c_vec3.z);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1018
 *         return self.c_vec3.x == other.c_vec3.x and self.c_vec3.y == other.c_vec3.y and self.c_vec3.z == other.c_vec3.z
 * 
 *     def __ne__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return self.c_vec3.x != other.c_vec3.x or self.c_vec3.y != other.c_vec3.y or self.c_vec3.z != other.c_vec3.z
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec3.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1022
 * 
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.c_vec3.x, self.c_vec3.y, self.c_vec3.z))
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_4vec3_19__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_4vec3_19__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_18__hash__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_4vec3_18__hash__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_hash_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":1023
 * 
 *     def __hash__(self):
 *         return hash((self.c_vec3.x, self.c_vec3.y, self.c_vec3.z))             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, name: str):
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec3.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_vec3.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec3.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_5 = PyObject_Hash(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_hash_t)-1))) __PYX_ERR(0, 1023, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1022
 * 
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.c_vec3.x, self.c_vec3.y, self.c_vec3.z))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec3.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1025
 *         return hash((self.c_vec3.x, self.c_vec3.y, self.c_vec3.z))
 * 
 *     def __getattr__(self, name: str):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             return self.c_vec3.x
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_21__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_21__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 1025, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_20__getattr__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self), ((PyObject*)__pyx_v_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_20__getattr__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "cgl_wrapper.pyx":1026
 * 
 *     def __getattr__(self, name: str):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             return self.c_vec3.x
 *         elif name == "y":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_x, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1027
 *     def __getattr__(self, name: str):
 *         if name == "x":
 *             return self.c_vec3.x             # <<<<<<<<<<<<<<
 *         elif name == "y":
 *             return self.c_vec3.y
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec3.x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1026
 * 
 *     def __getattr__(self, name: str):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             return self.c_vec3.x
 *         elif name == "y":
 */
  }

  /* "cgl_wrapper.pyx":1028
 *         if name == "x":
 *             return self.c_vec3.x
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             return self.c_vec3.y
 *         elif name == "z":
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_y, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1028, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":1029
 *             return self.c_vec3.x
 *         elif name == "y":
 *             return self.c_vec3.y             # <<<<<<<<<<<<<<
 *         elif name == "z":
 *             return self.c_vec3.z
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec3.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1028
 *         if name == "x":
 *             return self.c_vec3.x
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             return self.c_vec3.y
 *         elif name == "z":
 */
  }

  /* "cgl_wrapper.pyx":1030
 *         elif name == "y":
 *             return self.c_vec3.y
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             return self.c_vec3.z
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_z, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1031
 *             return self.c_vec3.y
 *         elif name == "z":
 *             return self.c_vec3.z             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec3.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1031, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1030
 *         elif name == "y":
 *             return self.c_vec3.y
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             return self.c_vec3.z
 *         else:
 */
  }

  /* "cgl_wrapper.pyx":1033
 *             return self.c_vec3.z
 *         else:
 *             raise AttributeError()             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self, name: str, value):
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1033, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1033, __pyx_L1_error)
  }

  /* "cgl_wrapper.pyx":1025
 *         return hash((self.c_vec3.x, self.c_vec3.y, self.c_vec3.z))
 * 
 *     def __getattr__(self, name: str):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             return self.c_vec3.x
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec3.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1035
 *             raise AttributeError()
 * 
 *     def __setattr__(self, name: str, value):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             self.c_vec3.x = value
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4vec3_23__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_4vec3_23__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 1035, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_22__setattr__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self), ((PyObject*)__pyx_v_name), ((PyObject *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4vec3_22__setattr__(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  CGL_float __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setattr__", 0);

  /* "cgl_wrapper.pyx":1036
 * 
 *     def __setattr__(self, name: str, value):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             self.c_vec3.x = value
 *         elif name == "y":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_x, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1037
 *     def __setattr__(self, name: str, value):
 *         if name == "x":
 *             self.c_vec3.x = value             # <<<<<<<<<<<<<<
 *         elif name == "y":
 *             self.c_vec3.y = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1037, __pyx_L1_error)
    __pyx_v_self->c_vec3.x = __pyx_t_3;

    /* "cgl_wrapper.pyx":1036
 * 
 *     def __setattr__(self, name: str, value):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             self.c_vec3.x = value
 *         elif name == "y":
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1038
 *         if name == "x":
 *             self.c_vec3.x = value
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             self.c_vec3.y = value
 *         elif name == "z":
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_y, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1038, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":1039
 *             self.c_vec3.x = value
 *         elif name == "y":
 *             self.c_vec3.y = value             # <<<<<<<<<<<<<<
 *         elif name == "z":
 *             self.c_vec3.z = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1039, __pyx_L1_error)
    __pyx_v_self->c_vec3.y = __pyx_t_3;

    /* "cgl_wrapper.pyx":1038
 *         if name == "x":
 *             self.c_vec3.x = value
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             self.c_vec3.y = value
 *         elif name == "z":
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1040
 *         elif name == "y":
 *             self.c_vec3.y = value
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             self.c_vec3.z = value
 *         else:
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_z, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1040, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (likely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1041
 *             self.c_vec3.y = value
 *         elif name == "z":
 *             self.c_vec3.z = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError()
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1041, __pyx_L1_error)
    __pyx_v_self->c_vec3.z = __pyx_t_3;

    /* "cgl_wrapper.pyx":1040
 *         elif name == "y":
 *             self.c_vec3.y = value
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             self.c_vec3.z = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1043
 *             self.c_vec3.z = value
 *         else:
 *             raise AttributeError()             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other: vec3):
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1043, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cgl_wrapper.pyx":1035
 *             raise AttributeError()
 * 
 *     def __setattr__(self, name: str, value):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             self.c_vec3.x = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec3.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1045
 *             raise AttributeError()
 * 
 *     def __add__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3(self.x + other.x, self.y + other.y, self.z + other.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_25__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_25__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1045, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_24__add__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_24__add__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);

  /* "cgl_wrapper.pyx":1046
 * 
 *     def __add__(self, other: vec3):
 *         return vec3(self.x + other.x, self.y + other.y, self.z + other.z)             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self, other: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1045
 *             raise AttributeError()
 * 
 *     def __add__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3(self.x + other.x, self.y + other.y, self.z + other.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec3.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1048
 *         return vec3(self.x + other.x, self.y + other.y, self.z + other.z)
 * 
 *     def __sub__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3(self.x - other.x, self.y - other.y, self.z - other.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_27__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_27__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1048, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_26__sub__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_26__sub__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);

  /* "cgl_wrapper.pyx":1049
 * 
 *     def __sub__(self, other: vec3):
 *         return vec3(self.x - other.x, self.y - other.y, self.z - other.z)             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(self, other: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1048
 *         return vec3(self.x + other.x, self.y + other.y, self.z + other.z)
 * 
 *     def __sub__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3(self.x - other.x, self.y - other.y, self.z - other.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec3.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1051
 *         return vec3(self.x - other.x, self.y - other.y, self.z - other.z)
 * 
 *     def __mul__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3(self.x * other.x, self.y * other.y, self.z * other.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_29__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_29__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1051, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_28__mul__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_28__mul__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "cgl_wrapper.pyx":1052
 * 
 *     def __mul__(self, other: vec3):
 *         return vec3(self.x * other.x, self.y * other.y, self.z * other.z)             # <<<<<<<<<<<<<<
 * 
 *     def __truediv__(self, other: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1051
 *         return vec3(self.x - other.x, self.y - other.y, self.z - other.z)
 * 
 *     def __mul__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3(self.x * other.x, self.y * other.y, self.z * other.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec3.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1054
 *         return vec3(self.x * other.x, self.y * other.y, self.z * other.z)
 * 
 *     def __truediv__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3(self.x / other.x, self.y / other.y, self.z / other.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1054, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_30__truediv__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_30__truediv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__truediv__", 0);

  /* "cgl_wrapper.pyx":1055
 * 
 *     def __truediv__(self, other: vec3):
 *         return vec3(self.x / other.x, self.y / other.y, self.z / other.z)             # <<<<<<<<<<<<<<
 * 
 *     def __floordiv__(self, other: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1054
 *         return vec3(self.x * other.x, self.y * other.y, self.z * other.z)
 * 
 *     def __truediv__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3(self.x / other.x, self.y / other.y, self.z / other.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec3.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1057
 *         return vec3(self.x / other.x, self.y / other.y, self.z / other.z)
 * 
 *     def __floordiv__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3(self.x // other.x, self.y // other.y, self.z // other.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_33__floordiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_33__floordiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__floordiv__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1057, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_32__floordiv__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_32__floordiv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__floordiv__", 0);

  /* "cgl_wrapper.pyx":1058
 * 
 *     def __floordiv__(self, other: vec3):
 *         return vec3(self.x // other.x, self.y // other.y, self.z // other.z)             # <<<<<<<<<<<<<<
 * 
 *     def dot(self, other: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_FloorDivide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_FloorDivide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_FloorDivide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1057
 *         return vec3(self.x / other.x, self.y / other.y, self.z / other.z)
 * 
 *     def __floordiv__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3(self.x // other.x, self.y // other.y, self.z // other.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec3.__floordiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1060
 *         return vec3(self.x // other.x, self.y // other.y, self.z // other.z)
 * 
 *     def dot(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return (self.x * other.x) + (self.y * other.y) + (self.z * other.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_35dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_35dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dot (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1060, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_34dot(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_34dot(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dot", 0);

  /* "cgl_wrapper.pyx":1061
 * 
 *     def dot(self, other: vec3):
 *         return (self.x * other.x) + (self.y * other.y) + (self.z * other.z)             # <<<<<<<<<<<<<<
 * 
 *     def cross(self, other: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1060
 *         return vec3(self.x // other.x, self.y // other.y, self.z // other.z)
 * 
 *     def dot(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return (self.x * other.x) + (self.y * other.y) + (self.z * other.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec3.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1063
 *         return (self.x * other.x) + (self.y * other.y) + (self.z * other.z)
 * 
 *     def cross(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3((self.y * other.z) - (self.z * other.y), (self.z * other.x) - (self.x * other.z), (self.x * other.y) - (self.y * other.x))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_37cross(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_37cross(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cross (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1063, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec3_36cross(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_36cross(struct __pyx_obj_3cgl_vec3 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cross", 0);

  /* "cgl_wrapper.pyx":1064
 * 
 *     def cross(self, other: vec3):
 *         return vec3((self.y * other.z) - (self.z * other.y), (self.z * other.x) - (self.x * other.z), (self.x * other.y) - (self.y * other.x))             # <<<<<<<<<<<<<<
 * 
 *     def length(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Subtract(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1063
 *         return (self.x * other.x) + (self.y * other.y) + (self.z * other.z)
 * 
 *     def cross(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec3((self.y * other.z) - (self.z * other.y), (self.z * other.x) - (self.x * other.z), (self.x * other.y) - (self.y * other.x))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.vec3.cross", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1066
 *         return vec3((self.y * other.z) - (self.z * other.y), (self.z * other.x) - (self.x * other.z), (self.x * other.y) - (self.y * other.x))
 * 
 *     def length(self):             # <<<<<<<<<<<<<<
 *         return math.sqrt((self.x * self.x) + (self.y * self.y) + (self.z * self.z))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_39length(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_39length(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_38length(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_38length(struct __pyx_obj_3cgl_vec3 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  double __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("length", 0);

  /* "cgl_wrapper.pyx":1067
 * 
 *     def length(self):
 *         return math.sqrt((self.x * self.x) + (self.y * self.y) + (self.z * self.z))             # <<<<<<<<<<<<<<
 * 
 *     def length_squared(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __pyx_PyFloat_AsDouble(__pyx_t_3); if (unlikely((__pyx_t_5 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(sqrt(__pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1066
 *         return vec3((self.y * other.z) - (self.z * other.y), (self.z * other.x) - (self.x * other.z), (self.x * other.y) - (self.y * other.x))
 * 
 *     def length(self):             # <<<<<<<<<<<<<<
 *         return math.sqrt((self.x * self.x) + (self.y * self.y) + (self.z * self.z))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec3.length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1069
 *         return math.sqrt((self.x * self.x) + (self.y * self.y) + (self.z * self.z))
 * 
 *     def length_squared(self):             # <<<<<<<<<<<<<<
 *         return (self.x * self.x) + (self.y * self.y) + (self.z * self.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_41length_squared(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_41length_squared(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length_squared (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_40length_squared(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_40length_squared(struct __pyx_obj_3cgl_vec3 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("length_squared", 0);

  /* "cgl_wrapper.pyx":1070
 * 
 *     def length_squared(self):
 *         return (self.x * self.x) + (self.y * self.y) + (self.z * self.z)             # <<<<<<<<<<<<<<
 * 
 *     def normalized(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1069
 *         return math.sqrt((self.x * self.x) + (self.y * self.y) + (self.z * self.z))
 * 
 *     def length_squared(self):             # <<<<<<<<<<<<<<
 *         return (self.x * self.x) + (self.y * self.y) + (self.z * self.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec3.length_squared", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1072
 *         return (self.x * self.x) + (self.y * self.y) + (self.z * self.z)
 * 
 *     def normalized(self):             # <<<<<<<<<<<<<<
 *         cdef float length = self.length()
 *         return vec3(self.x / length, self.y / length, self.z / length)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_43normalized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_43normalized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalized (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_42normalized(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_42normalized(struct __pyx_obj_3cgl_vec3 *__pyx_v_self) {
  float __pyx_v_length;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  float __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normalized", 0);

  /* "cgl_wrapper.pyx":1073
 * 
 *     def normalized(self):
 *         cdef float length = self.length()             # <<<<<<<<<<<<<<
 *         return vec3(self.x / length, self.y / length, self.z / length)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1073, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_length = __pyx_t_4;

  /* "cgl_wrapper.pyx":1074
 *     def normalized(self):
 *         cdef float length = self.length()
 *         return vec3(self.x / length, self.y / length, self.z / length)             # <<<<<<<<<<<<<<
 * 
 * def vec3_reflect(a: vec3, n: vec3) -> vec3:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1072
 *         return (self.x * self.x) + (self.y * self.y) + (self.z * self.z)
 * 
 *     def normalized(self):             # <<<<<<<<<<<<<<
 *         cdef float length = self.length()
 *         return vec3(self.x / length, self.y / length, self.z / length)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.vec3.normalized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_44__reduce_cython__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec3 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec3.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec3_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec3_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec3_46__setstate_cython__(((struct __pyx_obj_3cgl_vec3 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec3_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec3 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec3.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1076
 *         return vec3(self.x / length, self.y / length, self.z / length)
 * 
 * def vec3_reflect(a: vec3, n: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_reflect(a.c_vec3, n.c_vec3))
 *     return vec3(obj.x, obj.y, obj.z)
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_127vec3_reflect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_127vec3_reflect = {"vec3_reflect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_127vec3_reflect, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_127vec3_reflect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_n = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("vec3_reflect (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_n,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec3_reflect", 1, 2, 2, 1); __PYX_ERR(0, 1076, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec3_reflect") < 0)) __PYX_ERR(0, 1076, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_n = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("vec3_reflect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1076, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.vec3_reflect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec3, 1, "a", 0))) __PYX_ERR(0, 1076, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_n), __pyx_ptype_3cgl_vec3, 1, "n", 0))) __PYX_ERR(0, 1076, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_126vec3_reflect(__pyx_self, __pyx_v_a, __pyx_v_n);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_126vec3_reflect(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_n) {
  struct CGL_vec3 __pyx_v_obj;
  struct __pyx_obj_3cgl_vec3 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct CGL_vec3 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec3_reflect", 0);

  /* "cgl_wrapper.pyx":1077
 * 
 * def vec3_reflect(a: vec3, n: vec3) -> vec3:
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_reflect(a.c_vec3, n.c_vec3))             # <<<<<<<<<<<<<<
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 */
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_vec3(CGL_vec3_reflect(__pyx_v_a->c_vec3, __pyx_v_n->c_vec3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1077, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_convert__from_py_struct__CGL_vec3(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1077, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_obj = __pyx_t_3;

  /* "cgl_wrapper.pyx":1078
 * def vec3_reflect(a: vec3, n: vec3) -> vec3:
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_reflect(a.c_vec3, n.c_vec3))
 *     return vec3(obj.x, obj.y, obj.z)             # <<<<<<<<<<<<<<
 * 
 * def vec3_rotate_about_axis(v: vec3, axis: vec3, theta: float) -> vec3:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_obj.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_obj.y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_obj.z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = ((struct __pyx_obj_3cgl_vec3 *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1076
 *         return vec3(self.x / length, self.y / length, self.z / length)
 * 
 * def vec3_reflect(a: vec3, n: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_reflect(a.c_vec3, n.c_vec3))
 *     return vec3(obj.x, obj.y, obj.z)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec3_reflect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1080
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 * def vec3_rotate_about_axis(v: vec3, axis: vec3, theta: float) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_rotate_about_axis(v.c_vec3, axis.c_vec3, theta))
 *     return vec3(obj.x, obj.y, obj.z)
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_129vec3_rotate_about_axis(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_129vec3_rotate_about_axis = {"vec3_rotate_about_axis", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_129vec3_rotate_about_axis, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_129vec3_rotate_about_axis(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_v = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_axis = 0;
  double __pyx_v_theta;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("vec3_rotate_about_axis (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_axis,&__pyx_n_s_theta,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_axis)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec3_rotate_about_axis", 1, 3, 3, 1); __PYX_ERR(0, 1080, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_theta)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec3_rotate_about_axis", 1, 3, 3, 2); __PYX_ERR(0, 1080, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec3_rotate_about_axis") < 0)) __PYX_ERR(0, 1080, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_v = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_axis = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_theta = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_theta == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1080, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("vec3_rotate_about_axis", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1080, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.vec3_rotate_about_axis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_3cgl_vec3, 1, "v", 0))) __PYX_ERR(0, 1080, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_axis), __pyx_ptype_3cgl_vec3, 1, "axis", 0))) __PYX_ERR(0, 1080, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_128vec3_rotate_about_axis(__pyx_self, __pyx_v_v, __pyx_v_axis, __pyx_v_theta);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_128vec3_rotate_about_axis(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_v, struct __pyx_obj_3cgl_vec3 *__pyx_v_axis, double __pyx_v_theta) {
  struct CGL_vec3 __pyx_v_obj;
  struct __pyx_obj_3cgl_vec3 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct CGL_vec3 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec3_rotate_about_axis", 0);

  /* "cgl_wrapper.pyx":1081
 * 
 * def vec3_rotate_about_axis(v: vec3, axis: vec3, theta: float) -> vec3:
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_rotate_about_axis(v.c_vec3, axis.c_vec3, theta))             # <<<<<<<<<<<<<<
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 */
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_vec3(CGL_vec3_rotate_about_axis(__pyx_v_v->c_vec3, __pyx_v_axis->c_vec3, __pyx_v_theta)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_convert__from_py_struct__CGL_vec3(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1081, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_obj = __pyx_t_3;

  /* "cgl_wrapper.pyx":1082
 * def vec3_rotate_about_axis(v: vec3, axis: vec3, theta: float) -> vec3:
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_rotate_about_axis(v.c_vec3, axis.c_vec3, theta))
 *     return vec3(obj.x, obj.y, obj.z)             # <<<<<<<<<<<<<<
 * 
 * def vec3_triple_product(a: vec3, b: vec3, c: vec3) -> vec3:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_obj.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_obj.y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_obj.z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = ((struct __pyx_obj_3cgl_vec3 *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1080
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 * def vec3_rotate_about_axis(v: vec3, axis: vec3, theta: float) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_rotate_about_axis(v.c_vec3, axis.c_vec3, theta))
 *     return vec3(obj.x, obj.y, obj.z)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec3_rotate_about_axis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1084
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 * def vec3_triple_product(a: vec3, b: vec3, c: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_triple_product(a.c_vec3, b.c_vec3, c.c_vec3))
 *     return vec3(obj.x, obj.y, obj.z)
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_131vec3_triple_product(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_131vec3_triple_product = {"vec3_triple_product", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_131vec3_triple_product, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_131vec3_triple_product(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_c = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("vec3_triple_product (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec3_triple_product", 1, 3, 3, 1); __PYX_ERR(0, 1084, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec3_triple_product", 1, 3, 3, 2); __PYX_ERR(0, 1084, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec3_triple_product") < 0)) __PYX_ERR(0, 1084, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("vec3_triple_product", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1084, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.vec3_triple_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec3, 1, "a", 0))) __PYX_ERR(0, 1084, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec3, 1, "b", 0))) __PYX_ERR(0, 1084, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec3, 1, "c", 0))) __PYX_ERR(0, 1084, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_130vec3_triple_product(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_130vec3_triple_product(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c) {
  struct CGL_vec3 __pyx_v_obj;
  struct __pyx_obj_3cgl_vec3 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct CGL_vec3 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec3_triple_product", 0);

  /* "cgl_wrapper.pyx":1085
 * 
 * def vec3_triple_product(a: vec3, b: vec3, c: vec3) -> vec3:
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_triple_product(a.c_vec3, b.c_vec3, c.c_vec3))             # <<<<<<<<<<<<<<
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 */
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_vec3(CGL_vec3_triple_product(__pyx_v_a->c_vec3, __pyx_v_b->c_vec3, __pyx_v_c->c_vec3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_convert__from_py_struct__CGL_vec3(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_obj = __pyx_t_3;

  /* "cgl_wrapper.pyx":1086
 * def vec3_triple_product(a: vec3, b: vec3, c: vec3) -> vec3:
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_triple_product(a.c_vec3, b.c_vec3, c.c_vec3))
 *     return vec3(obj.x, obj.y, obj.z)             # <<<<<<<<<<<<<<
 * 
 * cdef class vec4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_obj.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_obj.y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_obj.z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = ((struct __pyx_obj_3cgl_vec3 *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1084
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 * def vec3_triple_product(a: vec3, b: vec3, c: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_triple_product(a.c_vec3, b.c_vec3, c.c_vec3))
 *     return vec3(obj.x, obj.y, obj.z)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec3_triple_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1091
 *     cdef CGL_vec4 c_vec4
 * 
 *     def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0, w: float = 0.0):             # <<<<<<<<<<<<<<
 *         self.c_vec4 = CGL_vec4(x, y, z, w)
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4vec4_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_4vec4_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  double __pyx_v_w;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,&__pyx_n_s_w,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1091, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L3_error)
    } else {
      __pyx_v_x = ((double)0.0);
    }
    if (values[1]) {
      __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L3_error)
    } else {
      __pyx_v_y = ((double)0.0);
    }
    if (values[2]) {
      __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L3_error)
    } else {
      __pyx_v_z = ((double)0.0);
    }
    if (values[3]) {
      __pyx_v_w = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_w == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1091, __pyx_L3_error)
    } else {
      __pyx_v_w = ((double)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1091, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.vec4.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_4vec4___init__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_w);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4vec4___init__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, double __pyx_v_w) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  struct CGL_vec4 __pyx_t_1;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":1092
 * 
 *     def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0, w: float = 0.0):
 *         self.c_vec4 = CGL_vec4(x, y, z, w)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_1.x = __pyx_v_x;
  __pyx_t_1.y = __pyx_v_y;
  __pyx_t_1.z = __pyx_v_z;
  __pyx_t_1.w = __pyx_v_w;
  __pyx_v_self->c_vec4 = __pyx_t_1;

  /* "cgl_wrapper.pyx":1091
 *     cdef CGL_vec4 c_vec4
 * 
 *     def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0, w: float = 0.0):             # <<<<<<<<<<<<<<
 *         self.c_vec4 = CGL_vec4(x, y, z, w)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1094
 *         self.c_vec4 = CGL_vec4(x, y, z, w)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"vec4({self.x}, {self.y}, {self.z}, {self.w})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_2__repr__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_2__repr__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":1095
 * 
 *     def __repr__(self):
 *         return f"vec4({self.x}, {self.y}, {self.z}, {self.w})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_vec4);
  __pyx_t_2 += 5;
  __Pyx_GIVEREF(__pyx_kp_u_vec4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_vec4);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_w); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1094
 *         self.c_vec4 = CGL_vec4(x, y, z, w)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"vec4({self.x}, {self.y}, {self.z}, {self.w})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec4.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1097
 *         return f"vec4({self.x}, {self.y}, {self.z}, {self.w})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"vec4({self.x}, {self.y}, {self.z}, {self.w})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_4__str__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_4__str__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":1098
 * 
 *     def __str__(self):
 *         return f"vec4({self.x}, {self.y}, {self.z}, {self.w})"             # <<<<<<<<<<<<<<
 * 
 *     def __bytes__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_vec4);
  __pyx_t_2 += 5;
  __Pyx_GIVEREF(__pyx_kp_u_vec4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_vec4);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_w); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1097
 *         return f"vec4({self.x}, {self.y}, {self.z}, {self.w})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"vec4({self.x}, {self.y}, {self.z}, {self.w})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec4.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1100
 *         return f"vec4({self.x}, {self.y}, {self.z}, {self.w})"
 * 
 *     def __bytes__(self):             # <<<<<<<<<<<<<<
 *         return bytes(self.c_vec4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_7__bytes__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_7__bytes__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__bytes__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_6__bytes__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_6__bytes__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__bytes__", 0);

  /* "cgl_wrapper.pyx":1101
 * 
 *     def __bytes__(self):
 *         return bytes(self.c_vec4)             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_vec4(__pyx_v_self->c_vec4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1100
 *         return f"vec4({self.x}, {self.y}, {self.z}, {self.w})"
 * 
 *     def __bytes__(self):             # <<<<<<<<<<<<<<
 *         return bytes(self.c_vec4)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.vec4.__bytes__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1103
 *         return bytes(self.c_vec4)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 4
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_3cgl_4vec4_9__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_3cgl_4vec4_9__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_8__len__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_3cgl_4vec4_8__len__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec4 *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "cgl_wrapper.pyx":1104
 * 
 *     def __len__(self):
 *         return 4             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index: int):
 */
  __pyx_r = 4;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1103
 *         return bytes(self.c_vec4)
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return 4
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1106
 *         return 4
 * 
 *     def __getitem__(self, index: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             return self.c_vec4.x
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_10__getitem__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_10__getitem__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "cgl_wrapper.pyx":1107
 * 
 *     def __getitem__(self, index: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             return self.c_vec4.x
 *         elif index == 1:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1108
 *     def __getitem__(self, index: int):
 *         if index == 0:
 *             return self.c_vec4.x             # <<<<<<<<<<<<<<
 *         elif index == 1:
 *             return self.c_vec4.y
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec4.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1107
 * 
 *     def __getitem__(self, index: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             return self.c_vec4.x
 *         elif index == 1:
 */
  }

  /* "cgl_wrapper.pyx":1109
 *         if index == 0:
 *             return self.c_vec4.x
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             return self.c_vec4.y
 *         elif index == 2:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1110
 *             return self.c_vec4.x
 *         elif index == 1:
 *             return self.c_vec4.y             # <<<<<<<<<<<<<<
 *         elif index == 2:
 *             return self.c_vec4.z
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec4.y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1110, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1109
 *         if index == 0:
 *             return self.c_vec4.x
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             return self.c_vec4.y
 *         elif index == 2:
 */
  }

  /* "cgl_wrapper.pyx":1111
 *         elif index == 1:
 *             return self.c_vec4.y
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             return self.c_vec4.z
 *         elif index == 3:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1111, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1112
 *             return self.c_vec4.y
 *         elif index == 2:
 *             return self.c_vec4.z             # <<<<<<<<<<<<<<
 *         elif index == 3:
 *             return self.c_vec4.w
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec4.z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1111
 *         elif index == 1:
 *             return self.c_vec4.y
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             return self.c_vec4.z
 *         elif index == 3:
 */
  }

  /* "cgl_wrapper.pyx":1113
 *         elif index == 2:
 *             return self.c_vec4.z
 *         elif index == 3:             # <<<<<<<<<<<<<<
 *             return self.c_vec4.w
 *         else:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1113, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1114
 *             return self.c_vec4.z
 *         elif index == 3:
 *             return self.c_vec4.w             # <<<<<<<<<<<<<<
 *         else:
 *             raise IndexError()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec4.w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1113
 *         elif index == 2:
 *             return self.c_vec4.z
 *         elif index == 3:             # <<<<<<<<<<<<<<
 *             return self.c_vec4.w
 *         else:
 */
  }

  /* "cgl_wrapper.pyx":1116
 *             return self.c_vec4.w
 *         else:
 *             raise IndexError()             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, index: int, value: int):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_IndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1116, __pyx_L1_error)
  }

  /* "cgl_wrapper.pyx":1106
 *         return 4
 * 
 *     def __getitem__(self, index: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             return self.c_vec4.x
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec4.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1118
 *             raise IndexError()
 * 
 *     def __setitem__(self, index: int, value: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             self.c_vec4.x = value
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4vec4_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_4vec4_13__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_12__setitem__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4vec4_12__setitem__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  CGL_float __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "cgl_wrapper.pyx":1119
 * 
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             self.c_vec4.x = value
 *         elif index == 1:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1120
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:
 *             self.c_vec4.x = value             # <<<<<<<<<<<<<<
 *         elif index == 1:
 *             self.c_vec4.y = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1120, __pyx_L1_error)
    __pyx_v_self->c_vec4.x = __pyx_t_3;

    /* "cgl_wrapper.pyx":1119
 * 
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             self.c_vec4.x = value
 *         elif index == 1:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1121
 *         if index == 0:
 *             self.c_vec4.x = value
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             self.c_vec4.y = value
 *         elif index == 2:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1121, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1122
 *             self.c_vec4.x = value
 *         elif index == 1:
 *             self.c_vec4.y = value             # <<<<<<<<<<<<<<
 *         elif index == 2:
 *             self.c_vec4.z = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1122, __pyx_L1_error)
    __pyx_v_self->c_vec4.y = __pyx_t_3;

    /* "cgl_wrapper.pyx":1121
 *         if index == 0:
 *             self.c_vec4.x = value
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             self.c_vec4.y = value
 *         elif index == 2:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1123
 *         elif index == 1:
 *             self.c_vec4.y = value
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             self.c_vec4.z = value
 *         elif index == 3:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1124
 *             self.c_vec4.y = value
 *         elif index == 2:
 *             self.c_vec4.z = value             # <<<<<<<<<<<<<<
 *         elif index == 3:
 *             self.c_vec4.w = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L1_error)
    __pyx_v_self->c_vec4.z = __pyx_t_3;

    /* "cgl_wrapper.pyx":1123
 *         elif index == 1:
 *             self.c_vec4.y = value
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             self.c_vec4.z = value
 *         elif index == 3:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1125
 *         elif index == 2:
 *             self.c_vec4.z = value
 *         elif index == 3:             # <<<<<<<<<<<<<<
 *             self.c_vec4.w = value
 *         else:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1125, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1126
 *             self.c_vec4.z = value
 *         elif index == 3:
 *             self.c_vec4.w = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise IndexError()
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L1_error)
    __pyx_v_self->c_vec4.w = __pyx_t_3;

    /* "cgl_wrapper.pyx":1125
 *         elif index == 2:
 *             self.c_vec4.z = value
 *         elif index == 3:             # <<<<<<<<<<<<<<
 *             self.c_vec4.w = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1128
 *             self.c_vec4.w = value
 *         else:
 *             raise IndexError()             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other: vec4):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_IndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1128, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cgl_wrapper.pyx":1118
 *             raise IndexError()
 * 
 *     def __setitem__(self, index: int, value: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             self.c_vec4.x = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec4.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1130
 *             raise IndexError()
 * 
 *     def __eq__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return self.c_vec4.x == other.c_vec4.x and self.c_vec4.y == other.c_vec4.y and self.c_vec4.z == other.c_vec4.z and self.c_vec4.w == other.c_vec4.w
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_15__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_15__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec4, 1, "other", 0))) __PYX_ERR(0, 1130, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_14__eq__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec4 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_14__eq__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "cgl_wrapper.pyx":1131
 * 
 *     def __eq__(self, other: vec4):
 *         return self.c_vec4.x == other.c_vec4.x and self.c_vec4.y == other.c_vec4.y and self.c_vec4.z == other.c_vec4.z and self.c_vec4.w == other.c_vec4.w             # <<<<<<<<<<<<<<
 * 
 *     def __ne__(self, other: vec4):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->c_vec4.x == __pyx_v_other->c_vec4.x);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec4.y == __pyx_v_other->c_vec4.y);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec4.z == __pyx_v_other->c_vec4.z);
  if (__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec4.w == __pyx_v_other->c_vec4.w);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1130
 *             raise IndexError()
 * 
 *     def __eq__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return self.c_vec4.x == other.c_vec4.x and self.c_vec4.y == other.c_vec4.y and self.c_vec4.z == other.c_vec4.z and self.c_vec4.w == other.c_vec4.w
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec4.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1133
 *         return self.c_vec4.x == other.c_vec4.x and self.c_vec4.y == other.c_vec4.y and self.c_vec4.z == other.c_vec4.z and self.c_vec4.w == other.c_vec4.w
 * 
 *     def __ne__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return self.c_vec4.x != other.c_vec4.x or self.c_vec4.y != other.c_vec4.y or self.c_vec4.z != other.c_vec4.z or self.c_vec4.w != other.c_vec4.w
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_17__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_17__ne__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__ne__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec4, 1, "other", 0))) __PYX_ERR(0, 1133, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_16__ne__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec4 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_16__ne__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__ne__", 0);

  /* "cgl_wrapper.pyx":1134
 * 
 *     def __ne__(self, other: vec4):
 *         return self.c_vec4.x != other.c_vec4.x or self.c_vec4.y != other.c_vec4.y or self.c_vec4.z != other.c_vec4.z or self.c_vec4.w != other.c_vec4.w             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = (__pyx_v_self->c_vec4.x != __pyx_v_other->c_vec4.x);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec4.y != __pyx_v_other->c_vec4.y);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec4.z != __pyx_v_other->c_vec4.z);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L3_bool_binop_done;
  }
  __pyx_t_2 = (__pyx_v_self->c_vec4.w != __pyx_v_other->c_vec4.w);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_L3_bool_binop_done:;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1133
 *         return self.c_vec4.x == other.c_vec4.x and self.c_vec4.y == other.c_vec4.y and self.c_vec4.z == other.c_vec4.z and self.c_vec4.w == other.c_vec4.w
 * 
 *     def __ne__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return self.c_vec4.x != other.c_vec4.x or self.c_vec4.y != other.c_vec4.y or self.c_vec4.z != other.c_vec4.z or self.c_vec4.w != other.c_vec4.w
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec4.__ne__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1136
 *         return self.c_vec4.x != other.c_vec4.x or self.c_vec4.y != other.c_vec4.y or self.c_vec4.z != other.c_vec4.z or self.c_vec4.w != other.c_vec4.w
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.c_vec4.x, self.c_vec4.y, self.c_vec4.z, self.c_vec4.w))
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_4vec4_19__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_4vec4_19__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_18__hash__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_4vec4_18__hash__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_hash_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":1137
 * 
 *     def __hash__(self):
 *         return hash((self.c_vec4.x, self.c_vec4.y, self.c_vec4.z, self.c_vec4.w))             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, name: str):
 */
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vec4.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_vec4.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec4.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->c_vec4.w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_6 = PyObject_Hash(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_hash_t)-1))) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1136
 *         return self.c_vec4.x != other.c_vec4.x or self.c_vec4.y != other.c_vec4.y or self.c_vec4.z != other.c_vec4.z or self.c_vec4.w != other.c_vec4.w
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.c_vec4.x, self.c_vec4.y, self.c_vec4.z, self.c_vec4.w))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec4.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1139
 *         return hash((self.c_vec4.x, self.c_vec4.y, self.c_vec4.z, self.c_vec4.w))
 * 
 *     def __getattr__(self, name: str):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             return self.c_vec4.x
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_21__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_21__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 1139, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_20__getattr__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self), ((PyObject*)__pyx_v_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_20__getattr__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "cgl_wrapper.pyx":1140
 * 
 *     def __getattr__(self, name: str):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             return self.c_vec4.x
 *         elif name == "y":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_x, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1141
 *     def __getattr__(self, name: str):
 *         if name == "x":
 *             return self.c_vec4.x             # <<<<<<<<<<<<<<
 *         elif name == "y":
 *             return self.c_vec4.y
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec4.x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1140
 * 
 *     def __getattr__(self, name: str):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             return self.c_vec4.x
 *         elif name == "y":
 */
  }

  /* "cgl_wrapper.pyx":1142
 *         if name == "x":
 *             return self.c_vec4.x
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             return self.c_vec4.y
 *         elif name == "z":
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_y, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":1143
 *             return self.c_vec4.x
 *         elif name == "y":
 *             return self.c_vec4.y             # <<<<<<<<<<<<<<
 *         elif name == "z":
 *             return self.c_vec4.z
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec4.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1142
 *         if name == "x":
 *             return self.c_vec4.x
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             return self.c_vec4.y
 *         elif name == "z":
 */
  }

  /* "cgl_wrapper.pyx":1144
 *         elif name == "y":
 *             return self.c_vec4.y
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             return self.c_vec4.z
 *         elif name == "w":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_z, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1144, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1145
 *             return self.c_vec4.y
 *         elif name == "z":
 *             return self.c_vec4.z             # <<<<<<<<<<<<<<
 *         elif name == "w":
 *             return self.c_vec4.w
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec4.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1144
 *         elif name == "y":
 *             return self.c_vec4.y
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             return self.c_vec4.z
 *         elif name == "w":
 */
  }

  /* "cgl_wrapper.pyx":1146
 *         elif name == "z":
 *             return self.c_vec4.z
 *         elif name == "w":             # <<<<<<<<<<<<<<
 *             return self.c_vec4.w
 *         else:
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":1147
 *             return self.c_vec4.z
 *         elif name == "w":
 *             return self.c_vec4.w             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vec4.w); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1146
 *         elif name == "z":
 *             return self.c_vec4.z
 *         elif name == "w":             # <<<<<<<<<<<<<<
 *             return self.c_vec4.w
 *         else:
 */
  }

  /* "cgl_wrapper.pyx":1149
 *             return self.c_vec4.w
 *         else:
 *             raise AttributeError()             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self, name: str, value):
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1149, __pyx_L1_error)
  }

  /* "cgl_wrapper.pyx":1139
 *         return hash((self.c_vec4.x, self.c_vec4.y, self.c_vec4.z, self.c_vec4.w))
 * 
 *     def __getattr__(self, name: str):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             return self.c_vec4.x
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec4.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1151
 *             raise AttributeError()
 * 
 *     def __setattr__(self, name: str, value):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             self.c_vec4.x = value
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4vec4_23__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_4vec4_23__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 1151, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_22__setattr__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self), ((PyObject*)__pyx_v_name), ((PyObject *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4vec4_22__setattr__(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  CGL_float __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setattr__", 0);

  /* "cgl_wrapper.pyx":1152
 * 
 *     def __setattr__(self, name: str, value):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             self.c_vec4.x = value
 *         elif name == "y":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_x, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1153
 *     def __setattr__(self, name: str, value):
 *         if name == "x":
 *             self.c_vec4.x = value             # <<<<<<<<<<<<<<
 *         elif name == "y":
 *             self.c_vec4.y = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L1_error)
    __pyx_v_self->c_vec4.x = __pyx_t_3;

    /* "cgl_wrapper.pyx":1152
 * 
 *     def __setattr__(self, name: str, value):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             self.c_vec4.x = value
 *         elif name == "y":
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1154
 *         if name == "x":
 *             self.c_vec4.x = value
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             self.c_vec4.y = value
 *         elif name == "z":
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_y, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1154, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":1155
 *             self.c_vec4.x = value
 *         elif name == "y":
 *             self.c_vec4.y = value             # <<<<<<<<<<<<<<
 *         elif name == "z":
 *             self.c_vec4.z = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1155, __pyx_L1_error)
    __pyx_v_self->c_vec4.y = __pyx_t_3;

    /* "cgl_wrapper.pyx":1154
 *         if name == "x":
 *             self.c_vec4.x = value
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             self.c_vec4.y = value
 *         elif name == "z":
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1156
 *         elif name == "y":
 *             self.c_vec4.y = value
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             self.c_vec4.z = value
 *         elif name == "w":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_z, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1157
 *             self.c_vec4.y = value
 *         elif name == "z":
 *             self.c_vec4.z = value             # <<<<<<<<<<<<<<
 *         elif name == "w":
 *             self.c_vec4.w = value
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1157, __pyx_L1_error)
    __pyx_v_self->c_vec4.z = __pyx_t_3;

    /* "cgl_wrapper.pyx":1156
 *         elif name == "y":
 *             self.c_vec4.y = value
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             self.c_vec4.z = value
 *         elif name == "w":
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1158
 *         elif name == "z":
 *             self.c_vec4.z = value
 *         elif name == "w":             # <<<<<<<<<<<<<<
 *             self.c_vec4.w = value
 *         else:
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1158, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":1159
 *             self.c_vec4.z = value
 *         elif name == "w":
 *             self.c_vec4.w = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError()
 */
    __pyx_t_3 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1159, __pyx_L1_error)
    __pyx_v_self->c_vec4.w = __pyx_t_3;

    /* "cgl_wrapper.pyx":1158
 *         elif name == "z":
 *             self.c_vec4.z = value
 *         elif name == "w":             # <<<<<<<<<<<<<<
 *             self.c_vec4.w = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1161
 *             self.c_vec4.w = value
 *         else:
 *             raise AttributeError()             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self, other: vec4):
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1161, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cgl_wrapper.pyx":1151
 *             raise AttributeError()
 * 
 *     def __setattr__(self, name: str, value):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             self.c_vec4.x = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec4.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1163
 *             raise AttributeError()
 * 
 *     def __add__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return vec4(self.x + other.x, self.y + other.y, self.z + other.z, self.w + other.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_25__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_25__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec4, 1, "other", 0))) __PYX_ERR(0, 1163, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_24__add__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec4 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_24__add__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);

  /* "cgl_wrapper.pyx":1164
 * 
 *     def __add__(self, other: vec4):
 *         return vec4(self.x + other.x, self.y + other.y, self.z + other.z, self.w + other.w)             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self, other: vec4):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1163
 *             raise AttributeError()
 * 
 *     def __add__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return vec4(self.x + other.x, self.y + other.y, self.z + other.z, self.w + other.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.vec4.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1166
 *         return vec4(self.x + other.x, self.y + other.y, self.z + other.z, self.w + other.w)
 * 
 *     def __sub__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return vec4(self.x - other.x, self.y - other.y, self.z - other.z, self.w - other.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_27__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_27__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec4, 1, "other", 0))) __PYX_ERR(0, 1166, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_26__sub__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec4 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_26__sub__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);

  /* "cgl_wrapper.pyx":1167
 * 
 *     def __sub__(self, other: vec4):
 *         return vec4(self.x - other.x, self.y - other.y, self.z - other.z, self.w - other.w)             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(self, other: vec4):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1166
 *         return vec4(self.x + other.x, self.y + other.y, self.z + other.z, self.w + other.w)
 * 
 *     def __sub__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return vec4(self.x - other.x, self.y - other.y, self.z - other.z, self.w - other.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.vec4.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1169
 *         return vec4(self.x - other.x, self.y - other.y, self.z - other.z, self.w - other.w)
 * 
 *     def __mul__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return vec4(self.x * other.x, self.y * other.y, self.z * other.z, self.w * other.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_29__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_29__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec4, 1, "other", 0))) __PYX_ERR(0, 1169, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_28__mul__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec4 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_28__mul__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "cgl_wrapper.pyx":1170
 * 
 *     def __mul__(self, other: vec4):
 *         return vec4(self.x * other.x, self.y * other.y, self.z * other.z, self.w * other.w)             # <<<<<<<<<<<<<<
 * 
 *     def __truediv__(self, other: vec4):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1169
 *         return vec4(self.x - other.x, self.y - other.y, self.z - other.z, self.w - other.w)
 * 
 *     def __mul__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return vec4(self.x * other.x, self.y * other.y, self.z * other.z, self.w * other.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.vec4.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1172
 *         return vec4(self.x * other.x, self.y * other.y, self.z * other.z, self.w * other.w)
 * 
 *     def __truediv__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return vec4(self.x / other.x, self.y / other.y, self.z / other.z, self.w / other.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_31__truediv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec4, 1, "other", 0))) __PYX_ERR(0, 1172, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_30__truediv__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec4 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_30__truediv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__truediv__", 0);

  /* "cgl_wrapper.pyx":1173
 * 
 *     def __truediv__(self, other: vec4):
 *         return vec4(self.x / other.x, self.y / other.y, self.z / other.z, self.w / other.w)             # <<<<<<<<<<<<<<
 * 
 *     def __floordiv__(self, other: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1172
 *         return vec4(self.x * other.x, self.y * other.y, self.z * other.z, self.w * other.w)
 * 
 *     def __truediv__(self, other: vec4):             # <<<<<<<<<<<<<<
 *         return vec4(self.x / other.x, self.y / other.y, self.z / other.z, self.w / other.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.vec4.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1175
 *         return vec4(self.x / other.x, self.y / other.y, self.z / other.z, self.w / other.w)
 * 
 *     def __floordiv__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec4(self.x // other.x, self.y // other.y, self.z // other.z, self.w // other.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_33__floordiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_33__floordiv__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__floordiv__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1175, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_32__floordiv__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_32__floordiv__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__floordiv__", 0);

  /* "cgl_wrapper.pyx":1176
 * 
 *     def __floordiv__(self, other: vec3):
 *         return vec4(self.x // other.x, self.y // other.y, self.z // other.z, self.w // other.w)             # <<<<<<<<<<<<<<
 * 
 *     def dot(self, other: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_FloorDivide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_FloorDivide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyNumber_FloorDivide(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = PyNumber_FloorDivide(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_6);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1175
 *         return vec4(self.x / other.x, self.y / other.y, self.z / other.z, self.w / other.w)
 * 
 *     def __floordiv__(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec4(self.x // other.x, self.y // other.y, self.z // other.z, self.w // other.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.vec4.__floordiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1178
 *         return vec4(self.x // other.x, self.y // other.y, self.z // other.z, self.w // other.w)
 * 
 *     def dot(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return (self.x * other.x) + (self.y * other.y) + (self.z * other.z) + (self.w * other.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_35dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_35dot(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dot (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1178, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_34dot(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_34dot(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dot", 0);

  /* "cgl_wrapper.pyx":1179
 * 
 *     def dot(self, other: vec3):
 *         return (self.x * other.x) + (self.y * other.y) + (self.z * other.z) + (self.w * other.w)             # <<<<<<<<<<<<<<
 * 
 *     def cross(self, other: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1178
 *         return vec4(self.x // other.x, self.y // other.y, self.z // other.z, self.w // other.w)
 * 
 *     def dot(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return (self.x * other.x) + (self.y * other.y) + (self.z * other.z) + (self.w * other.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec4.dot", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1181
 *         return (self.x * other.x) + (self.y * other.y) + (self.z * other.z) + (self.w * other.w)
 * 
 *     def cross(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec4(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x, 0.0)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_37cross(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_37cross(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cross (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_vec3, 1, "other", 0))) __PYX_ERR(0, 1181, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4vec4_36cross(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_36cross(struct __pyx_obj_3cgl_vec4 *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cross", 0);

  /* "cgl_wrapper.pyx":1182
 * 
 *     def cross(self, other: vec3):
 *         return vec4(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x, 0.0)             # <<<<<<<<<<<<<<
 * 
 *     def length(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Subtract(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = PyNumber_Subtract(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __Pyx_INCREF(__pyx_float_0_0);
  __Pyx_GIVEREF(__pyx_float_0_0);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_float_0_0);
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1181
 *         return (self.x * other.x) + (self.y * other.y) + (self.z * other.z) + (self.w * other.w)
 * 
 *     def cross(self, other: vec3):             # <<<<<<<<<<<<<<
 *         return vec4(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x, 0.0)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.vec4.cross", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1184
 *         return vec4(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x, 0.0)
 * 
 *     def length(self):             # <<<<<<<<<<<<<<
 *         return math.sqrt(self.length_squared())
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_39length(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_39length(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_38length(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_38length(struct __pyx_obj_3cgl_vec4 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  double __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("length", 0);

  /* "cgl_wrapper.pyx":1185
 * 
 *     def length(self):
 *         return math.sqrt(self.length_squared())             # <<<<<<<<<<<<<<
 * 
 *     def length_squared(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_length_squared); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_4 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyFloat_FromDouble(sqrt(__pyx_t_4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1184
 *         return vec4(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x, 0.0)
 * 
 *     def length(self):             # <<<<<<<<<<<<<<
 *         return math.sqrt(self.length_squared())
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.vec4.length", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1187
 *         return math.sqrt(self.length_squared())
 * 
 *     def length_squared(self):             # <<<<<<<<<<<<<<
 *         return (self.x * self.x) + (self.y * self.y) + (self.z * self.z) + (self.w * self.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_41length_squared(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_41length_squared(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("length_squared (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_40length_squared(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_40length_squared(struct __pyx_obj_3cgl_vec4 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("length_squared", 0);

  /* "cgl_wrapper.pyx":1188
 * 
 *     def length_squared(self):
 *         return (self.x * self.x) + (self.y * self.y) + (self.z * self.z) + (self.w * self.w)             # <<<<<<<<<<<<<<
 * 
 *     def normalized(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_w); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1187
 *         return math.sqrt(self.length_squared())
 * 
 *     def length_squared(self):             # <<<<<<<<<<<<<<
 *         return (self.x * self.x) + (self.y * self.y) + (self.z * self.z) + (self.w * self.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.vec4.length_squared", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1190
 *         return (self.x * self.x) + (self.y * self.y) + (self.z * self.z) + (self.w * self.w)
 * 
 *     def normalized(self):             # <<<<<<<<<<<<<<
 *         length = self.length()
 *         return vec4(self.x / length, self.y / length, self.z / length, self.w / length)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_43normalized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_43normalized(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("normalized (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_42normalized(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_42normalized(struct __pyx_obj_3cgl_vec4 *__pyx_v_self) {
  PyObject *__pyx_v_length = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("normalized", 0);

  /* "cgl_wrapper.pyx":1191
 * 
 *     def normalized(self):
 *         length = self.length()             # <<<<<<<<<<<<<<
 *         return vec4(self.x / length, self.y / length, self.z / length, self.w / length)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1191, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_length = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1192
 *     def normalized(self):
 *         length = self.length()
 *         return vec4(self.x / length, self.y / length, self.z / length, self.w / length)             # <<<<<<<<<<<<<<
 * 
 * def vec4_triple_product(a: vec4, b: vec4, c: vec4) -> vec4:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_v_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_v_length); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_1, __pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1190
 *         return (self.x * self.x) + (self.y * self.y) + (self.z * self.z) + (self.w * self.w)
 * 
 *     def normalized(self):             # <<<<<<<<<<<<<<
 *         length = self.length()
 *         return vec4(self.x / length, self.y / length, self.z / length, self.w / length)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.vec4.normalized", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_length);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_45__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_44__reduce_cython__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_44__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec4 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec4.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4vec4_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_4vec4_47__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4vec4_46__setstate_cython__(((struct __pyx_obj_3cgl_vec4 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4vec4_46__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_vec4 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.vec4.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1194
 *         return vec4(self.x / length, self.y / length, self.z / length, self.w / length)
 * 
 * def vec4_triple_product(a: vec4, b: vec4, c: vec4) -> vec4:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec4 obj = vec4(CGL_vec4_triple_product(a.c_vec4, b.c_vec4, c.c_vec4))
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_vec4 *__pyx_pw_3cgl_133vec4_triple_product(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_133vec4_triple_product = {"vec4_triple_product", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_133vec4_triple_product, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_vec4 *__pyx_pw_3cgl_133vec4_triple_product(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec4 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec4 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec4 *__pyx_v_c = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_vec4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("vec4_triple_product (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec4_triple_product", 1, 3, 3, 1); __PYX_ERR(0, 1194, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("vec4_triple_product", 1, 3, 3, 2); __PYX_ERR(0, 1194, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "vec4_triple_product") < 0)) __PYX_ERR(0, 1194, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec4 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec4 *)values[1]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec4 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("vec4_triple_product", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1194, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.vec4_triple_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec4, 1, "a", 0))) __PYX_ERR(0, 1194, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec4, 1, "b", 0))) __PYX_ERR(0, 1194, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec4, 1, "c", 0))) __PYX_ERR(0, 1194, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_132vec4_triple_product(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_vec4 *__pyx_pf_3cgl_132vec4_triple_product(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_a, struct __pyx_obj_3cgl_vec4 *__pyx_v_b, struct __pyx_obj_3cgl_vec4 *__pyx_v_c) {
  struct CGL_vec4 __pyx_v_obj;
  struct __pyx_obj_3cgl_vec4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  struct CGL_vec4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("vec4_triple_product", 0);

  /* "cgl_wrapper.pyx":1195
 * 
 * def vec4_triple_product(a: vec4, b: vec4, c: vec4) -> vec4:
 *     cdef CGL_vec4 obj = vec4(CGL_vec4_triple_product(a.c_vec4, b.c_vec4, c.c_vec4))             # <<<<<<<<<<<<<<
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 * 
 */
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_vec4(CGL_vec4_triple_product(__pyx_v_a->c_vec4, __pyx_v_b->c_vec4, __pyx_v_c->c_vec4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __pyx_convert__from_py_struct__CGL_vec4(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1195, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_obj = __pyx_t_3;

  /* "cgl_wrapper.pyx":1196
 * def vec4_triple_product(a: vec4, b: vec4, c: vec4) -> vec4:
 *     cdef CGL_vec4 obj = vec4(CGL_vec4_triple_product(a.c_vec4, b.c_vec4, c.c_vec4))
 *     return vec4(obj.x, obj.y, obj.z, obj.w)             # <<<<<<<<<<<<<<
 * 
 * cdef class ivec4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_obj.x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_obj.y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_obj.z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_obj.w); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_5);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = ((struct __pyx_obj_3cgl_vec4 *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1194
 *         return vec4(self.x / length, self.y / length, self.z / length, self.w / length)
 * 
 * def vec4_triple_product(a: vec4, b: vec4, c: vec4) -> vec4:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec4 obj = vec4(CGL_vec4_triple_product(a.c_vec4, b.c_vec4, c.c_vec4))
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.vec4_triple_product", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1201
 *     cdef CGL_ivec4 c_ivec4
 * 
 *     def __init__(self, x: int = 0, y: int = 0, z: int = 0, w: int = 0):             # <<<<<<<<<<<<<<
 *         self.c_ivec4 = CGL_ivec4(x, y, z, w)
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5ivec4_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_5ivec4_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_z = 0;
  PyObject *__pyx_v_w = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,&__pyx_n_s_w,0};
    PyObject* values[4] = {0,0,0,0};
    values[0] = ((PyObject *)__pyx_int_0);
    values[1] = ((PyObject *)__pyx_int_0);
    values[2] = ((PyObject *)__pyx_int_0);
    values[3] = ((PyObject *)__pyx_int_0);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1201, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
    __pyx_v_z = values[2];
    __pyx_v_w = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1201, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ivec4.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_5ivec4___init__(((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_w);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5ivec4___init__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z, PyObject *__pyx_v_w) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  struct CGL_ivec4 __pyx_t_1;
  CGL_int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":1202
 * 
 *     def __init__(self, x: int = 0, y: int = 0, z: int = 0, w: int = 0):
 *         self.c_ivec4 = CGL_ivec4(x, y, z, w)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_x); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L1_error)
  __pyx_t_1.x = __pyx_t_2;
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_y); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L1_error)
  __pyx_t_1.y = __pyx_t_2;
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_z); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L1_error)
  __pyx_t_1.z = __pyx_t_2;
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_w); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1202, __pyx_L1_error)
  __pyx_t_1.w = __pyx_t_2;
  __pyx_v_self->c_ivec4 = __pyx_t_1;

  /* "cgl_wrapper.pyx":1201
 *     cdef CGL_ivec4 c_ivec4
 * 
 *     def __init__(self, x: int = 0, y: int = 0, z: int = 0, w: int = 0):             # <<<<<<<<<<<<<<
 *         self.c_ivec4 = CGL_ivec4(x, y, z, w)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.ivec4.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1204
 *         self.c_ivec4 = CGL_ivec4(x, y, z, w)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"ivec4({self.c_ivec4.x}, {self.c_ivec4.y}, {self.c_ivec4.z}, {self.c_ivec4.w})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5ivec4_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5ivec4_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5ivec4_2__repr__(((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5ivec4_2__repr__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":1205
 * 
 *     def __repr__(self):
 *         return f"ivec4({self.c_ivec4.x}, {self.c_ivec4.y}, {self.c_ivec4.z}, {self.c_ivec4.w})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_ivec4);
  __pyx_t_2 += 6;
  __Pyx_GIVEREF(__pyx_kp_u_ivec4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ivec4);
  __pyx_t_4 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.w); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1204
 *         self.c_ivec4 = CGL_ivec4(x, y, z, w)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"ivec4({self.c_ivec4.x}, {self.c_ivec4.y}, {self.c_ivec4.z}, {self.c_ivec4.w})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.ivec4.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1207
 *         return f"ivec4({self.c_ivec4.x}, {self.c_ivec4.y}, {self.c_ivec4.z}, {self.c_ivec4.w})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"ivec4({self.c_ivec4.x}, {self.c_ivec4.y}, {self.c_ivec4.z}, {self.c_ivec4.w})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5ivec4_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5ivec4_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5ivec4_4__str__(((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5ivec4_4__str__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":1208
 * 
 *     def __str__(self):
 *         return f"ivec4({self.c_ivec4.x}, {self.c_ivec4.y}, {self.c_ivec4.z}, {self.c_ivec4.w})"             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index: int):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_ivec4);
  __pyx_t_2 += 6;
  __Pyx_GIVEREF(__pyx_kp_u_ivec4);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ivec4);
  __pyx_t_4 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.w); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1208, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1207
 *         return f"ivec4({self.c_ivec4.x}, {self.c_ivec4.y}, {self.c_ivec4.z}, {self.c_ivec4.w})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"ivec4({self.c_ivec4.x}, {self.c_ivec4.y}, {self.c_ivec4.z}, {self.c_ivec4.w})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.ivec4.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1210
 *         return f"ivec4({self.c_ivec4.x}, {self.c_ivec4.y}, {self.c_ivec4.z}, {self.c_ivec4.w})"
 * 
 *     def __getitem__(self, index: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             return self.c_ivec4.x
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5ivec4_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_pw_3cgl_5ivec4_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5ivec4_6__getitem__(((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5ivec4_6__getitem__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "cgl_wrapper.pyx":1211
 * 
 *     def __getitem__(self, index: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.x
 *         elif index == 1:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1212
 *     def __getitem__(self, index: int):
 *         if index == 0:
 *             return self.c_ivec4.x             # <<<<<<<<<<<<<<
 *         elif index == 1:
 *             return self.c_ivec4.y
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1212, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1211
 * 
 *     def __getitem__(self, index: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.x
 *         elif index == 1:
 */
  }

  /* "cgl_wrapper.pyx":1213
 *         if index == 0:
 *             return self.c_ivec4.x
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.y
 *         elif index == 2:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1213, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1214
 *             return self.c_ivec4.x
 *         elif index == 1:
 *             return self.c_ivec4.y             # <<<<<<<<<<<<<<
 *         elif index == 2:
 *             return self.c_ivec4.z
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1213
 *         if index == 0:
 *             return self.c_ivec4.x
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.y
 *         elif index == 2:
 */
  }

  /* "cgl_wrapper.pyx":1215
 *         elif index == 1:
 *             return self.c_ivec4.y
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.z
 *         elif index == 3:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1215, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1216
 *             return self.c_ivec4.y
 *         elif index == 2:
 *             return self.c_ivec4.z             # <<<<<<<<<<<<<<
 *         elif index == 3:
 *             return self.c_ivec4.w
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1215
 *         elif index == 1:
 *             return self.c_ivec4.y
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.z
 *         elif index == 3:
 */
  }

  /* "cgl_wrapper.pyx":1217
 *         elif index == 2:
 *             return self.c_ivec4.z
 *         elif index == 3:             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.w
 *         else:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1218
 *             return self.c_ivec4.z
 *         elif index == 3:
 *             return self.c_ivec4.w             # <<<<<<<<<<<<<<
 *         else:
 *             raise IndexError()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1217
 *         elif index == 2:
 *             return self.c_ivec4.z
 *         elif index == 3:             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.w
 *         else:
 */
  }

  /* "cgl_wrapper.pyx":1220
 *             return self.c_ivec4.w
 *         else:
 *             raise IndexError()             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, index: int, value: int):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_IndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1220, __pyx_L1_error)
  }

  /* "cgl_wrapper.pyx":1210
 *         return f"ivec4({self.c_ivec4.x}, {self.c_ivec4.y}, {self.c_ivec4.z}, {self.c_ivec4.w})"
 * 
 *     def __getitem__(self, index: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             return self.c_ivec4.x
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ivec4.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1222
 *             raise IndexError()
 * 
 *     def __setitem__(self, index: int, value: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             self.c_ivec4.x = value
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5ivec4_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_5ivec4_9__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5ivec4_8__setitem__(((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5ivec4_8__setitem__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  CGL_int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "cgl_wrapper.pyx":1223
 * 
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             self.c_ivec4.x = value
 *         elif index == 1:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1223, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1224
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:
 *             self.c_ivec4.x = value             # <<<<<<<<<<<<<<
 *         elif index == 1:
 *             self.c_ivec4.y = value
 */
    __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1224, __pyx_L1_error)
    __pyx_v_self->c_ivec4.x = __pyx_t_3;

    /* "cgl_wrapper.pyx":1223
 * 
 *     def __setitem__(self, index: int, value: int):
 *         if index == 0:             # <<<<<<<<<<<<<<
 *             self.c_ivec4.x = value
 *         elif index == 1:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1225
 *         if index == 0:
 *             self.c_ivec4.x = value
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             self.c_ivec4.y = value
 *         elif index == 2:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1225, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1226
 *             self.c_ivec4.x = value
 *         elif index == 1:
 *             self.c_ivec4.y = value             # <<<<<<<<<<<<<<
 *         elif index == 2:
 *             self.c_ivec4.z = value
 */
    __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1226, __pyx_L1_error)
    __pyx_v_self->c_ivec4.y = __pyx_t_3;

    /* "cgl_wrapper.pyx":1225
 *         if index == 0:
 *             self.c_ivec4.x = value
 *         elif index == 1:             # <<<<<<<<<<<<<<
 *             self.c_ivec4.y = value
 *         elif index == 2:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1227
 *         elif index == 1:
 *             self.c_ivec4.y = value
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             self.c_ivec4.z = value
 *         elif index == 3:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1228
 *             self.c_ivec4.y = value
 *         elif index == 2:
 *             self.c_ivec4.z = value             # <<<<<<<<<<<<<<
 *         elif index == 3:
 *             self.c_ivec4.w = value
 */
    __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1228, __pyx_L1_error)
    __pyx_v_self->c_ivec4.z = __pyx_t_3;

    /* "cgl_wrapper.pyx":1227
 *         elif index == 1:
 *             self.c_ivec4.y = value
 *         elif index == 2:             # <<<<<<<<<<<<<<
 *             self.c_ivec4.z = value
 *         elif index == 3:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1229
 *         elif index == 2:
 *             self.c_ivec4.z = value
 *         elif index == 3:             # <<<<<<<<<<<<<<
 *             self.c_ivec4.w = value
 *         else:
 */
  __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_index, __pyx_int_3, 3, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1229, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1230
 *             self.c_ivec4.z = value
 *         elif index == 3:
 *             self.c_ivec4.w = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise IndexError()
 */
    __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1230, __pyx_L1_error)
    __pyx_v_self->c_ivec4.w = __pyx_t_3;

    /* "cgl_wrapper.pyx":1229
 *         elif index == 2:
 *             self.c_ivec4.z = value
 *         elif index == 3:             # <<<<<<<<<<<<<<
 *             self.c_ivec4.w = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1232
 *             self.c_ivec4.w = value
 *         else:
 *             raise IndexError()             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_IndexError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1232, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cgl_wrapper.pyx":1222
 *             raise IndexError()
 * 
 *     def __setitem__(self, index: int, value: int):             # <<<<<<<<<<<<<<
 *         if index == 0:
 *             self.c_ivec4.x = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ivec4.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1234
 *             raise IndexError()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.c_ivec4.x, self.c_ivec4.y, self.c_ivec4.z, self.c_ivec4.w))
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_5ivec4_11__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_5ivec4_11__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5ivec4_10__hash__(((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_5ivec4_10__hash__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  Py_hash_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":1235
 * 
 *     def __hash__(self):
 *         return hash((self.c_ivec4.x, self.c_ivec4.y, self.c_ivec4.z, self.c_ivec4.w))             # <<<<<<<<<<<<<<
 * 
 *     def __getattr__(self, name: str):
 */
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_6 = PyObject_Hash(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_hash_t)-1))) __PYX_ERR(0, 1235, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1234
 *             raise IndexError()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.c_ivec4.x, self.c_ivec4.y, self.c_ivec4.z, self.c_ivec4.w))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.ivec4.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1237
 *         return hash((self.c_ivec4.x, self.c_ivec4.y, self.c_ivec4.z, self.c_ivec4.w))
 * 
 *     def __getattr__(self, name: str):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             return self.c_ivec4.x
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5ivec4_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_3cgl_5ivec4_13__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 1237, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_5ivec4_12__getattr__(((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_self), ((PyObject*)__pyx_v_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5ivec4_12__getattr__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, PyObject *__pyx_v_name) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getattr__", 0);

  /* "cgl_wrapper.pyx":1238
 * 
 *     def __getattr__(self, name: str):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.x
 *         elif name == "y":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_x, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1238, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1239
 *     def __getattr__(self, name: str):
 *         if name == "x":
 *             return self.c_ivec4.x             # <<<<<<<<<<<<<<
 *         elif name == "y":
 *             return self.c_ivec4.y
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1239, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1238
 * 
 *     def __getattr__(self, name: str):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.x
 *         elif name == "y":
 */
  }

  /* "cgl_wrapper.pyx":1240
 *         if name == "x":
 *             return self.c_ivec4.x
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.y
 *         elif name == "z":
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_y, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1240, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":1241
 *             return self.c_ivec4.x
 *         elif name == "y":
 *             return self.c_ivec4.y             # <<<<<<<<<<<<<<
 *         elif name == "z":
 *             return self.c_ivec4.z
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1241, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1240
 *         if name == "x":
 *             return self.c_ivec4.x
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.y
 *         elif name == "z":
 */
  }

  /* "cgl_wrapper.pyx":1242
 *         elif name == "y":
 *             return self.c_ivec4.y
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.z
 *         elif name == "w":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_z, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1242, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1243
 *             return self.c_ivec4.y
 *         elif name == "z":
 *             return self.c_ivec4.z             # <<<<<<<<<<<<<<
 *         elif name == "w":
 *             return self.c_ivec4.w
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1243, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1242
 *         elif name == "y":
 *             return self.c_ivec4.y
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.z
 *         elif name == "w":
 */
  }

  /* "cgl_wrapper.pyx":1244
 *         elif name == "z":
 *             return self.c_ivec4.z
 *         elif name == "w":             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.w
 *         else:
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1244, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":1245
 *             return self.c_ivec4.z
 *         elif name == "w":
 *             return self.c_ivec4.w             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_3 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_ivec4.w); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1245, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1244
 *         elif name == "z":
 *             return self.c_ivec4.z
 *         elif name == "w":             # <<<<<<<<<<<<<<
 *             return self.c_ivec4.w
 *         else:
 */
  }

  /* "cgl_wrapper.pyx":1247
 *             return self.c_ivec4.w
 *         else:
 *             raise AttributeError()             # <<<<<<<<<<<<<<
 * 
 *     def __setattr__(self, name: str, value: int):
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1247, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1247, __pyx_L1_error)
  }

  /* "cgl_wrapper.pyx":1237
 *         return hash((self.c_ivec4.x, self.c_ivec4.y, self.c_ivec4.z, self.c_ivec4.w))
 * 
 *     def __getattr__(self, name: str):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             return self.c_ivec4.x
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.ivec4.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1249
 *             raise AttributeError()
 * 
 *     def __setattr__(self, name: str, value: int):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             self.c_ivec4.x = value
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5ivec4_15__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_5ivec4_15__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setattr__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 1249, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_5ivec4_14__setattr__(((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_self), ((PyObject*)__pyx_v_name), ((PyObject *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5ivec4_14__setattr__(struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  CGL_int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setattr__", 0);

  /* "cgl_wrapper.pyx":1250
 * 
 *     def __setattr__(self, name: str, value: int):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             self.c_ivec4.x = value
 *         elif name == "y":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_x, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1250, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1251
 *     def __setattr__(self, name: str, value: int):
 *         if name == "x":
 *             self.c_ivec4.x = value             # <<<<<<<<<<<<<<
 *         elif name == "y":
 *             self.c_ivec4.y = value
 */
    __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1251, __pyx_L1_error)
    __pyx_v_self->c_ivec4.x = __pyx_t_3;

    /* "cgl_wrapper.pyx":1250
 * 
 *     def __setattr__(self, name: str, value: int):
 *         if name == "x":             # <<<<<<<<<<<<<<
 *             self.c_ivec4.x = value
 *         elif name == "y":
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1252
 *         if name == "x":
 *             self.c_ivec4.x = value
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             self.c_ivec4.y = value
 *         elif name == "z":
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_y, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":1253
 *             self.c_ivec4.x = value
 *         elif name == "y":
 *             self.c_ivec4.y = value             # <<<<<<<<<<<<<<
 *         elif name == "z":
 *             self.c_ivec4.z = value
 */
    __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L1_error)
    __pyx_v_self->c_ivec4.y = __pyx_t_3;

    /* "cgl_wrapper.pyx":1252
 *         if name == "x":
 *             self.c_ivec4.x = value
 *         elif name == "y":             # <<<<<<<<<<<<<<
 *             self.c_ivec4.y = value
 *         elif name == "z":
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1254
 *         elif name == "y":
 *             self.c_ivec4.y = value
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             self.c_ivec4.z = value
 *         elif name == "w":
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_z, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1254, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1255
 *             self.c_ivec4.y = value
 *         elif name == "z":
 *             self.c_ivec4.z = value             # <<<<<<<<<<<<<<
 *         elif name == "w":
 *             self.c_ivec4.w = value
 */
    __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1255, __pyx_L1_error)
    __pyx_v_self->c_ivec4.z = __pyx_t_3;

    /* "cgl_wrapper.pyx":1254
 *         elif name == "y":
 *             self.c_ivec4.y = value
 *         elif name == "z":             # <<<<<<<<<<<<<<
 *             self.c_ivec4.z = value
 *         elif name == "w":
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1256
 *         elif name == "z":
 *             self.c_ivec4.z = value
 *         elif name == "w":             # <<<<<<<<<<<<<<
 *             self.c_ivec4.w = value
 *         else:
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_name, __pyx_n_s_w, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1256, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (likely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":1257
 *             self.c_ivec4.z = value
 *         elif name == "w":
 *             self.c_ivec4.w = value             # <<<<<<<<<<<<<<
 *         else:
 *             raise AttributeError()
 */
    __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1257, __pyx_L1_error)
    __pyx_v_self->c_ivec4.w = __pyx_t_3;

    /* "cgl_wrapper.pyx":1256
 *         elif name == "z":
 *             self.c_ivec4.z = value
 *         elif name == "w":             # <<<<<<<<<<<<<<
 *             self.c_ivec4.w = value
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1259
 *             self.c_ivec4.w = value
 *         else:
 *             raise AttributeError()             # <<<<<<<<<<<<<<
 * 
 * cdef class mat4:
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1259, __pyx_L1_error)
  }
  __pyx_L3:;

  /* "cgl_wrapper.pyx":1249
 *             raise AttributeError()
 * 
 *     def __setattr__(self, name: str, value: int):             # <<<<<<<<<<<<<<
 *         if name == "x":
 *             self.c_ivec4.x = value
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.ivec4.__setattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5ivec4_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_5ivec4_17__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5ivec4_16__reduce_cython__(((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5ivec4_16__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ivec4 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ivec4.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5ivec4_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_5ivec4_19__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5ivec4_18__setstate_cython__(((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5ivec4_18__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ivec4 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ivec4.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1264
 *     cdef CGL_mat4 c_mat4
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_mat4 = CGL_mat4()
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4mat4_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_4mat4_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_4mat4___init__(((struct __pyx_obj_3cgl_mat4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4mat4___init__(struct __pyx_obj_3cgl_mat4 *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  struct CGL_mat4 __pyx_t_1;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":1265
 * 
 *     def __init__(self):
 *         self.c_mat4 = CGL_mat4()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_v_self->c_mat4 = __pyx_t_1;

  /* "cgl_wrapper.pyx":1264
 *     cdef CGL_mat4 c_mat4
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_mat4 = CGL_mat4()
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1267
 *         self.c_mat4 = CGL_mat4()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         result = "mat4x4(\n"
 *         for i in range(4):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4mat4_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4mat4_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4mat4_2__repr__(((struct __pyx_obj_3cgl_mat4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4mat4_2__repr__(struct __pyx_obj_3cgl_mat4 *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":1268
 * 
 *     def __repr__(self):
 *         result = "mat4x4(\n"             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             result += "    "
 */
  __Pyx_INCREF(__pyx_kp_s_mat4x4);
  __pyx_v_result = __pyx_kp_s_mat4x4;

  /* "cgl_wrapper.pyx":1269
 *     def __repr__(self):
 *         result = "mat4x4(\n"
 *         for i in range(4):             # <<<<<<<<<<<<<<
 *             result += "    "
 *             for j in range(4):
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 4; __pyx_t_1+=1) {
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":1270
 *         result = "mat4x4(\n"
 *         for i in range(4):
 *             result += "    "             # <<<<<<<<<<<<<<
 *             for j in range(4):
 *                 result += f"{self.c_mat4.m[i * 4 + j]}, "
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":1271
 *         for i in range(4):
 *             result += "    "
 *             for j in range(4):             # <<<<<<<<<<<<<<
 *                 result += f"{self.c_mat4.m[i * 4 + j]}, "
 *             result += "\n"
 */
    for (__pyx_t_3 = 0; __pyx_t_3 < 4; __pyx_t_3+=1) {
      __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1271, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cgl_wrapper.pyx":1272
 *             result += "    "
 *             for j in range(4):
 *                 result += f"{self.c_mat4.m[i * 4 + j]}, "             # <<<<<<<<<<<<<<
 *             result += "\n"
 *         result += ")"
 */
      __pyx_t_2 = PyNumber_Multiply(__pyx_v_i, __pyx_int_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[__pyx_t_5])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u__3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1272, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
      __pyx_t_2 = 0;
    }

    /* "cgl_wrapper.pyx":1273
 *             for j in range(4):
 *                 result += f"{self.c_mat4.m[i * 4 + j]}, "
 *             result += "\n"             # <<<<<<<<<<<<<<
 *         result += ")"
 *         return result
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1273, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;
  }

  /* "cgl_wrapper.pyx":1274
 *                 result += f"{self.c_mat4.m[i * 4 + j]}, "
 *             result += "\n"
 *         result += ")"             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1274, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1275
 *             result += "\n"
 *         result += ")"
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1267
 *         self.c_mat4 = CGL_mat4()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         result = "mat4x4(\n"
 *         for i in range(4):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.mat4.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1277
 *         return result
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         result = "mat4x4(\n"
 *         for i in range(4):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4mat4_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4mat4_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4mat4_4__str__(((struct __pyx_obj_3cgl_mat4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4mat4_4__str__(struct __pyx_obj_3cgl_mat4 *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_j = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  long __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":1278
 * 
 *     def __str__(self):
 *         result = "mat4x4(\n"             # <<<<<<<<<<<<<<
 *         for i in range(4):
 *             result += "    "
 */
  __Pyx_INCREF(__pyx_kp_s_mat4x4);
  __pyx_v_result = __pyx_kp_s_mat4x4;

  /* "cgl_wrapper.pyx":1279
 *     def __str__(self):
 *         result = "mat4x4(\n"
 *         for i in range(4):             # <<<<<<<<<<<<<<
 *             result += "    "
 *             for j in range(4):
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 4; __pyx_t_1+=1) {
    __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1279, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":1280
 *         result = "mat4x4(\n"
 *         for i in range(4):
 *             result += "    "             # <<<<<<<<<<<<<<
 *             for j in range(4):
 *                 result += f"{self.c_mat4.m[i * 4 + j]}, "
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":1281
 *         for i in range(4):
 *             result += "    "
 *             for j in range(4):             # <<<<<<<<<<<<<<
 *                 result += f"{self.c_mat4.m[i * 4 + j]}, "
 *             result += "\n"
 */
    for (__pyx_t_3 = 0; __pyx_t_3 < 4; __pyx_t_3+=1) {
      __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1281, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "cgl_wrapper.pyx":1282
 *             result += "    "
 *             for j in range(4):
 *                 result += f"{self.c_mat4.m[i * 4 + j]}, "             # <<<<<<<<<<<<<<
 *             result += "\n"
 *         result += ")"
 */
      __pyx_t_2 = PyNumber_Multiply(__pyx_v_i, __pyx_int_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[__pyx_t_5])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_t_2, __pyx_kp_u__3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
      __pyx_t_2 = 0;
    }

    /* "cgl_wrapper.pyx":1283
 *             for j in range(4):
 *                 result += f"{self.c_mat4.m[i * 4 + j]}, "
 *             result += "\n"             # <<<<<<<<<<<<<<
 *         result += ")"
 *         return result
 */
    __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1283, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
    __pyx_t_2 = 0;
  }

  /* "cgl_wrapper.pyx":1284
 *                 result += f"{self.c_mat4.m[i * 4 + j]}, "
 *             result += "\n"
 *         result += ")"             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1285
 *             result += "\n"
 *         result += ")"
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     cdef set_c_mat4(self, c_mat4: CGL_mat4):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1277
 *         return result
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         result = "mat4x4(\n"
 *         for i in range(4):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.mat4.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1287
 *         return result
 * 
 *     cdef set_c_mat4(self, c_mat4: CGL_mat4):             # <<<<<<<<<<<<<<
 *         self.c_mat4 = c_mat4
 * 
 */

static PyObject *__pyx_f_3cgl_4mat4_set_c_mat4(struct __pyx_obj_3cgl_mat4 *__pyx_v_self, struct CGL_mat4 __pyx_v_c_mat4) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_c_mat4", 0);

  /* "cgl_wrapper.pyx":1288
 * 
 *     cdef set_c_mat4(self, c_mat4: CGL_mat4):
 *         self.c_mat4 = c_mat4             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(self, other: mat4):
 */
  __pyx_v_self->c_mat4 = __pyx_v_c_mat4;

  /* "cgl_wrapper.pyx":1287
 *         return result
 * 
 *     cdef set_c_mat4(self, c_mat4: CGL_mat4):             # <<<<<<<<<<<<<<
 *         self.c_mat4 = c_mat4
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1290
 *         self.c_mat4 = c_mat4
 * 
 *     def __mul__(self, other: mat4):             # <<<<<<<<<<<<<<
 *         return mat4_mul(self, other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4mat4_7__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_4mat4_7__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_mat4, 1, "other", 0))) __PYX_ERR(0, 1290, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4mat4_6__mul__(((PyObject *)__pyx_v_self), ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4mat4_6__mul__(PyObject *__pyx_v_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "cgl_wrapper.pyx":1291
 * 
 *     def __mul__(self, other: mat4):
 *         return mat4_mul(self, other)             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_mat4_mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self, ((PyObject *)__pyx_v_other)};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self, ((PyObject *)__pyx_v_other)};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else
  #endif
  {
    __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (__pyx_t_3) {
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
    }
    __Pyx_INCREF(__pyx_v_self);
    __Pyx_GIVEREF(__pyx_v_self);
    PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
    __Pyx_INCREF(((PyObject *)__pyx_v_other));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_other));
    PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, ((PyObject *)__pyx_v_other));
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1290
 *         self.c_mat4 = c_mat4
 * 
 *     def __mul__(self, other: mat4):             # <<<<<<<<<<<<<<
 *         return mat4_mul(self, other)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mat4.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1293
 *         return mat4_mul(self, other)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.c_mat4.m[0], self.c_mat4.m[1], self.c_mat4.m[2], self.c_mat4.m[3], self.c_mat4.m[4], self.c_mat4.m[5], self.c_mat4.m[6], self.c_mat4.m[7], self.c_mat4.m[8], self.c_mat4.m[9], self.c_mat4.m[10], self.c_mat4.m[11], self.c_mat4.m[12], self.c_mat4.m[13], self.c_mat4.m[14], self.c_mat4.m[15]))
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_4mat4_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_4mat4_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4mat4_8__hash__(((struct __pyx_obj_3cgl_mat4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_4mat4_8__hash__(struct __pyx_obj_3cgl_mat4 *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  Py_hash_t __pyx_t_18;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":1294
 * 
 *     def __hash__(self):
 *         return hash((self.c_mat4.m[0], self.c_mat4.m[1], self.c_mat4.m[2], self.c_mat4.m[3], self.c_mat4.m[4], self.c_mat4.m[5], self.c_mat4.m[6], self.c_mat4.m[7], self.c_mat4.m[8], self.c_mat4.m[9], self.c_mat4.m[10], self.c_mat4.m[11], self.c_mat4.m[12], self.c_mat4.m[13], self.c_mat4.m[14], self.c_mat4.m[15]))             # <<<<<<<<<<<<<<
 * 
 * def mat4_mul(a: mat4, b: mat4) -> mat4:
 */
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[1])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[2])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[3])); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[4])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[5])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[6])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[7])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[8])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[9])); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[10])); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_12 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[11])); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __pyx_t_13 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[12])); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_14 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[13])); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_15 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[14])); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_16 = PyFloat_FromDouble((__pyx_v_self->c_mat4.m[15])); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_17 = PyTuple_New(16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_17);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_17, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_17, 3, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_17, 4, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_17, 5, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_17, 6, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_8);
  PyTuple_SET_ITEM(__pyx_t_17, 7, __pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_9);
  PyTuple_SET_ITEM(__pyx_t_17, 8, __pyx_t_9);
  __Pyx_GIVEREF(__pyx_t_10);
  PyTuple_SET_ITEM(__pyx_t_17, 9, __pyx_t_10);
  __Pyx_GIVEREF(__pyx_t_11);
  PyTuple_SET_ITEM(__pyx_t_17, 10, __pyx_t_11);
  __Pyx_GIVEREF(__pyx_t_12);
  PyTuple_SET_ITEM(__pyx_t_17, 11, __pyx_t_12);
  __Pyx_GIVEREF(__pyx_t_13);
  PyTuple_SET_ITEM(__pyx_t_17, 12, __pyx_t_13);
  __Pyx_GIVEREF(__pyx_t_14);
  PyTuple_SET_ITEM(__pyx_t_17, 13, __pyx_t_14);
  __Pyx_GIVEREF(__pyx_t_15);
  PyTuple_SET_ITEM(__pyx_t_17, 14, __pyx_t_15);
  __Pyx_GIVEREF(__pyx_t_16);
  PyTuple_SET_ITEM(__pyx_t_17, 15, __pyx_t_16);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_t_8 = 0;
  __pyx_t_9 = 0;
  __pyx_t_10 = 0;
  __pyx_t_11 = 0;
  __pyx_t_12 = 0;
  __pyx_t_13 = 0;
  __pyx_t_14 = 0;
  __pyx_t_15 = 0;
  __pyx_t_16 = 0;
  __pyx_t_18 = PyObject_Hash(__pyx_t_17); if (unlikely(__pyx_t_18 == ((Py_hash_t)-1))) __PYX_ERR(0, 1294, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
  __pyx_r = __pyx_t_18;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1293
 *         return mat4_mul(self, other)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.c_mat4.m[0], self.c_mat4.m[1], self.c_mat4.m[2], self.c_mat4.m[3], self.c_mat4.m[4], self.c_mat4.m[5], self.c_mat4.m[6], self.c_mat4.m[7], self.c_mat4.m[8], self.c_mat4.m[9], self.c_mat4.m[10], self.c_mat4.m[11], self.c_mat4.m[12], self.c_mat4.m[13], self.c_mat4.m[14], self.c_mat4.m[15]))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_AddTraceback("cgl.mat4.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4mat4_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4mat4_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4mat4_10__reduce_cython__(((struct __pyx_obj_3cgl_mat4 *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4mat4_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mat4 *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4mat4_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_4mat4_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4mat4_12__setstate_cython__(((struct __pyx_obj_3cgl_mat4 *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4mat4_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mat4 *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1296
 *         return hash((self.c_mat4.m[0], self.c_mat4.m[1], self.c_mat4.m[2], self.c_mat4.m[3], self.c_mat4.m[4], self.c_mat4.m[5], self.c_mat4.m[6], self.c_mat4.m[7], self.c_mat4.m[8], self.c_mat4.m[9], self.c_mat4.m[10], self.c_mat4.m[11], self.c_mat4.m[12], self.c_mat4.m[13], self.c_mat4.m[14], self.c_mat4.m[15]))
 * 
 * def mat4_mul(a: mat4, b: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_mul(a.c_mat4, b.c_mat4)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_135mat4_mul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_135mat4_mul = {"mat4_mul", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_135mat4_mul, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_135mat4_mul(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_mat4 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_b = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_mul (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_mul", 1, 2, 2, 1); __PYX_ERR(0, 1296, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mat4_mul") < 0)) __PYX_ERR(0, 1296, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_mat4 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_mat4 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mat4_mul", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1296, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_mat4, 1, "a", 0))) __PYX_ERR(0, 1296, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_mat4, 1, "b", 0))) __PYX_ERR(0, 1296, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_134mat4_mul(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_134mat4_mul(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_a, struct __pyx_obj_3cgl_mat4 *__pyx_v_b) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_mul", 0);

  /* "cgl_wrapper.pyx":1297
 * 
 * def mat4_mul(a: mat4, b: mat4) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_mul(a.c_mat4, b.c_mat4)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_mul(__pyx_v_a->c_mat4, __pyx_v_b->c_mat4);

  /* "cgl_wrapper.pyx":1298
 * def mat4_mul(a: mat4, b: mat4) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_mul(a.c_mat4, b.c_mat4)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1299
 *     cdef CGL_mat4 obj = CGL_mat4_mul(a.c_mat4, b.c_mat4)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1300
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_det(m: mat4) -> float:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1296
 *         return hash((self.c_mat4.m[0], self.c_mat4.m[1], self.c_mat4.m[2], self.c_mat4.m[3], self.c_mat4.m[4], self.c_mat4.m[5], self.c_mat4.m[6], self.c_mat4.m[7], self.c_mat4.m[8], self.c_mat4.m[9], self.c_mat4.m[10], self.c_mat4.m[11], self.c_mat4.m[12], self.c_mat4.m[13], self.c_mat4.m[14], self.c_mat4.m[15]))
 * 
 * def mat4_mul(a: mat4, b: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_mul(a.c_mat4, b.c_mat4)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_mul", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1302
 *     return result
 * 
 * def mat4_det(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det(m.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_137mat4_det(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_137mat4_det = {"mat4_det", (PyCFunction)__pyx_pw_3cgl_137mat4_det, METH_O, 0};
static PyObject *__pyx_pw_3cgl_137mat4_det(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_det (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1302, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_136mat4_det(__pyx_self, ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_m));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_136mat4_det(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_det", 0);

  /* "cgl_wrapper.pyx":1303
 * 
 * def mat4_det(m: mat4) -> float:
 *     return CGL_mat4_det(m.c_mat4)             # <<<<<<<<<<<<<<
 * 
 * def mat4_det_by_lu(m: mat4) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_mat4_det(__pyx_v_m->c_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1302
 *     return result
 * 
 * def mat4_det(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det(m.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_det", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1305
 *     return CGL_mat4_det(m.c_mat4)
 * 
 * def mat4_det_by_lu(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det_by_lu(m.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_139mat4_det_by_lu(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_139mat4_det_by_lu = {"mat4_det_by_lu", (PyCFunction)__pyx_pw_3cgl_139mat4_det_by_lu, METH_O, 0};
static PyObject *__pyx_pw_3cgl_139mat4_det_by_lu(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_det_by_lu (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1305, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_138mat4_det_by_lu(__pyx_self, ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_m));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_138mat4_det_by_lu(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_det_by_lu", 0);

  /* "cgl_wrapper.pyx":1306
 * 
 * def mat4_det_by_lu(m: mat4) -> float:
 *     return CGL_mat4_det_by_lu(m.c_mat4)             # <<<<<<<<<<<<<<
 * 
 * def mat4_det_by_gauss(m: mat4) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_mat4_det_by_lu(__pyx_v_m->c_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1305
 *     return CGL_mat4_det(m.c_mat4)
 * 
 * def mat4_det_by_lu(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det_by_lu(m.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_det_by_lu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1308
 *     return CGL_mat4_det_by_lu(m.c_mat4)
 * 
 * def mat4_det_by_gauss(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det_by_gauss(m.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_141mat4_det_by_gauss(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_141mat4_det_by_gauss = {"mat4_det_by_gauss", (PyCFunction)__pyx_pw_3cgl_141mat4_det_by_gauss, METH_O, 0};
static PyObject *__pyx_pw_3cgl_141mat4_det_by_gauss(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_det_by_gauss (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1308, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_140mat4_det_by_gauss(__pyx_self, ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_m));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_140mat4_det_by_gauss(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_det_by_gauss", 0);

  /* "cgl_wrapper.pyx":1309
 * 
 * def mat4_det_by_gauss(m: mat4) -> float:
 *     return CGL_mat4_det_by_gauss(m.c_mat4)             # <<<<<<<<<<<<<<
 * 
 * def mat4_mul_vec4(m: mat4, v: vec4) -> vec4:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_mat4_det_by_gauss(__pyx_v_m->c_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1308
 *     return CGL_mat4_det_by_lu(m.c_mat4)
 * 
 * def mat4_det_by_gauss(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det_by_gauss(m.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_det_by_gauss", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1311
 *     return CGL_mat4_det_by_gauss(m.c_mat4)
 * 
 * def mat4_mul_vec4(m: mat4, v: vec4) -> vec4:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec4 obj = CGL_mat4_mul_vec4(m.c_mat4, v.c_vec4)
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_vec4 *__pyx_pw_3cgl_143mat4_mul_vec4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_143mat4_mul_vec4 = {"mat4_mul_vec4", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_143mat4_mul_vec4, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_vec4 *__pyx_pw_3cgl_143mat4_mul_vec4(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_mat4 *__pyx_v_m = 0;
  struct __pyx_obj_3cgl_vec4 *__pyx_v_v = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_vec4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_mul_vec4 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,&__pyx_n_s_v,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_mul_vec4", 1, 2, 2, 1); __PYX_ERR(0, 1311, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mat4_mul_vec4") < 0)) __PYX_ERR(0, 1311, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_m = ((struct __pyx_obj_3cgl_mat4 *)values[0]);
    __pyx_v_v = ((struct __pyx_obj_3cgl_vec4 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mat4_mul_vec4", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1311, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_mul_vec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1311, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_3cgl_vec4, 1, "v", 0))) __PYX_ERR(0, 1311, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_142mat4_mul_vec4(__pyx_self, __pyx_v_m, __pyx_v_v);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_vec4 *__pyx_pf_3cgl_142mat4_mul_vec4(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m, struct __pyx_obj_3cgl_vec4 *__pyx_v_v) {
  struct CGL_vec4 __pyx_v_obj;
  struct __pyx_obj_3cgl_vec4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_mul_vec4", 0);

  /* "cgl_wrapper.pyx":1312
 * 
 * def mat4_mul_vec4(m: mat4, v: vec4) -> vec4:
 *     cdef CGL_vec4 obj = CGL_mat4_mul_vec4(m.c_mat4, v.c_vec4)             # <<<<<<<<<<<<<<
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 * 
 */
  __pyx_v_obj = CGL_mat4_mul_vec4(__pyx_v_m->c_mat4, __pyx_v_v->c_vec4);

  /* "cgl_wrapper.pyx":1313
 * def mat4_mul_vec4(m: mat4, v: vec4) -> vec4:
 *     cdef CGL_vec4 obj = CGL_mat4_mul_vec4(m.c_mat4, v.c_vec4)
 *     return vec4(obj.x, obj.y, obj.z, obj.w)             # <<<<<<<<<<<<<<
 * 
 * def mat4_inverse(m: mat4) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_obj.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_obj.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_obj.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_obj.w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = ((struct __pyx_obj_3cgl_vec4 *)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1311
 *     return CGL_mat4_det_by_gauss(m.c_mat4)
 * 
 * def mat4_mul_vec4(m: mat4, v: vec4) -> vec4:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec4 obj = CGL_mat4_mul_vec4(m.c_mat4, v.c_vec4)
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mat4_mul_vec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1315
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 * 
 * def mat4_inverse(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_inverse(m.c_mat4)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_145mat4_inverse(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_145mat4_inverse = {"mat4_inverse", (PyCFunction)__pyx_pw_3cgl_145mat4_inverse, METH_O, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_145mat4_inverse(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_inverse (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1315, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_144mat4_inverse(__pyx_self, ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_m));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_144mat4_inverse(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_inverse", 0);

  /* "cgl_wrapper.pyx":1316
 * 
 * def mat4_inverse(m: mat4) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_inverse(m.c_mat4)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_inverse(__pyx_v_m->c_mat4);

  /* "cgl_wrapper.pyx":1317
 * def mat4_inverse(m: mat4) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_inverse(m.c_mat4)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1318
 *     cdef CGL_mat4 obj = CGL_mat4_inverse(m.c_mat4)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1319
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_transpose(m: mat4) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1315
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 * 
 * def mat4_inverse(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_inverse(m.c_mat4)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_inverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1321
 *     return result
 * 
 * def mat4_transpose(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_transpose(m.c_mat4)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_147mat4_transpose(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_147mat4_transpose = {"mat4_transpose", (PyCFunction)__pyx_pw_3cgl_147mat4_transpose, METH_O, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_147mat4_transpose(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_transpose (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1321, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_146mat4_transpose(__pyx_self, ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_m));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_146mat4_transpose(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_transpose", 0);

  /* "cgl_wrapper.pyx":1322
 * 
 * def mat4_transpose(m: mat4) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_transpose(m.c_mat4)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_transpose(__pyx_v_m->c_mat4);

  /* "cgl_wrapper.pyx":1323
 * def mat4_transpose(m: mat4) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_transpose(m.c_mat4)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1324
 *     cdef CGL_mat4 obj = CGL_mat4_transpose(m.c_mat4)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1325
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_adjoint(m: mat4) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1321
 *     return result
 * 
 * def mat4_transpose(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_transpose(m.c_mat4)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_transpose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1327
 *     return result
 * 
 * def mat4_adjoint(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_adjoint(m.c_mat4)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_149mat4_adjoint(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_149mat4_adjoint = {"mat4_adjoint", (PyCFunction)__pyx_pw_3cgl_149mat4_adjoint, METH_O, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_149mat4_adjoint(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_adjoint (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1327, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_148mat4_adjoint(__pyx_self, ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_m));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_148mat4_adjoint(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_adjoint", 0);

  /* "cgl_wrapper.pyx":1328
 * 
 * def mat4_adjoint(m: mat4) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_adjoint(m.c_mat4)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_adjoint(__pyx_v_m->c_mat4);

  /* "cgl_wrapper.pyx":1329
 * def mat4_adjoint(m: mat4) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_adjoint(m.c_mat4)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1330
 *     cdef CGL_mat4 obj = CGL_mat4_adjoint(m.c_mat4)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1331
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_gauss_elim(m: mat4) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1327
 *     return result
 * 
 * def mat4_adjoint(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_adjoint(m.c_mat4)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_adjoint", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1333
 *     return result
 * 
 * def mat4_gauss_elim(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_gauss_elim(m.c_mat4)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_151mat4_gauss_elim(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_151mat4_gauss_elim = {"mat4_gauss_elim", (PyCFunction)__pyx_pw_3cgl_151mat4_gauss_elim, METH_O, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_151mat4_gauss_elim(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_gauss_elim (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1333, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_150mat4_gauss_elim(__pyx_self, ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_m));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_150mat4_gauss_elim(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_gauss_elim", 0);

  /* "cgl_wrapper.pyx":1334
 * 
 * def mat4_gauss_elim(m: mat4) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_gauss_elim(m.c_mat4)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_gauss_elim(__pyx_v_m->c_mat4);

  /* "cgl_wrapper.pyx":1335
 * def mat4_gauss_elim(m: mat4) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_gauss_elim(m.c_mat4)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1336
 *     cdef CGL_mat4 obj = CGL_mat4_gauss_elim(m.c_mat4)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1337
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_rank(m: mat4) -> int:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1333
 *     return result
 * 
 * def mat4_gauss_elim(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_gauss_elim(m.c_mat4)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_gauss_elim", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1339
 *     return result
 * 
 * def mat4_rank(m: mat4) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_rank(m.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_153mat4_rank(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_153mat4_rank = {"mat4_rank", (PyCFunction)__pyx_pw_3cgl_153mat4_rank, METH_O, 0};
static PyObject *__pyx_pw_3cgl_153mat4_rank(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_rank (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1339, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_152mat4_rank(__pyx_self, ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_m));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_152mat4_rank(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_rank", 0);

  /* "cgl_wrapper.pyx":1340
 * 
 * def mat4_rank(m: mat4) -> int:
 *     return CGL_mat4_rank(m.c_mat4)             # <<<<<<<<<<<<<<
 * 
 * def mat4_trace(m: mat4) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(CGL_mat4_rank(__pyx_v_m->c_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1340, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1339
 *     return result
 * 
 * def mat4_rank(m: mat4) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_rank(m.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_rank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1342
 *     return CGL_mat4_rank(m.c_mat4)
 * 
 * def mat4_trace(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_trace(m.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_155mat4_trace(PyObject *__pyx_self, PyObject *__pyx_v_m); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_155mat4_trace = {"mat4_trace", (PyCFunction)__pyx_pw_3cgl_155mat4_trace, METH_O, 0};
static PyObject *__pyx_pw_3cgl_155mat4_trace(PyObject *__pyx_self, PyObject *__pyx_v_m) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_trace (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1342, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_154mat4_trace(__pyx_self, ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_m));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_154mat4_trace(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_trace", 0);

  /* "cgl_wrapper.pyx":1343
 * 
 * def mat4_trace(m: mat4) -> float:
 *     return CGL_mat4_trace(m.c_mat4)             # <<<<<<<<<<<<<<
 * 
 * def mat4_rotate_about_axis(axis: vec3, angle: float) -> mat4:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_mat4_trace(__pyx_v_m->c_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1343, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1342
 *     return CGL_mat4_rank(m.c_mat4)
 * 
 * def mat4_trace(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_trace(m.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_trace", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1345
 *     return CGL_mat4_trace(m.c_mat4)
 * 
 * def mat4_rotate_about_axis(axis: vec3, angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_about_axis(axis.c_vec3, angle)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_157mat4_rotate_about_axis(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_157mat4_rotate_about_axis = {"mat4_rotate_about_axis", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_157mat4_rotate_about_axis, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_157mat4_rotate_about_axis(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_axis = 0;
  double __pyx_v_angle;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_rotate_about_axis (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_axis,&__pyx_n_s_angle,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_axis)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_angle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_rotate_about_axis", 1, 2, 2, 1); __PYX_ERR(0, 1345, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mat4_rotate_about_axis") < 0)) __PYX_ERR(0, 1345, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_axis = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_angle = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_angle == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1345, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mat4_rotate_about_axis", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1345, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_rotate_about_axis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_axis), __pyx_ptype_3cgl_vec3, 1, "axis", 0))) __PYX_ERR(0, 1345, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_156mat4_rotate_about_axis(__pyx_self, __pyx_v_axis, __pyx_v_angle);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_156mat4_rotate_about_axis(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_axis, double __pyx_v_angle) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_rotate_about_axis", 0);

  /* "cgl_wrapper.pyx":1346
 * 
 * def mat4_rotate_about_axis(axis: vec3, angle: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_about_axis(axis.c_vec3, angle)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_rotate_about_axis(__pyx_v_axis->c_vec3, __pyx_v_angle);

  /* "cgl_wrapper.pyx":1347
 * def mat4_rotate_about_axis(axis: vec3, angle: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_about_axis(axis.c_vec3, angle)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1348
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_about_axis(axis.c_vec3, angle)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1348, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1349
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_look_at(eye: vec3, target: vec3, up: vec3) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1345
 *     return CGL_mat4_trace(m.c_mat4)
 * 
 * def mat4_rotate_about_axis(axis: vec3, angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_about_axis(axis.c_vec3, angle)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_rotate_about_axis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1351
 *     return result
 * 
 * def mat4_look_at(eye: vec3, target: vec3, up: vec3) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_look_at(eye.c_vec3, target.c_vec3, up.c_vec3)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_159mat4_look_at(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_159mat4_look_at = {"mat4_look_at", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_159mat4_look_at, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_159mat4_look_at(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_eye = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_target = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_up = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_look_at (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_target,&__pyx_n_s_up,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_target)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_look_at", 1, 3, 3, 1); __PYX_ERR(0, 1351, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_up)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_look_at", 1, 3, 3, 2); __PYX_ERR(0, 1351, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mat4_look_at") < 0)) __PYX_ERR(0, 1351, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_eye = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_target = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_up = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mat4_look_at", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1351, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_look_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eye), __pyx_ptype_3cgl_vec3, 1, "eye", 0))) __PYX_ERR(0, 1351, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_target), __pyx_ptype_3cgl_vec3, 1, "target", 0))) __PYX_ERR(0, 1351, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_up), __pyx_ptype_3cgl_vec3, 1, "up", 0))) __PYX_ERR(0, 1351, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_158mat4_look_at(__pyx_self, __pyx_v_eye, __pyx_v_target, __pyx_v_up);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_158mat4_look_at(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_eye, struct __pyx_obj_3cgl_vec3 *__pyx_v_target, struct __pyx_obj_3cgl_vec3 *__pyx_v_up) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_look_at", 0);

  /* "cgl_wrapper.pyx":1352
 * 
 * def mat4_look_at(eye: vec3, target: vec3, up: vec3) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_look_at(eye.c_vec3, target.c_vec3, up.c_vec3)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_look_at(__pyx_v_eye->c_vec3, __pyx_v_target->c_vec3, __pyx_v_up->c_vec3);

  /* "cgl_wrapper.pyx":1353
 * def mat4_look_at(eye: vec3, target: vec3, up: vec3) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_look_at(eye.c_vec3, target.c_vec3, up.c_vec3)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1354
 *     cdef CGL_mat4 obj = CGL_mat4_look_at(eye.c_vec3, target.c_vec3, up.c_vec3)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1355
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_lerp(a: mat4, b: mat4, t: float) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1351
 *     return result
 * 
 * def mat4_look_at(eye: vec3, target: vec3, up: vec3) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_look_at(eye.c_vec3, target.c_vec3, up.c_vec3)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_look_at", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1357
 *     return result
 * 
 * def mat4_lerp(a: mat4, b: mat4, t: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_lerp(a.c_mat4, b.c_mat4, t)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_161mat4_lerp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_161mat4_lerp = {"mat4_lerp", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_161mat4_lerp, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_161mat4_lerp(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_mat4 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_b = 0;
  double __pyx_v_t;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_lerp (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_t,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_lerp", 1, 3, 3, 1); __PYX_ERR(0, 1357, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_lerp", 1, 3, 3, 2); __PYX_ERR(0, 1357, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mat4_lerp") < 0)) __PYX_ERR(0, 1357, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_mat4 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_mat4 *)values[1]);
    __pyx_v_t = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1357, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mat4_lerp", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1357, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_lerp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_mat4, 1, "a", 0))) __PYX_ERR(0, 1357, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_mat4, 1, "b", 0))) __PYX_ERR(0, 1357, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_160mat4_lerp(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_t);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_160mat4_lerp(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_a, struct __pyx_obj_3cgl_mat4 *__pyx_v_b, double __pyx_v_t) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_lerp", 0);

  /* "cgl_wrapper.pyx":1358
 * 
 * def mat4_lerp(a: mat4, b: mat4, t: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_lerp(a.c_mat4, b.c_mat4, t)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_lerp(__pyx_v_a->c_mat4, __pyx_v_b->c_mat4, __pyx_v_t);

  /* "cgl_wrapper.pyx":1359
 * def mat4_lerp(a: mat4, b: mat4, t: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_lerp(a.c_mat4, b.c_mat4, t)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1359, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1360
 *     cdef CGL_mat4 obj = CGL_mat4_lerp(a.c_mat4, b.c_mat4, t)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1361
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_decompose_lu(m: mat4, l: mat4, u: mat4):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1357
 *     return result
 * 
 * def mat4_lerp(a: mat4, b: mat4, t: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_lerp(a.c_mat4, b.c_mat4, t)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_lerp", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1363
 *     return result
 * 
 * def mat4_decompose_lu(m: mat4, l: mat4, u: mat4):             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 l_obj = CGL_mat4()
 *     cdef CGL_mat4 u_obj = CGL_mat4()
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_163mat4_decompose_lu(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_163mat4_decompose_lu = {"mat4_decompose_lu", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_163mat4_decompose_lu, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_163mat4_decompose_lu(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_mat4 *__pyx_v_m = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_l = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_u = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_decompose_lu (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,&__pyx_n_s_l,&__pyx_n_s_u,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_l)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_decompose_lu", 1, 3, 3, 1); __PYX_ERR(0, 1363, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_decompose_lu", 1, 3, 3, 2); __PYX_ERR(0, 1363, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mat4_decompose_lu") < 0)) __PYX_ERR(0, 1363, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_m = ((struct __pyx_obj_3cgl_mat4 *)values[0]);
    __pyx_v_l = ((struct __pyx_obj_3cgl_mat4 *)values[1]);
    __pyx_v_u = ((struct __pyx_obj_3cgl_mat4 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mat4_decompose_lu", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1363, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_decompose_lu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1363, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_l), __pyx_ptype_3cgl_mat4, 1, "l", 0))) __PYX_ERR(0, 1363, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_u), __pyx_ptype_3cgl_mat4, 1, "u", 0))) __PYX_ERR(0, 1363, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_162mat4_decompose_lu(__pyx_self, __pyx_v_m, __pyx_v_l, __pyx_v_u);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_162mat4_decompose_lu(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m, struct __pyx_obj_3cgl_mat4 *__pyx_v_l, struct __pyx_obj_3cgl_mat4 *__pyx_v_u) {
  struct CGL_mat4 __pyx_v_l_obj;
  struct CGL_mat4 __pyx_v_u_obj;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  struct CGL_mat4 __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_decompose_lu", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_l);
  __Pyx_INCREF((PyObject *)__pyx_v_u);

  /* "cgl_wrapper.pyx":1364
 * 
 * def mat4_decompose_lu(m: mat4, l: mat4, u: mat4):
 *     cdef CGL_mat4 l_obj = CGL_mat4()             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 u_obj = CGL_mat4()
 *     CGL_mat4_decompose_lu(m.c_mat4, &l_obj, &u_obj)
 */
  __pyx_v_l_obj = __pyx_t_1;

  /* "cgl_wrapper.pyx":1365
 * def mat4_decompose_lu(m: mat4, l: mat4, u: mat4):
 *     cdef CGL_mat4 l_obj = CGL_mat4()
 *     cdef CGL_mat4 u_obj = CGL_mat4()             # <<<<<<<<<<<<<<
 *     CGL_mat4_decompose_lu(m.c_mat4, &l_obj, &u_obj)
 *     l = mat4()
 */
  __pyx_v_u_obj = __pyx_t_1;

  /* "cgl_wrapper.pyx":1366
 *     cdef CGL_mat4 l_obj = CGL_mat4()
 *     cdef CGL_mat4 u_obj = CGL_mat4()
 *     CGL_mat4_decompose_lu(m.c_mat4, &l_obj, &u_obj)             # <<<<<<<<<<<<<<
 *     l = mat4()
 *     u = mat4()
 */
  CGL_mat4_decompose_lu(__pyx_v_m->c_mat4, (&__pyx_v_l_obj), (&__pyx_v_u_obj));

  /* "cgl_wrapper.pyx":1367
 *     cdef CGL_mat4 u_obj = CGL_mat4()
 *     CGL_mat4_decompose_lu(m.c_mat4, &l_obj, &u_obj)
 *     l = mat4()             # <<<<<<<<<<<<<<
 *     u = mat4()
 *     l.set_c_mat4(l_obj)
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_l, ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1368
 *     CGL_mat4_decompose_lu(m.c_mat4, &l_obj, &u_obj)
 *     l = mat4()
 *     u = mat4()             # <<<<<<<<<<<<<<
 *     l.set_c_mat4(l_obj)
 *     u.set_c_mat4(u_obj)
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF_SET(__pyx_v_u, ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_2));
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1369
 *     l = mat4()
 *     u = mat4()
 *     l.set_c_mat4(l_obj)             # <<<<<<<<<<<<<<
 *     u.set_c_mat4(u_obj)
 *     return (l, u)
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_l->__pyx_vtab)->set_c_mat4(__pyx_v_l, __pyx_v_l_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1370
 *     u = mat4()
 *     l.set_c_mat4(l_obj)
 *     u.set_c_mat4(u_obj)             # <<<<<<<<<<<<<<
 *     return (l, u)
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_u->__pyx_vtab)->set_c_mat4(__pyx_v_u, __pyx_v_u_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1371
 *     l.set_c_mat4(l_obj)
 *     u.set_c_mat4(u_obj)
 *     return (l, u)             # <<<<<<<<<<<<<<
 * 
 * def mat4_perspective(fov: float, aspect: float, near: float, far: float) -> mat4:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_l));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_l));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_l));
  __Pyx_INCREF(((PyObject *)__pyx_v_u));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_u));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_u));
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1363
 *     return result
 * 
 * def mat4_decompose_lu(m: mat4, l: mat4, u: mat4):             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 l_obj = CGL_mat4()
 *     cdef CGL_mat4 u_obj = CGL_mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.mat4_decompose_lu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_l);
  __Pyx_XDECREF((PyObject *)__pyx_v_u);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1373
 *     return (l, u)
 * 
 * def mat4_perspective(fov: float, aspect: float, near: float, far: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_perspective(fov, aspect, near, far)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_165mat4_perspective(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_165mat4_perspective = {"mat4_perspective", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_165mat4_perspective, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_165mat4_perspective(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_fov;
  double __pyx_v_aspect;
  double __pyx_v_near;
  double __pyx_v_far;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_perspective (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fov,&__pyx_n_s_aspect,&__pyx_n_s_near,&__pyx_n_s_far,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fov)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aspect)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_perspective", 1, 4, 4, 1); __PYX_ERR(0, 1373, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_near)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_perspective", 1, 4, 4, 2); __PYX_ERR(0, 1373, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_far)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_perspective", 1, 4, 4, 3); __PYX_ERR(0, 1373, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mat4_perspective") < 0)) __PYX_ERR(0, 1373, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_fov = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_fov == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L3_error)
    __pyx_v_aspect = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_aspect == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L3_error)
    __pyx_v_near = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_near == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L3_error)
    __pyx_v_far = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_far == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mat4_perspective", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1373, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_perspective", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_164mat4_perspective(__pyx_self, __pyx_v_fov, __pyx_v_aspect, __pyx_v_near, __pyx_v_far);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_164mat4_perspective(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_fov, double __pyx_v_aspect, double __pyx_v_near, double __pyx_v_far) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_perspective", 0);

  /* "cgl_wrapper.pyx":1374
 * 
 * def mat4_perspective(fov: float, aspect: float, near: float, far: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_perspective(fov, aspect, near, far)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_perspective(__pyx_v_fov, __pyx_v_aspect, __pyx_v_near, __pyx_v_far);

  /* "cgl_wrapper.pyx":1375
 * def mat4_perspective(fov: float, aspect: float, near: float, far: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_perspective(fov, aspect, near, far)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1376
 *     cdef CGL_mat4 obj = CGL_mat4_perspective(fov, aspect, near, far)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1377
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_orthographic(left: float, right: float, bottom: float, top: float, near: float, far: float) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1373
 *     return (l, u)
 * 
 * def mat4_perspective(fov: float, aspect: float, near: float, far: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_perspective(fov, aspect, near, far)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_perspective", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1379
 *     return result
 * 
 * def mat4_orthographic(left: float, right: float, bottom: float, top: float, near: float, far: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_orthographic(left, right, bottom, top, near, far)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_167mat4_orthographic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_167mat4_orthographic = {"mat4_orthographic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_167mat4_orthographic, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_167mat4_orthographic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_left;
  double __pyx_v_right;
  double __pyx_v_bottom;
  double __pyx_v_top;
  double __pyx_v_near;
  double __pyx_v_far;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_orthographic (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_left,&__pyx_n_s_right,&__pyx_n_s_bottom,&__pyx_n_s_top,&__pyx_n_s_near,&__pyx_n_s_far,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_orthographic", 1, 6, 6, 1); __PYX_ERR(0, 1379, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_bottom)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_orthographic", 1, 6, 6, 2); __PYX_ERR(0, 1379, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_top)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_orthographic", 1, 6, 6, 3); __PYX_ERR(0, 1379, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_near)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_orthographic", 1, 6, 6, 4); __PYX_ERR(0, 1379, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_far)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_orthographic", 1, 6, 6, 5); __PYX_ERR(0, 1379, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mat4_orthographic") < 0)) __PYX_ERR(0, 1379, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_left = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_left == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1379, __pyx_L3_error)
    __pyx_v_right = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_right == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1379, __pyx_L3_error)
    __pyx_v_bottom = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_bottom == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1379, __pyx_L3_error)
    __pyx_v_top = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_top == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1379, __pyx_L3_error)
    __pyx_v_near = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_near == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1379, __pyx_L3_error)
    __pyx_v_far = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_far == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1379, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mat4_orthographic", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1379, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_orthographic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_166mat4_orthographic(__pyx_self, __pyx_v_left, __pyx_v_right, __pyx_v_bottom, __pyx_v_top, __pyx_v_near, __pyx_v_far);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_166mat4_orthographic(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_left, double __pyx_v_right, double __pyx_v_bottom, double __pyx_v_top, double __pyx_v_near, double __pyx_v_far) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_orthographic", 0);

  /* "cgl_wrapper.pyx":1380
 * 
 * def mat4_orthographic(left: float, right: float, bottom: float, top: float, near: float, far: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_orthographic(left, right, bottom, top, near, far)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_orthographic(__pyx_v_left, __pyx_v_right, __pyx_v_bottom, __pyx_v_top, __pyx_v_near, __pyx_v_far);

  /* "cgl_wrapper.pyx":1381
 * def mat4_orthographic(left: float, right: float, bottom: float, top: float, near: float, far: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_orthographic(left, right, bottom, top, near, far)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1382
 *     cdef CGL_mat4 obj = CGL_mat4_orthographic(left, right, bottom, top, near, far)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1383
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_zero() -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1379
 *     return result
 * 
 * def mat4_orthographic(left: float, right: float, bottom: float, top: float, near: float, far: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_orthographic(left, right, bottom, top, near, far)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_orthographic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1385
 *     return result
 * 
 * def mat4_zero() -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_zero()
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_169mat4_zero(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_169mat4_zero = {"mat4_zero", (PyCFunction)__pyx_pw_3cgl_169mat4_zero, METH_NOARGS, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_169mat4_zero(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_zero (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_168mat4_zero(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_168mat4_zero(CYTHON_UNUSED PyObject *__pyx_self) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_zero", 0);

  /* "cgl_wrapper.pyx":1386
 * 
 * def mat4_zero() -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_zero()             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_zero();

  /* "cgl_wrapper.pyx":1387
 * def mat4_zero() -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_zero()
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1388
 *     cdef CGL_mat4 obj = CGL_mat4_zero()
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1388, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1389
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_identity() -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1385
 *     return result
 * 
 * def mat4_zero() -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_zero()
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1391
 *     return result
 * 
 * def mat4_identity() -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_identity()
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_171mat4_identity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_171mat4_identity = {"mat4_identity", (PyCFunction)__pyx_pw_3cgl_171mat4_identity, METH_NOARGS, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_171mat4_identity(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_identity (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_170mat4_identity(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_170mat4_identity(CYTHON_UNUSED PyObject *__pyx_self) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_identity", 0);

  /* "cgl_wrapper.pyx":1392
 * 
 * def mat4_identity() -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_identity()             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_identity();

  /* "cgl_wrapper.pyx":1393
 * def mat4_identity() -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_identity()
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1394
 *     cdef CGL_mat4 obj = CGL_mat4_identity()
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1394, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1395
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1391
 *     return result
 * 
 * def mat4_identity() -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_identity()
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_identity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1398
 * 
 * 
 * def mat4_scale(x: float, y: float, z: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_scale(x, y, z)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_173mat4_scale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_173mat4_scale = {"mat4_scale", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_173mat4_scale, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_173mat4_scale(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_scale (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_scale", 1, 3, 3, 1); __PYX_ERR(0, 1398, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_scale", 1, 3, 3, 2); __PYX_ERR(0, 1398, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mat4_scale") < 0)) __PYX_ERR(0, 1398, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1398, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1398, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1398, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mat4_scale", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1398, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_172mat4_scale(__pyx_self, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_172mat4_scale(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_scale", 0);

  /* "cgl_wrapper.pyx":1399
 * 
 * def mat4_scale(x: float, y: float, z: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_scale(x, y, z)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_scale(__pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* "cgl_wrapper.pyx":1400
 * def mat4_scale(x: float, y: float, z: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_scale(x, y, z)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1400, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1401
 *     cdef CGL_mat4 obj = CGL_mat4_scale(x, y, z)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1402
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_translate(x: float, y: float, z: float) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1398
 * 
 * 
 * def mat4_scale(x: float, y: float, z: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_scale(x, y, z)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1404
 *     return result
 * 
 * def mat4_translate(x: float, y: float, z: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_translate(x, y, z)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_175mat4_translate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_175mat4_translate = {"mat4_translate", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_175mat4_translate, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_175mat4_translate(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_translate (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_translate", 1, 3, 3, 1); __PYX_ERR(0, 1404, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mat4_translate", 1, 3, 3, 2); __PYX_ERR(0, 1404, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mat4_translate") < 0)) __PYX_ERR(0, 1404, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1404, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1404, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1404, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mat4_translate", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1404, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_translate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_174mat4_translate(__pyx_self, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_174mat4_translate(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_translate", 0);

  /* "cgl_wrapper.pyx":1405
 * 
 * def mat4_translate(x: float, y: float, z: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_translate(x, y, z)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_translate(__pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* "cgl_wrapper.pyx":1406
 * def mat4_translate(x: float, y: float, z: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_translate(x, y, z)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1407
 *     cdef CGL_mat4 obj = CGL_mat4_translate(x, y, z)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1408
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_rotate_x(angle: float) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1404
 *     return result
 * 
 * def mat4_translate(x: float, y: float, z: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_translate(x, y, z)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_translate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1410
 *     return result
 * 
 * def mat4_rotate_x(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_x(angle)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_177mat4_rotate_x(PyObject *__pyx_self, PyObject *__pyx_arg_angle); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_177mat4_rotate_x = {"mat4_rotate_x", (PyCFunction)__pyx_pw_3cgl_177mat4_rotate_x, METH_O, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_177mat4_rotate_x(PyObject *__pyx_self, PyObject *__pyx_arg_angle) {
  double __pyx_v_angle;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_rotate_x (wrapper)", 0);
  assert(__pyx_arg_angle); {
    __pyx_v_angle = __pyx_PyFloat_AsDouble(__pyx_arg_angle); if (unlikely((__pyx_v_angle == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1410, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_rotate_x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_176mat4_rotate_x(__pyx_self, ((double)__pyx_v_angle));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_176mat4_rotate_x(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_angle) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_rotate_x", 0);

  /* "cgl_wrapper.pyx":1411
 * 
 * def mat4_rotate_x(angle: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_x(angle)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_rotate_x(__pyx_v_angle);

  /* "cgl_wrapper.pyx":1412
 * def mat4_rotate_x(angle: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_x(angle)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1413
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_x(angle)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1414
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_rotate_y(angle: float) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1410
 *     return result
 * 
 * def mat4_rotate_x(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_x(angle)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_rotate_x", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1416
 *     return result
 * 
 * def mat4_rotate_y(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_y(angle)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_179mat4_rotate_y(PyObject *__pyx_self, PyObject *__pyx_arg_angle); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_179mat4_rotate_y = {"mat4_rotate_y", (PyCFunction)__pyx_pw_3cgl_179mat4_rotate_y, METH_O, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_179mat4_rotate_y(PyObject *__pyx_self, PyObject *__pyx_arg_angle) {
  double __pyx_v_angle;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_rotate_y (wrapper)", 0);
  assert(__pyx_arg_angle); {
    __pyx_v_angle = __pyx_PyFloat_AsDouble(__pyx_arg_angle); if (unlikely((__pyx_v_angle == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1416, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_rotate_y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_178mat4_rotate_y(__pyx_self, ((double)__pyx_v_angle));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_178mat4_rotate_y(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_angle) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_rotate_y", 0);

  /* "cgl_wrapper.pyx":1417
 * 
 * def mat4_rotate_y(angle: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_y(angle)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_rotate_y(__pyx_v_angle);

  /* "cgl_wrapper.pyx":1418
 * def mat4_rotate_y(angle: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_y(angle)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1419
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_y(angle)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1420
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def mat4_rotate_z(angle: float) -> mat4:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1416
 *     return result
 * 
 * def mat4_rotate_y(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_y(angle)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_rotate_y", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1422
 *     return result
 * 
 * def mat4_rotate_z(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_z(angle)
 *     result = mat4()
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_181mat4_rotate_z(PyObject *__pyx_self, PyObject *__pyx_arg_angle); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_181mat4_rotate_z = {"mat4_rotate_z", (PyCFunction)__pyx_pw_3cgl_181mat4_rotate_z, METH_O, 0};
static struct __pyx_obj_3cgl_mat4 *__pyx_pw_3cgl_181mat4_rotate_z(PyObject *__pyx_self, PyObject *__pyx_arg_angle) {
  double __pyx_v_angle;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mat4_rotate_z (wrapper)", 0);
  assert(__pyx_arg_angle); {
    __pyx_v_angle = __pyx_PyFloat_AsDouble(__pyx_arg_angle); if (unlikely((__pyx_v_angle == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mat4_rotate_z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_180mat4_rotate_z(__pyx_self, ((double)__pyx_v_angle));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mat4 *__pyx_pf_3cgl_180mat4_rotate_z(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_angle) {
  struct CGL_mat4 __pyx_v_obj;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_mat4 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mat4_rotate_z", 0);

  /* "cgl_wrapper.pyx":1423
 * 
 * def mat4_rotate_z(angle: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_z(angle)             # <<<<<<<<<<<<<<
 *     result = mat4()
 *     result.set_c_mat4(obj)
 */
  __pyx_v_obj = CGL_mat4_rotate_z(__pyx_v_angle);

  /* "cgl_wrapper.pyx":1424
 * def mat4_rotate_z(angle: float) -> mat4:
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_z(angle)
 *     result = mat4()             # <<<<<<<<<<<<<<
 *     result.set_c_mat4(obj)
 *     return result
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mat4)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_mat4 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1425
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_z(angle)
 *     result = mat4()
 *     result.set_c_mat4(obj)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mat4 *)__pyx_v_result->__pyx_vtab)->set_c_mat4(__pyx_v_result, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1426
 *     result = mat4()
 *     result.set_c_mat4(obj)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1422
 *     return result
 * 
 * def mat4_rotate_z(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_z(angle)
 *     result = mat4()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mat4_rotate_z", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1433
 * 
 *     @property
 *     def position(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_transform.position.x, self.c_transform.position.y, self.c_transform.position.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_8position_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_8position_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_8position___get__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_8position___get__(struct __pyx_obj_3cgl_transform *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1434
 *     @property
 *     def position(self) -> vec3:
 *         return vec3(self.c_transform.position.x, self.c_transform.position.y, self.c_transform.position.z)             # <<<<<<<<<<<<<<
 * 
 *     @position.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_transform.position.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_transform.position.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_transform.position.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1434, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1433
 * 
 *     @property
 *     def position(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_transform.position.x, self.c_transform.position.y, self.c_transform.position.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.transform.position.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1437
 * 
 *     @position.setter
 *     def position(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_transform.position.x = value.x
 *         self.c_transform.position.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_9transform_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_9transform_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec3, 1, "value", 0))) __PYX_ERR(0, 1437, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_9transform_8position_2__set__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_9transform_8position_2__set__(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":1438
 *     @position.setter
 *     def position(self, value: vec3):
 *         self.c_transform.position.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_transform.position.y = value.y
 *         self.c_transform.position.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1438, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_transform.position.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":1439
 *     def position(self, value: vec3):
 *         self.c_transform.position.x = value.x
 *         self.c_transform.position.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_transform.position.z = value.z
 *         self.c_transform.position.w = 1.0
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1439, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_transform.position.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":1440
 *         self.c_transform.position.x = value.x
 *         self.c_transform.position.y = value.y
 *         self.c_transform.position.z = value.z             # <<<<<<<<<<<<<<
 *         self.c_transform.position.w = 1.0
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1440, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_transform.position.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":1441
 *         self.c_transform.position.y = value.y
 *         self.c_transform.position.z = value.z
 *         self.c_transform.position.w = 1.0             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_transform.position.w = 1.0;

  /* "cgl_wrapper.pyx":1437
 * 
 *     @position.setter
 *     def position(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_transform.position.x = value.x
 *         self.c_transform.position.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.transform.position.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1444
 * 
 *     @property
 *     def rotation(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_transform.rotation.x, self.c_transform.rotation.y, self.c_transform.rotation.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_8rotation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_8rotation_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_8rotation___get__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_8rotation___get__(struct __pyx_obj_3cgl_transform *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1445
 *     @property
 *     def rotation(self) -> vec3:
 *         return vec3(self.c_transform.rotation.x, self.c_transform.rotation.y, self.c_transform.rotation.z)             # <<<<<<<<<<<<<<
 * 
 *     @rotation.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_transform.rotation.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_transform.rotation.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_transform.rotation.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1444
 * 
 *     @property
 *     def rotation(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_transform.rotation.x, self.c_transform.rotation.y, self.c_transform.rotation.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.transform.rotation.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1448
 * 
 *     @rotation.setter
 *     def rotation(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_transform.rotation.x = value.x
 *         self.c_transform.rotation.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_9transform_8rotation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_9transform_8rotation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec3, 1, "value", 0))) __PYX_ERR(0, 1448, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_9transform_8rotation_2__set__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_9transform_8rotation_2__set__(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":1449
 *     @rotation.setter
 *     def rotation(self, value: vec3):
 *         self.c_transform.rotation.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_transform.rotation.y = value.y
 *         self.c_transform.rotation.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1449, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_transform.rotation.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":1450
 *     def rotation(self, value: vec3):
 *         self.c_transform.rotation.x = value.x
 *         self.c_transform.rotation.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_transform.rotation.z = value.z
 *         self.c_transform.rotation.w = 0.0
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_transform.rotation.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":1451
 *         self.c_transform.rotation.x = value.x
 *         self.c_transform.rotation.y = value.y
 *         self.c_transform.rotation.z = value.z             # <<<<<<<<<<<<<<
 *         self.c_transform.rotation.w = 0.0
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1451, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_transform.rotation.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":1452
 *         self.c_transform.rotation.y = value.y
 *         self.c_transform.rotation.z = value.z
 *         self.c_transform.rotation.w = 0.0             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_transform.rotation.w = 0.0;

  /* "cgl_wrapper.pyx":1448
 * 
 *     @rotation.setter
 *     def rotation(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_transform.rotation.x = value.x
 *         self.c_transform.rotation.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.transform.rotation.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1455
 * 
 *     @property
 *     def scale(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_transform.scale.x, self.c_transform.scale.y, self.c_transform.scale.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_5scale_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_5scale___get__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_5scale___get__(struct __pyx_obj_3cgl_transform *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1456
 *     @property
 *     def scale(self) -> vec3:
 *         return vec3(self.c_transform.scale.x, self.c_transform.scale.y, self.c_transform.scale.z)             # <<<<<<<<<<<<<<
 * 
 *     @scale.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_transform.scale.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_transform.scale.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_transform.scale.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1455
 * 
 *     @property
 *     def scale(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_transform.scale.x, self.c_transform.scale.y, self.c_transform.scale.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.transform.scale.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1459
 * 
 *     @scale.setter
 *     def scale(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_transform.scale.x = value.x
 *         self.c_transform.scale.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_9transform_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_9transform_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec3, 1, "value", 0))) __PYX_ERR(0, 1459, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_9transform_5scale_2__set__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_9transform_5scale_2__set__(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":1460
 *     @scale.setter
 *     def scale(self, value: vec3):
 *         self.c_transform.scale.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_transform.scale.y = value.y
 *         self.c_transform.scale.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_transform.scale.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":1461
 *     def scale(self, value: vec3):
 *         self.c_transform.scale.x = value.x
 *         self.c_transform.scale.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_transform.scale.z = value.z
 *         self.c_transform.scale.w = 1.0
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1461, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_transform.scale.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":1462
 *         self.c_transform.scale.x = value.x
 *         self.c_transform.scale.y = value.y
 *         self.c_transform.scale.z = value.z             # <<<<<<<<<<<<<<
 *         self.c_transform.scale.w = 1.0
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1462, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_transform.scale.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":1463
 *         self.c_transform.scale.y = value.y
 *         self.c_transform.scale.z = value.z
 *         self.c_transform.scale.w = 1.0             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_transform.scale.w = 1.0;

  /* "cgl_wrapper.pyx":1459
 * 
 *     @scale.setter
 *     def scale(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_transform.scale.x = value.x
 *         self.c_transform.scale.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.transform.scale.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1466
 * 
 *     @property
 *     def matrix(self) -> mat4:             # <<<<<<<<<<<<<<
 *         return mat4(self.c_transform.matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_6matrix_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_6matrix_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_6matrix___get__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_6matrix___get__(struct __pyx_obj_3cgl_transform *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1467
 *     @property
 *     def matrix(self) -> mat4:
 *         return mat4(self.c_transform.matrix)             # <<<<<<<<<<<<<<
 * 
 *     @matrix.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_mat4(__pyx_v_self->c_transform.matrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3cgl_mat4), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1466
 * 
 *     @property
 *     def matrix(self) -> mat4:             # <<<<<<<<<<<<<<
 *         return mat4(self.c_transform.matrix)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.transform.matrix.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1470
 * 
 *     @matrix.setter
 *     def matrix(self, value: mat4):             # <<<<<<<<<<<<<<
 *         self.c_transform.matrix = value.c_mat4
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_9transform_6matrix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_9transform_6matrix_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_mat4, 1, "value", 0))) __PYX_ERR(0, 1470, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_9transform_6matrix_2__set__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self), ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_9transform_6matrix_2__set__(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  struct CGL_mat4 __pyx_t_1;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":1471
 *     @matrix.setter
 *     def matrix(self, value: mat4):
 *         self.c_transform.matrix = value.c_mat4             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __pyx_v_value->c_mat4;
  __pyx_v_self->c_transform.matrix = __pyx_t_1;

  /* "cgl_wrapper.pyx":1470
 * 
 *     @matrix.setter
 *     def matrix(self, value: mat4):             # <<<<<<<<<<<<<<
 *         self.c_transform.matrix = value.c_mat4
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1474
 * 
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.c_transform = CGL_transform_create_empty()
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_9transform_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_9transform_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_9transform___cinit__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_9transform___cinit__(struct __pyx_obj_3cgl_transform *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "cgl_wrapper.pyx":1475
 * 
 *     def __cinit__(self):
 *         self.c_transform = CGL_transform_create_empty()             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, position: vec3 = None, rotation: vec3 = None, scale: vec3 = None):
 */
  __pyx_v_self->c_transform = CGL_transform_create_empty();

  /* "cgl_wrapper.pyx":1474
 * 
 * 
 *     def __cinit__(self):             # <<<<<<<<<<<<<<
 *         self.c_transform = CGL_transform_create_empty()
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1477
 *         self.c_transform = CGL_transform_create_empty()
 * 
 *     def __init__(self, position: vec3 = None, rotation: vec3 = None, scale: vec3 = None):             # <<<<<<<<<<<<<<
 *         if position is None:
 *             position = vec3()
 */

/* Python wrapper */
static int __pyx_pw_3cgl_9transform_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_9transform_3__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_position = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_rotation = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_scale = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position,&__pyx_n_s_rotation,&__pyx_n_s_scale,0};
    PyObject* values[3] = {0,0,0};
    values[0] = (PyObject *)((struct __pyx_obj_3cgl_vec3 *)Py_None);
    values[1] = (PyObject *)((struct __pyx_obj_3cgl_vec3 *)Py_None);
    values[2] = (PyObject *)((struct __pyx_obj_3cgl_vec3 *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rotation);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1477, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_position = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_rotation = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_scale = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1477, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.transform.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_position), __pyx_ptype_3cgl_vec3, 1, "position", 0))) __PYX_ERR(0, 1477, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_rotation), __pyx_ptype_3cgl_vec3, 1, "rotation", 0))) __PYX_ERR(0, 1477, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_scale), __pyx_ptype_3cgl_vec3, 1, "scale", 0))) __PYX_ERR(0, 1477, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_9transform_2__init__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self), __pyx_v_position, __pyx_v_rotation, __pyx_v_scale);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_9transform_2__init__(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_position, struct __pyx_obj_3cgl_vec3 *__pyx_v_rotation, struct __pyx_obj_3cgl_vec3 *__pyx_v_scale) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);
  __Pyx_INCREF((PyObject *)__pyx_v_position);
  __Pyx_INCREF((PyObject *)__pyx_v_rotation);
  __Pyx_INCREF((PyObject *)__pyx_v_scale);

  /* "cgl_wrapper.pyx":1478
 * 
 *     def __init__(self, position: vec3 = None, rotation: vec3 = None, scale: vec3 = None):
 *         if position is None:             # <<<<<<<<<<<<<<
 *             position = vec3()
 *         if rotation is None:
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_position) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1479
 *     def __init__(self, position: vec3 = None, rotation: vec3 = None, scale: vec3 = None):
 *         if position is None:
 *             position = vec3()             # <<<<<<<<<<<<<<
 *         if rotation is None:
 *             rotation = vec3()
 */
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_vec3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1479, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_position, ((struct __pyx_obj_3cgl_vec3 *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cgl_wrapper.pyx":1478
 * 
 *     def __init__(self, position: vec3 = None, rotation: vec3 = None, scale: vec3 = None):
 *         if position is None:             # <<<<<<<<<<<<<<
 *             position = vec3()
 *         if rotation is None:
 */
  }

  /* "cgl_wrapper.pyx":1480
 *         if position is None:
 *             position = vec3()
 *         if rotation is None:             # <<<<<<<<<<<<<<
 *             rotation = vec3()
 *         if scale is None:
 */
  __pyx_t_2 = (((PyObject *)__pyx_v_rotation) == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":1481
 *             position = vec3()
 *         if rotation is None:
 *             rotation = vec3()             # <<<<<<<<<<<<<<
 *         if scale is None:
 *             scale = vec3(1.0, 1.0, 1.0)
 */
    __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_vec3)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1481, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_rotation, ((struct __pyx_obj_3cgl_vec3 *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cgl_wrapper.pyx":1480
 *         if position is None:
 *             position = vec3()
 *         if rotation is None:             # <<<<<<<<<<<<<<
 *             rotation = vec3()
 *         if scale is None:
 */
  }

  /* "cgl_wrapper.pyx":1482
 *         if rotation is None:
 *             rotation = vec3()
 *         if scale is None:             # <<<<<<<<<<<<<<
 *             scale = vec3(1.0, 1.0, 1.0)
 *         self.c_transform = CGL_transform_create(position.c_vec3, rotation.c_vec3, scale.c_vec3)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_scale) == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1483
 *             rotation = vec3()
 *         if scale is None:
 *             scale = vec3(1.0, 1.0, 1.0)             # <<<<<<<<<<<<<<
 *         self.c_transform = CGL_transform_create(position.c_vec3, rotation.c_vec3, scale.c_vec3)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF_SET(__pyx_v_scale, ((struct __pyx_obj_3cgl_vec3 *)__pyx_t_3));
    __pyx_t_3 = 0;

    /* "cgl_wrapper.pyx":1482
 *         if rotation is None:
 *             rotation = vec3()
 *         if scale is None:             # <<<<<<<<<<<<<<
 *             scale = vec3(1.0, 1.0, 1.0)
 *         self.c_transform = CGL_transform_create(position.c_vec3, rotation.c_vec3, scale.c_vec3)
 */
  }

  /* "cgl_wrapper.pyx":1484
 *         if scale is None:
 *             scale = vec3(1.0, 1.0, 1.0)
 *         self.c_transform = CGL_transform_create(position.c_vec3, rotation.c_vec3, scale.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __pyx_v_self->c_transform = CGL_transform_create(__pyx_v_position->c_vec3, __pyx_v_rotation->c_vec3, __pyx_v_scale->c_vec3);

  /* "cgl_wrapper.pyx":1477
 *         self.c_transform = CGL_transform_create_empty()
 * 
 *     def __init__(self, position: vec3 = None, rotation: vec3 = None, scale: vec3 = None):             # <<<<<<<<<<<<<<
 *         if position is None:
 *             position = vec3()
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.transform.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_position);
  __Pyx_XDECREF((PyObject *)__pyx_v_rotation);
  __Pyx_XDECREF((PyObject *)__pyx_v_scale);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1486
 *         self.c_transform = CGL_transform_create(position.c_vec3, rotation.c_vec3, scale.c_vec3)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.position, self.rotation, self.scale))
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_9transform_5__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_9transform_5__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_4__hash__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_9transform_4__hash__(struct __pyx_obj_3cgl_transform *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_hash_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":1487
 * 
 *     def __hash__(self):
 *         return hash((self.position, self.rotation, self.scale))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rotation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_5 = PyObject_Hash(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_hash_t)-1))) __PYX_ERR(0, 1487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1486
 *         self.c_transform = CGL_transform_create(position.c_vec3, rotation.c_vec3, scale.c_vec3)
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.position, self.rotation, self.scale))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.transform.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1489
 *         return hash((self.position, self.rotation, self.scale))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"transform(position={self.position}, rotation={self.rotation}, scale={self.scale})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_6__repr__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_6__repr__(struct __pyx_obj_3cgl_transform *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":1490
 * 
 *     def __repr__(self):
 *         return f"transform(position={self.position}, rotation={self.rotation}, scale={self.scale})"             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_transform_position);
  __pyx_t_2 += 19;
  __Pyx_GIVEREF(__pyx_kp_u_transform_position);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_transform_position);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_rotation_2);
  __pyx_t_2 += 11;
  __Pyx_GIVEREF(__pyx_kp_u_rotation_2);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_rotation_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rotation); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_scale_2);
  __pyx_t_2 += 8;
  __Pyx_GIVEREF(__pyx_kp_u_scale_2);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_scale_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1489
 *         return hash((self.position, self.rotation, self.scale))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"transform(position={self.position}, rotation={self.rotation}, scale={self.scale})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.transform.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1492
 *         return f"transform(position={self.position}, rotation={self.rotation}, scale={self.scale})"
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, transform):
 *             return self.position == other.position and self.rotation == other.rotation and self.scale == other.scale
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_8__eq__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self), ((PyObject *)__pyx_v_other));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_8__eq__(struct __pyx_obj_3cgl_transform *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "cgl_wrapper.pyx":1493
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, transform):             # <<<<<<<<<<<<<<
 *             return self.position == other.position and self.rotation == other.rotation and self.scale == other.scale
 *         return False
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_3cgl_transform); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":1494
 *     def __eq__(self, other):
 *         if isinstance(other, transform):
 *             return self.position == other.position and self.rotation == other.rotation and self.scale == other.scale             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_position); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1494, __pyx_L1_error)
    if (__pyx_t_2) {
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_6);
      __pyx_t_3 = __pyx_t_6;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rotation); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_rotation); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1494, __pyx_L1_error)
    if (__pyx_t_2) {
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __Pyx_INCREF(__pyx_t_4);
      __pyx_t_3 = __pyx_t_4;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L4_bool_binop_done;
    }
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1494, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_INCREF(__pyx_t_6);
    __pyx_t_3 = __pyx_t_6;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_L4_bool_binop_done:;
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1493
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, transform):             # <<<<<<<<<<<<<<
 *             return self.position == other.position and self.rotation == other.rotation and self.scale == other.scale
 *         return False
 */
  }

  /* "cgl_wrapper.pyx":1495
 *         if isinstance(other, transform):
 *             return self.position == other.position and self.rotation == other.rotation and self.scale == other.scale
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1492
 *         return f"transform(position={self.position}, rotation={self.rotation}, scale={self.scale})"
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, transform):
 *             return self.position == other.position and self.rotation == other.rotation and self.scale == other.scale
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.transform.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1497
 *         return False
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"transform(position={self.position}, rotation={self.rotation}, scale={self.scale})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_11__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_11__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_10__str__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_10__str__(struct __pyx_obj_3cgl_transform *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":1498
 * 
 *     def __str__(self):
 *         return f"transform(position={self.position}, rotation={self.rotation}, scale={self.scale})"             # <<<<<<<<<<<<<<
 * 
 *     def load_matrix(self, m: mat4):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_transform_position);
  __pyx_t_2 += 19;
  __Pyx_GIVEREF(__pyx_kp_u_transform_position);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_transform_position);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_rotation_2);
  __pyx_t_2 += 11;
  __Pyx_GIVEREF(__pyx_kp_u_rotation_2);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_rotation_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rotation); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_scale_2);
  __pyx_t_2 += 8;
  __Pyx_GIVEREF(__pyx_kp_u_scale_2);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_scale_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1497
 *         return False
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"transform(position={self.position}, rotation={self.rotation}, scale={self.scale})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.transform.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1500
 *         return f"transform(position={self.position}, rotation={self.rotation}, scale={self.scale})"
 * 
 *     def load_matrix(self, m: mat4):             # <<<<<<<<<<<<<<
 *         self.c_transform = CGL_transform_create_from_matrix(m.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_13load_matrix(PyObject *__pyx_v_self, PyObject *__pyx_v_m); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_13load_matrix(PyObject *__pyx_v_self, PyObject *__pyx_v_m) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_matrix (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 1500, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_9transform_12load_matrix(((struct __pyx_obj_3cgl_transform *)__pyx_v_self), ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_m));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_12load_matrix(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_matrix", 0);

  /* "cgl_wrapper.pyx":1501
 * 
 *     def load_matrix(self, m: mat4):
 *         self.c_transform = CGL_transform_create_from_matrix(m.c_mat4)             # <<<<<<<<<<<<<<
 * 
 *     def set_parent(self, parent: transform):
 */
  __pyx_v_self->c_transform = CGL_transform_create_from_matrix(__pyx_v_m->c_mat4);

  /* "cgl_wrapper.pyx":1500
 *         return f"transform(position={self.position}, rotation={self.rotation}, scale={self.scale})"
 * 
 *     def load_matrix(self, m: mat4):             # <<<<<<<<<<<<<<
 *         self.c_transform = CGL_transform_create_from_matrix(m.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1503
 *         self.c_transform = CGL_transform_create_from_matrix(m.c_mat4)
 * 
 *     def set_parent(self, parent: transform):             # <<<<<<<<<<<<<<
 *         self.c_transform.parent = &parent.c_transform
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_15set_parent(PyObject *__pyx_v_self, PyObject *__pyx_v_parent); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_15set_parent(PyObject *__pyx_v_self, PyObject *__pyx_v_parent) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_parent (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_3cgl_transform, 1, "parent", 0))) __PYX_ERR(0, 1503, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_9transform_14set_parent(((struct __pyx_obj_3cgl_transform *)__pyx_v_self), ((struct __pyx_obj_3cgl_transform *)__pyx_v_parent));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_14set_parent(struct __pyx_obj_3cgl_transform *__pyx_v_self, struct __pyx_obj_3cgl_transform *__pyx_v_parent) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_parent", 0);

  /* "cgl_wrapper.pyx":1504
 * 
 *     def set_parent(self, parent: transform):
 *         self.c_transform.parent = &parent.c_transform             # <<<<<<<<<<<<<<
 * 
 *     def update(self):
 */
  __pyx_v_self->c_transform.parent = (&__pyx_v_parent->c_transform);

  /* "cgl_wrapper.pyx":1503
 *         self.c_transform = CGL_transform_create_from_matrix(m.c_mat4)
 * 
 *     def set_parent(self, parent: transform):             # <<<<<<<<<<<<<<
 *         self.c_transform.parent = &parent.c_transform
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1506
 *         self.c_transform.parent = &parent.c_transform
 * 
 *     def update(self):             # <<<<<<<<<<<<<<
 *         CGL_transform_update(&self.c_transform)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_17update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_17update(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_16update(((struct __pyx_obj_3cgl_transform *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_16update(struct __pyx_obj_3cgl_transform *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("update", 0);

  /* "cgl_wrapper.pyx":1507
 * 
 *     def update(self):
 *         CGL_transform_update(&self.c_transform)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  (void)(CGL_transform_update((&__pyx_v_self->c_transform)));

  /* "cgl_wrapper.pyx":1506
 *         self.c_transform.parent = &parent.c_transform
 * 
 *     def update(self):             # <<<<<<<<<<<<<<
 *         CGL_transform_update(&self.c_transform)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_18__reduce_cython__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_transform *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.transform.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_9transform_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_9transform_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_9transform_20__setstate_cython__(((struct __pyx_obj_3cgl_transform *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_9transform_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_transform *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.transform.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1516
 * 
 *     @property
 *     def size(self) -> tuple:             # <<<<<<<<<<<<<<
 *         return (self.m, self.n)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_4size___get__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_4size___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1517
 *     @property
 *     def size(self) -> tuple:
 *         return (self.m, self.n)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1516
 * 
 *     @property
 *     def size(self) -> tuple:             # <<<<<<<<<<<<<<
 *         return (self.m, self.n)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1520
 * 
 *     @property
 *     def trace(self) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_trace(self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_5trace_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_5trace_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_5trace___get__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_5trace___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1521
 *     @property
 *     def trace(self) -> float:
 *         return CGL_matrix_trace(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_matrix_trace(__pyx_v_self->c_matrix)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1520
 * 
 *     @property
 *     def trace(self) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_trace(self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.matrix.trace.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1524
 * 
 *     @property
 *     def determinant(self) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_determinant(self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_11determinant_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_11determinant_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_11determinant___get__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_11determinant___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1525
 *     @property
 *     def determinant(self) -> float:
 *         return CGL_matrix_determinant(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_matrix_determinant(__pyx_v_self->c_matrix)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1524
 * 
 *     @property
 *     def determinant(self) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_determinant(self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.matrix.determinant.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1528
 * 
 *     @property
 *     def inverse(self) -> matrix:             # <<<<<<<<<<<<<<
 *         return self.calc_inverse()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_7inverse_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_7inverse_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_7inverse___get__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_7inverse___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1529
 *     @property
 *     def inverse(self) -> matrix:
 *         return self.calc_inverse()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_calc_inverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1528
 * 
 *     @property
 *     def inverse(self) -> matrix:             # <<<<<<<<<<<<<<
 *         return self.calc_inverse()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.inverse.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1532
 * 
 *     @property
 *     def transpose(self) -> matrix:             # <<<<<<<<<<<<<<
 *         return self.calc_transpose()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_9transpose_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_9transpose_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_9transpose___get__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_9transpose___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1533
 *     @property
 *     def transpose(self) -> matrix:
 *         return self.calc_transpose()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_calc_transpose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1532
 * 
 *     @property
 *     def transpose(self) -> matrix:             # <<<<<<<<<<<<<<
 *         return self.calc_transpose()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.transpose.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1536
 * 
 *     @property
 *     def adjugate(self) -> matrix:             # <<<<<<<<<<<<<<
 *         return self.calc_adjugate()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_8adjugate_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_8adjugate_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_8adjugate___get__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_8adjugate___get__(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1537
 *     @property
 *     def adjugate(self) -> matrix:
 *         return self.calc_adjugate()             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, m: int, n: int):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_calc_adjugate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1536
 * 
 *     @property
 *     def adjugate(self) -> matrix:             # <<<<<<<<<<<<<<
 *         return self.calc_adjugate()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.adjugate.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1539
 *         return self.calc_adjugate()
 * 
 *     def __init__(self, m: int, n: int):             # <<<<<<<<<<<<<<
 *         self.c_matrix = CGL_matrix_create(m, n)
 *         self.m = m
 */

/* Python wrapper */
static int __pyx_pw_3cgl_6matrix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_6matrix_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_m = 0;
  PyObject *__pyx_v_n = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,&__pyx_n_s_n,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1539, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1539, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_m = values[0];
    __pyx_v_n = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1539, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.matrix.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_6matrix___init__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), __pyx_v_m, __pyx_v_n);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_6matrix___init__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_m, PyObject *__pyx_v_n) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":1540
 * 
 *     def __init__(self, m: int, n: int):
 *         self.c_matrix = CGL_matrix_create(m, n)             # <<<<<<<<<<<<<<
 *         self.m = m
 *         self.n = n
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_m); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1540, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_n); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1540, __pyx_L1_error)
  __pyx_v_self->c_matrix = CGL_matrix_create(__pyx_t_1, __pyx_t_2);

  /* "cgl_wrapper.pyx":1541
 *     def __init__(self, m: int, n: int):
 *         self.c_matrix = CGL_matrix_create(m, n)
 *         self.m = m             # <<<<<<<<<<<<<<
 *         self.n = n
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_m); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1541, __pyx_L1_error)
  __pyx_v_self->m = __pyx_t_3;

  /* "cgl_wrapper.pyx":1542
 *         self.c_matrix = CGL_matrix_create(m, n)
 *         self.m = m
 *         self.n = n             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_n); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L1_error)
  __pyx_v_self->n = __pyx_t_3;

  /* "cgl_wrapper.pyx":1539
 *         return self.calc_adjugate()
 * 
 *     def __init__(self, m: int, n: int):             # <<<<<<<<<<<<<<
 *         self.c_matrix = CGL_matrix_create(m, n)
 *         self.m = m
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.matrix.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1544
 *         self.n = n
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         CGL_matrix_destroy(self.c_matrix)
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_6matrix_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_6matrix_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_6matrix_2__dealloc__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_6matrix_2__dealloc__(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":1545
 * 
 *     def __dealloc__(self):
 *         CGL_matrix_destroy(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def load_array(self, array: list, m: int, n: int):
 */
  CGL_matrix_destroy(__pyx_v_self->c_matrix);

  /* "cgl_wrapper.pyx":1544
 *         self.n = n
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         CGL_matrix_destroy(self.c_matrix)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":1547
 *         CGL_matrix_destroy(self.c_matrix)
 * 
 *     def load_array(self, array: list, m: int, n: int):             # <<<<<<<<<<<<<<
 *         CGL_matrix_destroy(self.c_matrix)
 *         cdef float* array_ptr = <float*> stdlib.malloc(m * n * sizeof(float))
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_5load_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_5load_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_array = 0;
  PyObject *__pyx_v_m = 0;
  PyObject *__pyx_v_n = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_array (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_array,&__pyx_n_s_m,&__pyx_n_s_n,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_array)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("load_array", 1, 3, 3, 1); __PYX_ERR(0, 1547, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("load_array", 1, 3, 3, 2); __PYX_ERR(0, 1547, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load_array") < 0)) __PYX_ERR(0, 1547, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_array = ((PyObject*)values[0]);
    __pyx_v_m = values[1];
    __pyx_v_n = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load_array", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1547, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.matrix.load_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_array), (&PyList_Type), 1, "array", 1))) __PYX_ERR(0, 1547, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6matrix_4load_array(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), __pyx_v_array, __pyx_v_m, __pyx_v_n);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_4load_array(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_array, PyObject *__pyx_v_m, PyObject *__pyx_v_n) {
  float *__pyx_v_array_ptr;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  float __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  CGL_int __pyx_t_9;
  CGL_int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_array", 0);

  /* "cgl_wrapper.pyx":1548
 * 
 *     def load_array(self, array: list, m: int, n: int):
 *         CGL_matrix_destroy(self.c_matrix)             # <<<<<<<<<<<<<<
 *         cdef float* array_ptr = <float*> stdlib.malloc(m * n * sizeof(float))
 *         for i in range(m * n):
 */
  CGL_matrix_destroy(__pyx_v_self->c_matrix);

  /* "cgl_wrapper.pyx":1549
 *     def load_array(self, array: list, m: int, n: int):
 *         CGL_matrix_destroy(self.c_matrix)
 *         cdef float* array_ptr = <float*> stdlib.malloc(m * n * sizeof(float))             # <<<<<<<<<<<<<<
 *         for i in range(m * n):
 *             array_ptr[i] = array[i]
 */
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_m, __pyx_v_n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_FromSize_t((sizeof(float))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_t_3); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1549, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_array_ptr = ((float *)malloc(__pyx_t_4));

  /* "cgl_wrapper.pyx":1550
 *         CGL_matrix_destroy(self.c_matrix)
 *         cdef float* array_ptr = <float*> stdlib.malloc(m * n * sizeof(float))
 *         for i in range(m * n):             # <<<<<<<<<<<<<<
 *             array_ptr[i] = array[i]
 *         self.c_matrix = CGL_matrix_create_from_array(array_ptr, m, n)
 */
  __pyx_t_3 = PyNumber_Multiply(__pyx_v_m, __pyx_v_n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1550, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_3))) {
        if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1550, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1550, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_6(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1550, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":1551
 *         cdef float* array_ptr = <float*> stdlib.malloc(m * n * sizeof(float))
 *         for i in range(m * n):
 *             array_ptr[i] = array[i]             # <<<<<<<<<<<<<<
 *         self.c_matrix = CGL_matrix_create_from_array(array_ptr, m, n)
 *         stdlib.free(array_ptr)
 */
    if (unlikely(__pyx_v_array == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1551, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_array, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1551, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1551, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1551, __pyx_L1_error)
    (__pyx_v_array_ptr[__pyx_t_8]) = __pyx_t_7;

    /* "cgl_wrapper.pyx":1550
 *         CGL_matrix_destroy(self.c_matrix)
 *         cdef float* array_ptr = <float*> stdlib.malloc(m * n * sizeof(float))
 *         for i in range(m * n):             # <<<<<<<<<<<<<<
 *             array_ptr[i] = array[i]
 *         self.c_matrix = CGL_matrix_create_from_array(array_ptr, m, n)
 */
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1552
 *         for i in range(m * n):
 *             array_ptr[i] = array[i]
 *         self.c_matrix = CGL_matrix_create_from_array(array_ptr, m, n)             # <<<<<<<<<<<<<<
 *         stdlib.free(array_ptr)
 * 
 */
  __pyx_t_9 = __Pyx_PyInt_As_CGL_int(__pyx_v_m); if (unlikely((__pyx_t_9 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1552, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyInt_As_CGL_int(__pyx_v_n); if (unlikely((__pyx_t_10 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1552, __pyx_L1_error)
  __pyx_v_self->c_matrix = CGL_matrix_create_from_array(__pyx_v_array_ptr, __pyx_t_9, __pyx_t_10);

  /* "cgl_wrapper.pyx":1553
 *             array_ptr[i] = array[i]
 *         self.c_matrix = CGL_matrix_create_from_array(array_ptr, m, n)
 *         stdlib.free(array_ptr)             # <<<<<<<<<<<<<<
 * 
 *     def __add__(self: matrix, other: matrix):
 */
  free(__pyx_v_array_ptr);

  /* "cgl_wrapper.pyx":1547
 *         CGL_matrix_destroy(self.c_matrix)
 * 
 *     def load_array(self, array: list, m: int, n: int):             # <<<<<<<<<<<<<<
 *         CGL_matrix_destroy(self.c_matrix)
 *         cdef float* array_ptr = <float*> stdlib.malloc(m * n * sizeof(float))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.load_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1555
 *         stdlib.free(array_ptr)
 * 
 *     def __add__(self: matrix, other: matrix):             # <<<<<<<<<<<<<<
 *         if self.size != other.size:
 *             raise ValueError("Matrices must have the same size")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_7__add__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_3cgl_matrix, 1, "self", 0))) __PYX_ERR(0, 1555, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_matrix, 1, "other", 0))) __PYX_ERR(0, 1555, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6matrix_6__add__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((struct __pyx_obj_3cgl_matrix *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_6__add__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, struct __pyx_obj_3cgl_matrix *__pyx_v_other) {
  struct __pyx_obj_3cgl_matrix *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__add__", 0);

  /* "cgl_wrapper.pyx":1556
 * 
 *     def __add__(self: matrix, other: matrix):
 *         if self.size != other.size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, self.n)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "cgl_wrapper.pyx":1557
 *     def __add__(self: matrix, other: matrix):
 *         if self.size != other.size:
 *             raise ValueError("Matrices must have the same size")             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_add_to(self.c_matrix, other.c_matrix, result.c_matrix)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1557, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1556
 * 
 *     def __add__(self: matrix, other: matrix):
 *         if self.size != other.size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, self.n)
 */
  }

  /* "cgl_wrapper.pyx":1558
 *         if self.size != other.size:
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, self.n)             # <<<<<<<<<<<<<<
 *         CGL_matrix_add_to(self.c_matrix, other.c_matrix, result.c_matrix)
 *         return result
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_matrix), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_result = ((struct __pyx_obj_3cgl_matrix *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1559
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_add_to(self.c_matrix, other.c_matrix, result.c_matrix)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  (void)(CGL_matrix_add_to(__pyx_v_self->c_matrix, __pyx_v_other->c_matrix, __pyx_v_result->c_matrix));

  /* "cgl_wrapper.pyx":1560
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_add_to(self.c_matrix, other.c_matrix, result.c_matrix)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __sub__(self: matrix, other: matrix):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1555
 *         stdlib.free(array_ptr)
 * 
 *     def __add__(self: matrix, other: matrix):             # <<<<<<<<<<<<<<
 *         if self.size != other.size:
 *             raise ValueError("Matrices must have the same size")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1562
 *         return result
 * 
 *     def __sub__(self: matrix, other: matrix):             # <<<<<<<<<<<<<<
 *         if self.size != other.size:
 *             raise ValueError("Matrices must have the same size")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_9__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_9__sub__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_3cgl_matrix, 1, "self", 0))) __PYX_ERR(0, 1562, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_matrix, 1, "other", 0))) __PYX_ERR(0, 1562, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6matrix_8__sub__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((struct __pyx_obj_3cgl_matrix *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_8__sub__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, struct __pyx_obj_3cgl_matrix *__pyx_v_other) {
  struct __pyx_obj_3cgl_matrix *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__sub__", 0);

  /* "cgl_wrapper.pyx":1563
 * 
 *     def __sub__(self: matrix, other: matrix):
 *         if self.size != other.size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, self.n)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_other), __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1563, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1563, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_t_4)) {

    /* "cgl_wrapper.pyx":1564
 *     def __sub__(self: matrix, other: matrix):
 *         if self.size != other.size:
 *             raise ValueError("Matrices must have the same size")             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_sub_to(self.c_matrix, other.c_matrix, result.c_matrix)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1564, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1563
 * 
 *     def __sub__(self: matrix, other: matrix):
 *         if self.size != other.size:             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, self.n)
 */
  }

  /* "cgl_wrapper.pyx":1565
 *         if self.size != other.size:
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, self.n)             # <<<<<<<<<<<<<<
 *         CGL_matrix_sub_to(self.c_matrix, other.c_matrix, result.c_matrix)
 *         return result
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_matrix), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_result = ((struct __pyx_obj_3cgl_matrix *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1566
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_sub_to(self.c_matrix, other.c_matrix, result.c_matrix)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  (void)(CGL_matrix_sub_to(__pyx_v_self->c_matrix, __pyx_v_other->c_matrix, __pyx_v_result->c_matrix));

  /* "cgl_wrapper.pyx":1567
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_sub_to(self.c_matrix, other.c_matrix, result.c_matrix)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __mul__(self: matrix, other: matrix):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1562
 *         return result
 * 
 *     def __sub__(self: matrix, other: matrix):             # <<<<<<<<<<<<<<
 *         if self.size != other.size:
 *             raise ValueError("Matrices must have the same size")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1569
 *         return result
 * 
 *     def __mul__(self: matrix, other: matrix):             # <<<<<<<<<<<<<<
 *         if self.n != other.m:
 *             raise ValueError("Matrices must have the same size")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_11__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_11__mul__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_3cgl_matrix, 1, "self", 0))) __PYX_ERR(0, 1569, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_matrix, 1, "other", 0))) __PYX_ERR(0, 1569, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6matrix_10__mul__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((struct __pyx_obj_3cgl_matrix *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_10__mul__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, struct __pyx_obj_3cgl_matrix *__pyx_v_other) {
  struct __pyx_obj_3cgl_matrix *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__mul__", 0);

  /* "cgl_wrapper.pyx":1570
 * 
 *     def __mul__(self: matrix, other: matrix):
 *         if self.n != other.m:             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, other.n)
 */
  __pyx_t_1 = ((__pyx_v_self->n != __pyx_v_other->m) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":1571
 *     def __mul__(self: matrix, other: matrix):
 *         if self.n != other.m:
 *             raise ValueError("Matrices must have the same size")             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, other.n)
 *         CGL_matrix_mul_to(self.c_matrix, other.c_matrix, result.c_matrix)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1571, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1571, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1570
 * 
 *     def __mul__(self: matrix, other: matrix):
 *         if self.n != other.m:             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, other.n)
 */
  }

  /* "cgl_wrapper.pyx":1572
 *         if self.n != other.m:
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, other.n)             # <<<<<<<<<<<<<<
 *         CGL_matrix_mul_to(self.c_matrix, other.c_matrix, result.c_matrix)
 *         return result
 */
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_other->n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_matrix), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_result = ((struct __pyx_obj_3cgl_matrix *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1573
 *             raise ValueError("Matrices must have the same size")
 *         result = matrix(self.m, other.n)
 *         CGL_matrix_mul_to(self.c_matrix, other.c_matrix, result.c_matrix)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  (void)(CGL_matrix_mul_to(__pyx_v_self->c_matrix, __pyx_v_other->c_matrix, __pyx_v_result->c_matrix));

  /* "cgl_wrapper.pyx":1574
 *         result = matrix(self.m, other.n)
 *         CGL_matrix_mul_to(self.c_matrix, other.c_matrix, result.c_matrix)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def scaled(self: matrix, other: float):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1569
 *         return result
 * 
 *     def __mul__(self: matrix, other: matrix):             # <<<<<<<<<<<<<<
 *         if self.n != other.m:
 *             raise ValueError("Matrices must have the same size")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.matrix.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1576
 *         return result
 * 
 *     def scaled(self: matrix, other: float):             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         for i in range(self.m):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_13scaled(PyObject *__pyx_v_self, PyObject *__pyx_arg_other); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_13scaled(PyObject *__pyx_v_self, PyObject *__pyx_arg_other) {
  double __pyx_v_other;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scaled (wrapper)", 0);
  assert(__pyx_arg_other); {
    __pyx_v_other = __pyx_PyFloat_AsDouble(__pyx_arg_other); if (unlikely((__pyx_v_other == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1576, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.matrix.scaled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_6matrix_12scaled(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((double)__pyx_v_other));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_12scaled(struct __pyx_obj_3cgl_matrix *__pyx_v_self, double __pyx_v_other) {
  struct __pyx_obj_3cgl_matrix *__pyx_v_result = NULL;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("scaled", 0);

  /* "cgl_wrapper.pyx":1577
 * 
 *     def scaled(self: matrix, other: float):
 *         result = matrix(self.m, self.n)             # <<<<<<<<<<<<<<
 *         for i in range(self.m):
 *             for j in range(self.n):
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_matrix), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_obj_3cgl_matrix *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1578
 *     def scaled(self: matrix, other: float):
 *         result = matrix(self.m, self.n)
 *         for i in range(self.m):             # <<<<<<<<<<<<<<
 *             for j in range(self.n):
 *                 result[i, j] = self[i, j] * other
 */
  __pyx_t_4 = __pyx_v_self->m;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "cgl_wrapper.pyx":1579
 *         result = matrix(self.m, self.n)
 *         for i in range(self.m):
 *             for j in range(self.n):             # <<<<<<<<<<<<<<
 *                 result[i, j] = self[i, j] * other
 *         return result
 */
    __pyx_t_7 = __pyx_v_self->n;
    __pyx_t_8 = __pyx_t_7;
    for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) {
      __pyx_v_j = __pyx_t_9;

      /* "cgl_wrapper.pyx":1580
 *         for i in range(self.m):
 *             for j in range(self.n):
 *                 result[i, j] = self[i, j] * other             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
      __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyFloat_FromDouble(__pyx_v_other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_3);
      __pyx_t_1 = 0;
      __pyx_t_3 = 0;
      if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_result), __pyx_t_10, __pyx_t_2) < 0)) __PYX_ERR(0, 1580, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
  }

  /* "cgl_wrapper.pyx":1581
 *             for j in range(self.n):
 *                 result[i, j] = self[i, j] * other
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def scale(self: matrix, other: float):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = ((PyObject *)__pyx_v_result);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1576
 *         return result
 * 
 *     def scaled(self: matrix, other: float):             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         for i in range(self.m):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("cgl.matrix.scaled", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1583
 *         return result
 * 
 *     def scale(self: matrix, other: float):             # <<<<<<<<<<<<<<
 *         CGL_matrix_scale_to(self.c_matrix, other)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_15scale(PyObject *__pyx_v_self, PyObject *__pyx_arg_other); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_15scale(PyObject *__pyx_v_self, PyObject *__pyx_arg_other) {
  double __pyx_v_other;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scale (wrapper)", 0);
  assert(__pyx_arg_other); {
    __pyx_v_other = __pyx_PyFloat_AsDouble(__pyx_arg_other); if (unlikely((__pyx_v_other == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1583, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.matrix.scale", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_6matrix_14scale(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((double)__pyx_v_other));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_14scale(struct __pyx_obj_3cgl_matrix *__pyx_v_self, double __pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scale", 0);

  /* "cgl_wrapper.pyx":1584
 * 
 *     def scale(self: matrix, other: float):
 *         CGL_matrix_scale_to(self.c_matrix, other)             # <<<<<<<<<<<<<<
 * 
 *     def calc_transpose(self: matrix) -> matrix:
 */
  (void)(CGL_matrix_scale_to(__pyx_v_self->c_matrix, __pyx_v_other));

  /* "cgl_wrapper.pyx":1583
 *         return result
 * 
 *     def scale(self: matrix, other: float):             # <<<<<<<<<<<<<<
 *         CGL_matrix_scale_to(self.c_matrix, other)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1586
 *         CGL_matrix_scale_to(self.c_matrix, other)
 * 
 *     def calc_transpose(self: matrix) -> matrix:             # <<<<<<<<<<<<<<
 *         result = matrix(self.n, self.m)
 *         CGL_matrix_transpose_to(self.c_matrix, result.c_matrix)
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_17calc_transpose(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_17calc_transpose(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_matrix *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calc_transpose (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_16calc_transpose(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_16calc_transpose(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  struct __pyx_obj_3cgl_matrix *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_matrix *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calc_transpose", 0);

  /* "cgl_wrapper.pyx":1587
 * 
 *     def calc_transpose(self: matrix) -> matrix:
 *         result = matrix(self.n, self.m)             # <<<<<<<<<<<<<<
 *         CGL_matrix_transpose_to(self.c_matrix, result.c_matrix)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->n); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_matrix), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_obj_3cgl_matrix *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1588
 *     def calc_transpose(self: matrix) -> matrix:
 *         result = matrix(self.n, self.m)
 *         CGL_matrix_transpose_to(self.c_matrix, result.c_matrix)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  (void)(CGL_matrix_transpose_to(__pyx_v_self->c_matrix, __pyx_v_result->c_matrix));

  /* "cgl_wrapper.pyx":1589
 *         result = matrix(self.n, self.m)
 *         CGL_matrix_transpose_to(self.c_matrix, result.c_matrix)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def transpose_inplace(self: matrix):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1586
 *         CGL_matrix_scale_to(self.c_matrix, other)
 * 
 *     def calc_transpose(self: matrix) -> matrix:             # <<<<<<<<<<<<<<
 *         result = matrix(self.n, self.m)
 *         CGL_matrix_transpose_to(self.c_matrix, result.c_matrix)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.calc_transpose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1591
 *         return result
 * 
 *     def transpose_inplace(self: matrix):             # <<<<<<<<<<<<<<
 *         CGL_matrix_transpose_inplace(self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_19transpose_inplace(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_19transpose_inplace(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transpose_inplace (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_18transpose_inplace(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_18transpose_inplace(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transpose_inplace", 0);

  /* "cgl_wrapper.pyx":1592
 * 
 *     def transpose_inplace(self: matrix):
 *         CGL_matrix_transpose_inplace(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def load_identity(self: matrix):
 */
  (void)(CGL_matrix_transpose_inplace(__pyx_v_self->c_matrix));

  /* "cgl_wrapper.pyx":1591
 *         return result
 * 
 *     def transpose_inplace(self: matrix):             # <<<<<<<<<<<<<<
 *         CGL_matrix_transpose_inplace(self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1594
 *         CGL_matrix_transpose_inplace(self.c_matrix)
 * 
 *     def load_identity(self: matrix):             # <<<<<<<<<<<<<<
 *         CGL_matrix_identity_to(self.m, self.n, self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_21load_identity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_21load_identity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_identity (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_20load_identity(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_20load_identity(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_identity", 0);

  /* "cgl_wrapper.pyx":1595
 * 
 *     def load_identity(self: matrix):
 *         CGL_matrix_identity_to(self.m, self.n, self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self: matrix, key: tuple):
 */
  (void)(CGL_matrix_identity_to(__pyx_v_self->m, __pyx_v_self->n, __pyx_v_self->c_matrix));

  /* "cgl_wrapper.pyx":1594
 *         CGL_matrix_transpose_inplace(self.c_matrix)
 * 
 *     def load_identity(self: matrix):             # <<<<<<<<<<<<<<
 *         CGL_matrix_identity_to(self.m, self.n, self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1597
 *         CGL_matrix_identity_to(self.m, self.n, self.c_matrix)
 * 
 *     def __getitem__(self: matrix, key: tuple):             # <<<<<<<<<<<<<<
 *         if len(key) != 2:
 *             raise ValueError("Matrix index must be a tuple of 2 integers")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_23__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_23__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyTuple_Type), 1, "key", 1))) __PYX_ERR(0, 1597, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6matrix_22__getitem__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((PyObject*)__pyx_v_key));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_22__getitem__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  CGL_int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "cgl_wrapper.pyx":1598
 * 
 *     def __getitem__(self: matrix, key: tuple):
 *         if len(key) != 2:             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrix index must be a tuple of 2 integers")
 *         return CGL_matrix_get_elem(self.c_matrix, key[0], key[1])
 */
  if (unlikely(__pyx_v_key == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1598, __pyx_L1_error)
  }
  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_key); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1598, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != 2) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1599
 *     def __getitem__(self: matrix, key: tuple):
 *         if len(key) != 2:
 *             raise ValueError("Matrix index must be a tuple of 2 integers")             # <<<<<<<<<<<<<<
 *         return CGL_matrix_get_elem(self.c_matrix, key[0], key[1])
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1599, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1599, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1598
 * 
 *     def __getitem__(self: matrix, key: tuple):
 *         if len(key) != 2:             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrix index must be a tuple of 2 integers")
 *         return CGL_matrix_get_elem(self.c_matrix, key[0], key[1])
 */
  }

  /* "cgl_wrapper.pyx":1600
 *         if len(key) != 2:
 *             raise ValueError("Matrix index must be a tuple of 2 integers")
 *         return CGL_matrix_get_elem(self.c_matrix, key[0], key[1])             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self: matrix, key: tuple, value: float):
 */
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(__pyx_v_key == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1600, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_key, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_3); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_v_key == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1600, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_key, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_As_CGL_int(__pyx_t_3); if (unlikely((__pyx_t_5 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyFloat_FromDouble(CGL_matrix_get_elem(__pyx_v_self->c_matrix, __pyx_t_4, __pyx_t_5)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1600, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1597
 *         CGL_matrix_identity_to(self.m, self.n, self.c_matrix)
 * 
 *     def __getitem__(self: matrix, key: tuple):             # <<<<<<<<<<<<<<
 *         if len(key) != 2:
 *             raise ValueError("Matrix index must be a tuple of 2 integers")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1602
 *         return CGL_matrix_get_elem(self.c_matrix, key[0], key[1])
 * 
 *     def __setitem__(self: matrix, key: tuple, value: float):             # <<<<<<<<<<<<<<
 *         if len(key) != 2:
 *             raise ValueError("Matrix index must be a tuple of 2 integers")
 */

/* Python wrapper */
static int __pyx_pw_3cgl_6matrix_25__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_3cgl_6matrix_25__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1602, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.matrix.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_key), (&PyTuple_Type), 1, "key", 1))) __PYX_ERR(0, 1602, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6matrix_24__setitem__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((PyObject*)__pyx_v_key), ((double)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_6matrix_24__setitem__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_key, double __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  CGL_int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "cgl_wrapper.pyx":1603
 * 
 *     def __setitem__(self: matrix, key: tuple, value: float):
 *         if len(key) != 2:             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrix index must be a tuple of 2 integers")
 *         CGL_matrix_set_elem(self.c_matrix, key[0], key[1], value)
 */
  if (unlikely(__pyx_v_key == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1603, __pyx_L1_error)
  }
  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_key); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1603, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != 2) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1604
 *     def __setitem__(self: matrix, key: tuple, value: float):
 *         if len(key) != 2:
 *             raise ValueError("Matrix index must be a tuple of 2 integers")             # <<<<<<<<<<<<<<
 *         CGL_matrix_set_elem(self.c_matrix, key[0], key[1], value)
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1604, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1604, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1603
 * 
 *     def __setitem__(self: matrix, key: tuple, value: float):
 *         if len(key) != 2:             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrix index must be a tuple of 2 integers")
 *         CGL_matrix_set_elem(self.c_matrix, key[0], key[1], value)
 */
  }

  /* "cgl_wrapper.pyx":1605
 *         if len(key) != 2:
 *             raise ValueError("Matrix index must be a tuple of 2 integers")
 *         CGL_matrix_set_elem(self.c_matrix, key[0], key[1], value)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self: matrix):
 */
  if (unlikely(__pyx_v_key == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1605, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_key, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_3); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(__pyx_v_key == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 1605, __pyx_L1_error)
  }
  __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_key, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyInt_As_CGL_int(__pyx_t_3); if (unlikely((__pyx_t_5 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1605, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  (void)(CGL_matrix_set_elem(__pyx_v_self->c_matrix, __pyx_t_4, __pyx_t_5, __pyx_v_value));

  /* "cgl_wrapper.pyx":1602
 *         return CGL_matrix_get_elem(self.c_matrix, key[0], key[1])
 * 
 *     def __setitem__(self: matrix, key: tuple, value: float):             # <<<<<<<<<<<<<<
 *         if len(key) != 2:
 *             raise ValueError("Matrix index must be a tuple of 2 integers")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1607
 *         CGL_matrix_set_elem(self.c_matrix, key[0], key[1], value)
 * 
 *     def __repr__(self: matrix):             # <<<<<<<<<<<<<<
 *         result = "matrix(\n"
 *         for i in range(self.m):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_27__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_27__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_26__repr__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_26__repr__(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":1608
 * 
 *     def __repr__(self: matrix):
 *         result = "matrix(\n"             # <<<<<<<<<<<<<<
 *         for i in range(self.m):
 *             result += "    ["
 */
  __Pyx_INCREF(__pyx_kp_s_matrix);
  __pyx_v_result = __pyx_kp_s_matrix;

  /* "cgl_wrapper.pyx":1609
 *     def __repr__(self: matrix):
 *         result = "matrix(\n"
 *         for i in range(self.m):             # <<<<<<<<<<<<<<
 *             result += "    ["
 *             for j in range(self.n):
 */
  __pyx_t_1 = __pyx_v_self->m;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "cgl_wrapper.pyx":1610
 *         result = "matrix(\n"
 *         for i in range(self.m):
 *             result += "    ["             # <<<<<<<<<<<<<<
 *             for j in range(self.n):
 *                 result += f"{self[i, j]}"
 */
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__22); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1610, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cgl_wrapper.pyx":1611
 *         for i in range(self.m):
 *             result += "    ["
 *             for j in range(self.n):             # <<<<<<<<<<<<<<
 *                 result += f"{self[i, j]}"
 *                 if j != self.n - 1:
 */
    __pyx_t_5 = __pyx_v_self->n;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_j = __pyx_t_7;

      /* "cgl_wrapper.pyx":1612
 *             result += "    ["
 *             for j in range(self.n):
 *                 result += f"{self[i, j]}"             # <<<<<<<<<<<<<<
 *                 if j != self.n - 1:
 *                     result += ", "
 */
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8);
      __pyx_t_4 = 0;
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_result, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1612, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cgl_wrapper.pyx":1613
 *             for j in range(self.n):
 *                 result += f"{self[i, j]}"
 *                 if j != self.n - 1:             # <<<<<<<<<<<<<<
 *                     result += ", "
 *             result += "]\n"
 */
      __pyx_t_10 = ((__pyx_v_j != (__pyx_v_self->n - 1)) != 0);
      if (__pyx_t_10) {

        /* "cgl_wrapper.pyx":1614
 *                 result += f"{self[i, j]}"
 *                 if j != self.n - 1:
 *                     result += ", "             # <<<<<<<<<<<<<<
 *             result += "]\n"
 *         result += ")"
 */
        __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1614, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "cgl_wrapper.pyx":1613
 *             for j in range(self.n):
 *                 result += f"{self[i, j]}"
 *                 if j != self.n - 1:             # <<<<<<<<<<<<<<
 *                     result += ", "
 *             result += "]\n"
 */
      }
    }

    /* "cgl_wrapper.pyx":1615
 *                 if j != self.n - 1:
 *                     result += ", "
 *             result += "]\n"             # <<<<<<<<<<<<<<
 *         result += ")"
 *         return result
 */
    __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__23); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1615, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8);
    __pyx_t_8 = 0;
  }

  /* "cgl_wrapper.pyx":1616
 *                     result += ", "
 *             result += "]\n"
 *         result += ")"             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1616, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8);
  __pyx_t_8 = 0;

  /* "cgl_wrapper.pyx":1617
 *             result += "]\n"
 *         result += ")"
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1607
 *         CGL_matrix_set_elem(self.c_matrix, key[0], key[1], value)
 * 
 *     def __repr__(self: matrix):             # <<<<<<<<<<<<<<
 *         result = "matrix(\n"
 *         for i in range(self.m):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cgl.matrix.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1619
 *         return result
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         result = "matrix(\n"
 *         for i in range(self.m):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_29__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_29__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_28__str__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_28__str__(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":1620
 * 
 *     def __str__(self):
 *         result = "matrix(\n"             # <<<<<<<<<<<<<<
 *         for i in range(self.m):
 *             result += "    ["
 */
  __Pyx_INCREF(__pyx_kp_s_matrix);
  __pyx_v_result = __pyx_kp_s_matrix;

  /* "cgl_wrapper.pyx":1621
 *     def __str__(self):
 *         result = "matrix(\n"
 *         for i in range(self.m):             # <<<<<<<<<<<<<<
 *             result += "    ["
 *             for j in range(self.n):
 */
  __pyx_t_1 = __pyx_v_self->m;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "cgl_wrapper.pyx":1622
 *         result = "matrix(\n"
 *         for i in range(self.m):
 *             result += "    ["             # <<<<<<<<<<<<<<
 *             for j in range(self.n):
 *                 result += f"{self[i, j]}"
 */
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__22); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1622, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "cgl_wrapper.pyx":1623
 *         for i in range(self.m):
 *             result += "    ["
 *             for j in range(self.n):             # <<<<<<<<<<<<<<
 *                 result += f"{self[i, j]}"
 *                 if j != self.n - 1:
 */
    __pyx_t_5 = __pyx_v_self->n;
    __pyx_t_6 = __pyx_t_5;
    for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) {
      __pyx_v_j = __pyx_t_7;

      /* "cgl_wrapper.pyx":1624
 *             result += "    ["
 *             for j in range(self.n):
 *                 result += f"{self[i, j]}"             # <<<<<<<<<<<<<<
 *                 if j != self.n - 1:
 *                     result += ", "
 */
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1624, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1624, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1624, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8);
      __pyx_t_4 = 0;
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1624, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_t_8, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1624, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_result, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1624, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "cgl_wrapper.pyx":1625
 *             for j in range(self.n):
 *                 result += f"{self[i, j]}"
 *                 if j != self.n - 1:             # <<<<<<<<<<<<<<
 *                     result += ", "
 *             result += "]\n"
 */
      __pyx_t_10 = ((__pyx_v_j != (__pyx_v_self->n - 1)) != 0);
      if (__pyx_t_10) {

        /* "cgl_wrapper.pyx":1626
 *                 result += f"{self[i, j]}"
 *                 if j != self.n - 1:
 *                     result += ", "             # <<<<<<<<<<<<<<
 *             result += "]\n"
 *         result += ")"
 */
        __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1626, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "cgl_wrapper.pyx":1625
 *             for j in range(self.n):
 *                 result += f"{self[i, j]}"
 *                 if j != self.n - 1:             # <<<<<<<<<<<<<<
 *                     result += ", "
 *             result += "]\n"
 */
      }
    }

    /* "cgl_wrapper.pyx":1627
 *                 if j != self.n - 1:
 *                     result += ", "
 *             result += "]\n"             # <<<<<<<<<<<<<<
 *         result += ")"
 *         return result
 */
    __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__23); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1627, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8);
    __pyx_t_8 = 0;
  }

  /* "cgl_wrapper.pyx":1628
 *                     result += ", "
 *             result += "]\n"
 *         result += ")"             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_kp_s__4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1628, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_8);
  __pyx_t_8 = 0;

  /* "cgl_wrapper.pyx":1629
 *             result += "]\n"
 *         result += ")"
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def set_row(self: matrix, row: int, values: list):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1619
 *         return result
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         result = "matrix(\n"
 *         for i in range(self.m):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cgl.matrix.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1631
 *         return result
 * 
 *     def set_row(self: matrix, row: int, values: list):             # <<<<<<<<<<<<<<
 *         if len(values) != self.n:
 *             raise ValueError("Values must have the same size as the matrix")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_31set_row(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_31set_row(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_v_values = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_row (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_row", 1, 2, 2, 1); __PYX_ERR(0, 1631, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_row") < 0)) __PYX_ERR(0, 1631, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_row = values[0];
    __pyx_v_values = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_row", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1631, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.matrix.set_row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) __PYX_ERR(0, 1631, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6matrix_30set_row(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), __pyx_v_row, __pyx_v_values);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_30set_row(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_values) {
  float *__pyx_v_values_ptr;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  float __pyx_t_7;
  CGL_int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_row", 0);

  /* "cgl_wrapper.pyx":1632
 * 
 *     def set_row(self: matrix, row: int, values: list):
 *         if len(values) != self.n:             # <<<<<<<<<<<<<<
 *             raise ValueError("Values must have the same size as the matrix")
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))
 */
  if (unlikely(__pyx_v_values == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1632, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1632, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != __pyx_v_self->n) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1633
 *     def set_row(self: matrix, row: int, values: list):
 *         if len(values) != self.n:
 *             raise ValueError("Values must have the same size as the matrix")             # <<<<<<<<<<<<<<
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))
 *         for i in range(self.n):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1633, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1633, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1632
 * 
 *     def set_row(self: matrix, row: int, values: list):
 *         if len(values) != self.n:             # <<<<<<<<<<<<<<
 *             raise ValueError("Values must have the same size as the matrix")
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))
 */
  }

  /* "cgl_wrapper.pyx":1634
 *         if len(values) != self.n:
 *             raise ValueError("Values must have the same size as the matrix")
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))             # <<<<<<<<<<<<<<
 *         for i in range(self.n):
 *             values_ptr[i] = values[i]
 */
  __pyx_v_values_ptr = ((float *)malloc((__pyx_v_self->n * (sizeof(float)))));

  /* "cgl_wrapper.pyx":1635
 *             raise ValueError("Values must have the same size as the matrix")
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))
 *         for i in range(self.n):             # <<<<<<<<<<<<<<
 *             values_ptr[i] = values[i]
 *         CGL_matrix_set_row(self.c_matrix, row, values_ptr)
 */
  __pyx_t_4 = __pyx_v_self->n;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "cgl_wrapper.pyx":1636
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))
 *         for i in range(self.n):
 *             values_ptr[i] = values[i]             # <<<<<<<<<<<<<<
 *         CGL_matrix_set_row(self.c_matrix, row, values_ptr)
 *         stdlib.free(values_ptr)
 */
    if (unlikely(__pyx_v_values == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1636, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_values, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1636, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1636, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_values_ptr[__pyx_v_i]) = __pyx_t_7;
  }

  /* "cgl_wrapper.pyx":1637
 *         for i in range(self.n):
 *             values_ptr[i] = values[i]
 *         CGL_matrix_set_row(self.c_matrix, row, values_ptr)             # <<<<<<<<<<<<<<
 *         stdlib.free(values_ptr)
 * 
 */
  __pyx_t_8 = __Pyx_PyInt_As_CGL_int(__pyx_v_row); if (unlikely((__pyx_t_8 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1637, __pyx_L1_error)
  (void)(CGL_matrix_set_row(__pyx_v_self->c_matrix, __pyx_t_8, __pyx_v_values_ptr));

  /* "cgl_wrapper.pyx":1638
 *             values_ptr[i] = values[i]
 *         CGL_matrix_set_row(self.c_matrix, row, values_ptr)
 *         stdlib.free(values_ptr)             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self: matrix, other: matrix) -> bool:
 */
  free(__pyx_v_values_ptr);

  /* "cgl_wrapper.pyx":1631
 *         return result
 * 
 *     def set_row(self: matrix, row: int, values: list):             # <<<<<<<<<<<<<<
 *         if len(values) != self.n:
 *             raise ValueError("Values must have the same size as the matrix")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.set_row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1640
 *         stdlib.free(values_ptr)
 * 
 *     def __eq__(self: matrix, other: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_equal(self.c_matrix, other.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_33__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_33__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_3cgl_matrix, 1, "other", 0))) __PYX_ERR(0, 1640, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6matrix_32__eq__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((struct __pyx_obj_3cgl_matrix *)__pyx_v_other));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_32__eq__(struct __pyx_obj_3cgl_matrix *__pyx_v_self, struct __pyx_obj_3cgl_matrix *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "cgl_wrapper.pyx":1641
 * 
 *     def __eq__(self: matrix, other: matrix) -> bool:
 *         return CGL_matrix_is_equal(self.c_matrix, other.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def get_row(self: matrix, row: int) -> list:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_matrix_is_equal(__pyx_v_self->c_matrix, __pyx_v_other->c_matrix)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1640
 *         stdlib.free(values_ptr)
 * 
 *     def __eq__(self: matrix, other: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_equal(self.c_matrix, other.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.matrix.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1643
 *         return CGL_matrix_is_equal(self.c_matrix, other.c_matrix)
 * 
 *     def get_row(self: matrix, row: int) -> list:             # <<<<<<<<<<<<<<
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))
 *         CGL_matrix_get_row(self.c_matrix, row, values_ptr)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_35get_row(PyObject *__pyx_v_self, PyObject *__pyx_v_row); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_35get_row(PyObject *__pyx_v_self, PyObject *__pyx_v_row) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_row (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_34get_row(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((PyObject *)__pyx_v_row));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_34get_row(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_row) {
  float *__pyx_v_values_ptr;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_row", 0);

  /* "cgl_wrapper.pyx":1644
 * 
 *     def get_row(self: matrix, row: int) -> list:
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))             # <<<<<<<<<<<<<<
 *         CGL_matrix_get_row(self.c_matrix, row, values_ptr)
 *         result = []
 */
  __pyx_v_values_ptr = ((float *)malloc((__pyx_v_self->n * (sizeof(float)))));

  /* "cgl_wrapper.pyx":1645
 *     def get_row(self: matrix, row: int) -> list:
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))
 *         CGL_matrix_get_row(self.c_matrix, row, values_ptr)             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range(self.n):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_row); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1645, __pyx_L1_error)
  (void)(CGL_matrix_get_row(__pyx_v_self->c_matrix, __pyx_t_1, __pyx_v_values_ptr));

  /* "cgl_wrapper.pyx":1646
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))
 *         CGL_matrix_get_row(self.c_matrix, row, values_ptr)
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range(self.n):
 *             result.append(values_ptr[i])
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1647
 *         CGL_matrix_get_row(self.c_matrix, row, values_ptr)
 *         result = []
 *         for i in range(self.n):             # <<<<<<<<<<<<<<
 *             result.append(values_ptr[i])
 *         stdlib.free(values_ptr)
 */
  __pyx_t_3 = __pyx_v_self->n;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cgl_wrapper.pyx":1648
 *         result = []
 *         for i in range(self.n):
 *             result.append(values_ptr[i])             # <<<<<<<<<<<<<<
 *         stdlib.free(values_ptr)
 *         return result
 */
    __pyx_t_2 = PyFloat_FromDouble((__pyx_v_values_ptr[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1648, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cgl_wrapper.pyx":1649
 *         for i in range(self.n):
 *             result.append(values_ptr[i])
 *         stdlib.free(values_ptr)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free(__pyx_v_values_ptr);

  /* "cgl_wrapper.pyx":1650
 *             result.append(values_ptr[i])
 *         stdlib.free(values_ptr)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def set_column(self: matrix, column: int, values: list):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1643
 *         return CGL_matrix_is_equal(self.c_matrix, other.c_matrix)
 * 
 *     def get_row(self: matrix, row: int) -> list:             # <<<<<<<<<<<<<<
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))
 *         CGL_matrix_get_row(self.c_matrix, row, values_ptr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.matrix.get_row", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1652
 *         return result
 * 
 *     def set_column(self: matrix, column: int, values: list):             # <<<<<<<<<<<<<<
 *         if len(values) != self.m:
 *             raise ValueError("Values must have the same size as the matrix")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_37set_column(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_37set_column(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_column = 0;
  PyObject *__pyx_v_values = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_column (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_column,&__pyx_n_s_values,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_column)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_column", 1, 2, 2, 1); __PYX_ERR(0, 1652, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_column") < 0)) __PYX_ERR(0, 1652, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_column = values[0];
    __pyx_v_values = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_column", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1652, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.matrix.set_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_values), (&PyList_Type), 1, "values", 1))) __PYX_ERR(0, 1652, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6matrix_36set_column(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), __pyx_v_column, __pyx_v_values);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_36set_column(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_column, PyObject *__pyx_v_values) {
  float *__pyx_v_values_ptr;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  float __pyx_t_7;
  CGL_int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_column", 0);

  /* "cgl_wrapper.pyx":1653
 * 
 *     def set_column(self: matrix, column: int, values: list):
 *         if len(values) != self.m:             # <<<<<<<<<<<<<<
 *             raise ValueError("Values must have the same size as the matrix")
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))
 */
  if (unlikely(__pyx_v_values == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 1653, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1653, __pyx_L1_error)
  __pyx_t_2 = ((__pyx_t_1 != __pyx_v_self->m) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":1654
 *     def set_column(self: matrix, column: int, values: list):
 *         if len(values) != self.m:
 *             raise ValueError("Values must have the same size as the matrix")             # <<<<<<<<<<<<<<
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))
 *         for i in range(self.m):
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1654, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 1654, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1653
 * 
 *     def set_column(self: matrix, column: int, values: list):
 *         if len(values) != self.m:             # <<<<<<<<<<<<<<
 *             raise ValueError("Values must have the same size as the matrix")
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))
 */
  }

  /* "cgl_wrapper.pyx":1655
 *         if len(values) != self.m:
 *             raise ValueError("Values must have the same size as the matrix")
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))             # <<<<<<<<<<<<<<
 *         for i in range(self.m):
 *             values_ptr[i] = values[i]
 */
  __pyx_v_values_ptr = ((float *)malloc((__pyx_v_self->m * (sizeof(float)))));

  /* "cgl_wrapper.pyx":1656
 *             raise ValueError("Values must have the same size as the matrix")
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))
 *         for i in range(self.m):             # <<<<<<<<<<<<<<
 *             values_ptr[i] = values[i]
 *         CGL_matrix_set_col(self.c_matrix, column, values_ptr)
 */
  __pyx_t_4 = __pyx_v_self->m;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "cgl_wrapper.pyx":1657
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))
 *         for i in range(self.m):
 *             values_ptr[i] = values[i]             # <<<<<<<<<<<<<<
 *         CGL_matrix_set_col(self.c_matrix, column, values_ptr)
 *         stdlib.free(values_ptr)
 */
    if (unlikely(__pyx_v_values == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1657, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_values, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_values_ptr[__pyx_v_i]) = __pyx_t_7;
  }

  /* "cgl_wrapper.pyx":1658
 *         for i in range(self.m):
 *             values_ptr[i] = values[i]
 *         CGL_matrix_set_col(self.c_matrix, column, values_ptr)             # <<<<<<<<<<<<<<
 *         stdlib.free(values_ptr)
 * 
 */
  __pyx_t_8 = __Pyx_PyInt_As_CGL_int(__pyx_v_column); if (unlikely((__pyx_t_8 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1658, __pyx_L1_error)
  (void)(CGL_matrix_set_col(__pyx_v_self->c_matrix, __pyx_t_8, __pyx_v_values_ptr));

  /* "cgl_wrapper.pyx":1659
 *             values_ptr[i] = values[i]
 *         CGL_matrix_set_col(self.c_matrix, column, values_ptr)
 *         stdlib.free(values_ptr)             # <<<<<<<<<<<<<<
 * 
 *     def get_column(self: matrix, column: int) -> list:
 */
  free(__pyx_v_values_ptr);

  /* "cgl_wrapper.pyx":1652
 *         return result
 * 
 *     def set_column(self: matrix, column: int, values: list):             # <<<<<<<<<<<<<<
 *         if len(values) != self.m:
 *             raise ValueError("Values must have the same size as the matrix")
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.set_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1661
 *         stdlib.free(values_ptr)
 * 
 *     def get_column(self: matrix, column: int) -> list:             # <<<<<<<<<<<<<<
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))
 *         CGL_matrix_get_col(self.c_matrix, column, values_ptr)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_39get_column(PyObject *__pyx_v_self, PyObject *__pyx_v_column); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_39get_column(PyObject *__pyx_v_self, PyObject *__pyx_v_column) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_column (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_38get_column(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((PyObject *)__pyx_v_column));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_38get_column(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_column) {
  float *__pyx_v_values_ptr;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_column", 0);

  /* "cgl_wrapper.pyx":1662
 * 
 *     def get_column(self: matrix, column: int) -> list:
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))             # <<<<<<<<<<<<<<
 *         CGL_matrix_get_col(self.c_matrix, column, values_ptr)
 *         result = []
 */
  __pyx_v_values_ptr = ((float *)malloc((__pyx_v_self->m * (sizeof(float)))));

  /* "cgl_wrapper.pyx":1663
 *     def get_column(self: matrix, column: int) -> list:
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))
 *         CGL_matrix_get_col(self.c_matrix, column, values_ptr)             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range(self.m):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_column); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1663, __pyx_L1_error)
  (void)(CGL_matrix_get_col(__pyx_v_self->c_matrix, __pyx_t_1, __pyx_v_values_ptr));

  /* "cgl_wrapper.pyx":1664
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))
 *         CGL_matrix_get_col(self.c_matrix, column, values_ptr)
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range(self.m):
 *             result.append(values_ptr[i])
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1664, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1665
 *         CGL_matrix_get_col(self.c_matrix, column, values_ptr)
 *         result = []
 *         for i in range(self.m):             # <<<<<<<<<<<<<<
 *             result.append(values_ptr[i])
 *         stdlib.free(values_ptr)
 */
  __pyx_t_3 = __pyx_v_self->m;
  __pyx_t_4 = __pyx_t_3;
  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_i = __pyx_t_5;

    /* "cgl_wrapper.pyx":1666
 *         result = []
 *         for i in range(self.m):
 *             result.append(values_ptr[i])             # <<<<<<<<<<<<<<
 *         stdlib.free(values_ptr)
 *         return result
 */
    __pyx_t_2 = PyFloat_FromDouble((__pyx_v_values_ptr[__pyx_v_i])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1666, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1666, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }

  /* "cgl_wrapper.pyx":1667
 *         for i in range(self.m):
 *             result.append(values_ptr[i])
 *         stdlib.free(values_ptr)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free(__pyx_v_values_ptr);

  /* "cgl_wrapper.pyx":1668
 *             result.append(values_ptr[i])
 *         stdlib.free(values_ptr)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def is_square(self: matrix) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1661
 *         stdlib.free(values_ptr)
 * 
 *     def get_column(self: matrix, column: int) -> list:             # <<<<<<<<<<<<<<
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.m * sizeof(float))
 *         CGL_matrix_get_col(self.c_matrix, column, values_ptr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.matrix.get_column", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1670
 *         return result
 * 
 *     def is_square(self: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_square(self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_41is_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_41is_square(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_square (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_40is_square(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_40is_square(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_square", 0);

  /* "cgl_wrapper.pyx":1671
 * 
 *     def is_square(self: matrix) -> bool:
 *         return CGL_matrix_is_square(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def is_symmetric(self: matrix) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_matrix_is_square(__pyx_v_self->c_matrix)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1670
 *         return result
 * 
 *     def is_square(self: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_square(self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.matrix.is_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1673
 *         return CGL_matrix_is_square(self.c_matrix)
 * 
 *     def is_symmetric(self: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_symmetric(self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_43is_symmetric(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_43is_symmetric(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_symmetric (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_42is_symmetric(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_42is_symmetric(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_symmetric", 0);

  /* "cgl_wrapper.pyx":1674
 * 
 *     def is_symmetric(self: matrix) -> bool:
 *         return CGL_matrix_is_symmetric(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def is_ortho(self: matrix) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_matrix_is_symmetric(__pyx_v_self->c_matrix)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1673
 *         return CGL_matrix_is_square(self.c_matrix)
 * 
 *     def is_symmetric(self: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_symmetric(self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.matrix.is_symmetric", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1676
 *         return CGL_matrix_is_symmetric(self.c_matrix)
 * 
 *     def is_ortho(self: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_orthogonal(self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_45is_ortho(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_45is_ortho(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_ortho (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_44is_ortho(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_44is_ortho(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_ortho", 0);

  /* "cgl_wrapper.pyx":1677
 * 
 *     def is_ortho(self: matrix) -> bool:
 *         return CGL_matrix_is_orthogonal(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def is_identity(self: matrix) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_matrix_is_orthogonal(__pyx_v_self->c_matrix)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1676
 *         return CGL_matrix_is_symmetric(self.c_matrix)
 * 
 *     def is_ortho(self: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_orthogonal(self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.matrix.is_ortho", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1679
 *         return CGL_matrix_is_orthogonal(self.c_matrix)
 * 
 *     def is_identity(self: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_identity(self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_47is_identity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_47is_identity(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_identity (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_46is_identity(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_46is_identity(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_identity", 0);

  /* "cgl_wrapper.pyx":1680
 * 
 *     def is_identity(self: matrix) -> bool:
 *         return CGL_matrix_is_identity(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def is_zero(self: matrix) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_matrix_is_identity(__pyx_v_self->c_matrix)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1679
 *         return CGL_matrix_is_orthogonal(self.c_matrix)
 * 
 *     def is_identity(self: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_identity(self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.matrix.is_identity", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1682
 *         return CGL_matrix_is_identity(self.c_matrix)
 * 
 *     def is_zero(self: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_zero(self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_49is_zero(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_49is_zero(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_zero (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_48is_zero(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_48is_zero(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_zero", 0);

  /* "cgl_wrapper.pyx":1683
 * 
 *     def is_zero(self: matrix) -> bool:
 *         return CGL_matrix_is_zero(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def calc_inverse(self: matrix) -> matrix:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_matrix_is_zero(__pyx_v_self->c_matrix)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1682
 *         return CGL_matrix_is_identity(self.c_matrix)
 * 
 *     def is_zero(self: matrix) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_matrix_is_zero(self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.matrix.is_zero", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1685
 *         return CGL_matrix_is_zero(self.c_matrix)
 * 
 *     def calc_inverse(self: matrix) -> matrix:             # <<<<<<<<<<<<<<
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_51calc_inverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_51calc_inverse(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_matrix *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calc_inverse (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_50calc_inverse(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_50calc_inverse(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  struct __pyx_obj_3cgl_matrix *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_matrix *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calc_inverse", 0);

  /* "cgl_wrapper.pyx":1686
 * 
 *     def calc_inverse(self: matrix) -> matrix:
 *         if not self.is_square():             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_square); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "cgl_wrapper.pyx":1687
 *     def calc_inverse(self: matrix) -> matrix:
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_inverse_to(self.c_matrix, result.c_matrix)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1687, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1687, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1686
 * 
 *     def calc_inverse(self: matrix) -> matrix:
 *         if not self.is_square():             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)
 */
  }

  /* "cgl_wrapper.pyx":1688
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)             # <<<<<<<<<<<<<<
 *         CGL_matrix_inverse_to(self.c_matrix, result.c_matrix)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_matrix), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_obj_3cgl_matrix *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1689
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_inverse_to(self.c_matrix, result.c_matrix)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  (void)(CGL_matrix_inverse_to(__pyx_v_self->c_matrix, __pyx_v_result->c_matrix));

  /* "cgl_wrapper.pyx":1690
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_inverse_to(self.c_matrix, result.c_matrix)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def clone(self: matrix) -> matrix:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1685
 *         return CGL_matrix_is_zero(self.c_matrix)
 * 
 *     def calc_inverse(self: matrix) -> matrix:             # <<<<<<<<<<<<<<
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.calc_inverse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1692
 *         return result
 * 
 *     def clone(self: matrix) -> matrix:             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_copy_to(self.c_matrix, result.c_matrix)
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_53clone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_53clone(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_matrix *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clone (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_52clone(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_52clone(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  struct __pyx_obj_3cgl_matrix *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_matrix *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clone", 0);

  /* "cgl_wrapper.pyx":1693
 * 
 *     def clone(self: matrix) -> matrix:
 *         result = matrix(self.m, self.n)             # <<<<<<<<<<<<<<
 *         CGL_matrix_copy_to(self.c_matrix, result.c_matrix)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_matrix), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_obj_3cgl_matrix *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1694
 *     def clone(self: matrix) -> matrix:
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_copy_to(self.c_matrix, result.c_matrix)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  (void)(CGL_matrix_copy_to(__pyx_v_self->c_matrix, __pyx_v_result->c_matrix));

  /* "cgl_wrapper.pyx":1695
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_copy_to(self.c_matrix, result.c_matrix)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def print_mat(self: matrix):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1692
 *         return result
 * 
 *     def clone(self: matrix) -> matrix:             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_copy_to(self.c_matrix, result.c_matrix)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1697
 *         return result
 * 
 *     def print_mat(self: matrix):             # <<<<<<<<<<<<<<
 *         CGL_matrix_print(self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_55print_mat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_55print_mat(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_mat (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_54print_mat(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_54print_mat(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("print_mat", 0);

  /* "cgl_wrapper.pyx":1698
 * 
 *     def print_mat(self: matrix):
 *         CGL_matrix_print(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def gaus_jordan(self: matrix) -> matrix:
 */
  (void)(CGL_matrix_print(__pyx_v_self->c_matrix));

  /* "cgl_wrapper.pyx":1697
 *         return result
 * 
 *     def print_mat(self: matrix):             # <<<<<<<<<<<<<<
 *         CGL_matrix_print(self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1700
 *         CGL_matrix_print(self.c_matrix)
 * 
 *     def gaus_jordan(self: matrix) -> matrix:             # <<<<<<<<<<<<<<
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_57gaus_jordan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_57gaus_jordan(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_matrix *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gaus_jordan (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_56gaus_jordan(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_56gaus_jordan(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  struct __pyx_obj_3cgl_matrix *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_matrix *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gaus_jordan", 0);

  /* "cgl_wrapper.pyx":1701
 * 
 *     def gaus_jordan(self: matrix) -> matrix:
 *         if not self.is_square():             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_square); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1701, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "cgl_wrapper.pyx":1702
 *     def gaus_jordan(self: matrix) -> matrix:
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_gauss_jordan_to(self.c_matrix, result.c_matrix)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1702, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1702, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1701
 * 
 *     def gaus_jordan(self: matrix) -> matrix:
 *         if not self.is_square():             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)
 */
  }

  /* "cgl_wrapper.pyx":1703
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)             # <<<<<<<<<<<<<<
 *         CGL_matrix_gauss_jordan_to(self.c_matrix, result.c_matrix)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_matrix), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1703, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_obj_3cgl_matrix *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1704
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_gauss_jordan_to(self.c_matrix, result.c_matrix)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  (void)(CGL_matrix_gauss_jordan_to(__pyx_v_self->c_matrix, __pyx_v_result->c_matrix));

  /* "cgl_wrapper.pyx":1705
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_gauss_jordan_to(self.c_matrix, result.c_matrix)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def submatrix(self: matrix, row: int, column: int, m: int, n: int) -> matrix:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1700
 *         CGL_matrix_print(self.c_matrix)
 * 
 *     def gaus_jordan(self: matrix) -> matrix:             # <<<<<<<<<<<<<<
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.gaus_jordan", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1707
 *         return result
 * 
 *     def submatrix(self: matrix, row: int, column: int, m: int, n: int) -> matrix:             # <<<<<<<<<<<<<<
 *         if row + m > self.m or column + n > self.n:
 *             raise ValueError("Submatrix must be inside the matrix")
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_59submatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_59submatrix(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_row = 0;
  PyObject *__pyx_v_column = 0;
  PyObject *__pyx_v_m = 0;
  PyObject *__pyx_v_n = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_matrix *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("submatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_row,&__pyx_n_s_column,&__pyx_n_s_m,&__pyx_n_s_n,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_row)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_column)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("submatrix", 1, 4, 4, 1); __PYX_ERR(0, 1707, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("submatrix", 1, 4, 4, 2); __PYX_ERR(0, 1707, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_n)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("submatrix", 1, 4, 4, 3); __PYX_ERR(0, 1707, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "submatrix") < 0)) __PYX_ERR(0, 1707, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_row = values[0];
    __pyx_v_column = values[1];
    __pyx_v_m = values[2];
    __pyx_v_n = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("submatrix", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1707, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.matrix.submatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_6matrix_58submatrix(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), __pyx_v_row, __pyx_v_column, __pyx_v_m, __pyx_v_n);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_58submatrix(struct __pyx_obj_3cgl_matrix *__pyx_v_self, PyObject *__pyx_v_row, PyObject *__pyx_v_column, PyObject *__pyx_v_m, PyObject *__pyx_v_n) {
  struct __pyx_obj_3cgl_matrix *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_matrix *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  CGL_int __pyx_t_6;
  CGL_int __pyx_t_7;
  CGL_int __pyx_t_8;
  CGL_int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("submatrix", 0);

  /* "cgl_wrapper.pyx":1708
 * 
 *     def submatrix(self: matrix, row: int, column: int, m: int, n: int) -> matrix:
 *         if row + m > self.m or column + n > self.n:             # <<<<<<<<<<<<<<
 *             raise ValueError("Submatrix must be inside the matrix")
 *         result = matrix(m, n)
 */
  __pyx_t_2 = PyNumber_Add(__pyx_v_row, __pyx_v_m); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!__pyx_t_5) {
  } else {
    __pyx_t_1 = __pyx_t_5;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_4 = PyNumber_Add(__pyx_v_column, __pyx_v_n); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->n); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_1 = __pyx_t_5;
  __pyx_L4_bool_binop_done:;
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":1709
 *     def submatrix(self: matrix, row: int, column: int, m: int, n: int) -> matrix:
 *         if row + m > self.m or column + n > self.n:
 *             raise ValueError("Submatrix must be inside the matrix")             # <<<<<<<<<<<<<<
 *         result = matrix(m, n)
 *         CGL_matrix_submatrix_to(self.c_matrix, row, column, m, n, result.c_matrix)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 1709, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1708
 * 
 *     def submatrix(self: matrix, row: int, column: int, m: int, n: int) -> matrix:
 *         if row + m > self.m or column + n > self.n:             # <<<<<<<<<<<<<<
 *             raise ValueError("Submatrix must be inside the matrix")
 *         result = matrix(m, n)
 */
  }

  /* "cgl_wrapper.pyx":1710
 *         if row + m > self.m or column + n > self.n:
 *             raise ValueError("Submatrix must be inside the matrix")
 *         result = matrix(m, n)             # <<<<<<<<<<<<<<
 *         CGL_matrix_submatrix_to(self.c_matrix, row, column, m, n, result.c_matrix)
 *         return result
 */
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_m);
  __Pyx_GIVEREF(__pyx_v_m);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_m);
  __Pyx_INCREF(__pyx_v_n);
  __Pyx_GIVEREF(__pyx_v_n);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_n);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_matrix), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1710, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_result = ((struct __pyx_obj_3cgl_matrix *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1711
 *             raise ValueError("Submatrix must be inside the matrix")
 *         result = matrix(m, n)
 *         CGL_matrix_submatrix_to(self.c_matrix, row, column, m, n, result.c_matrix)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_As_CGL_int(__pyx_v_row); if (unlikely((__pyx_t_6 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1711, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyInt_As_CGL_int(__pyx_v_column); if (unlikely((__pyx_t_7 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1711, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyInt_As_CGL_int(__pyx_v_m); if (unlikely((__pyx_t_8 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1711, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyInt_As_CGL_int(__pyx_v_n); if (unlikely((__pyx_t_9 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1711, __pyx_L1_error)
  (void)(CGL_matrix_submatrix_to(__pyx_v_self->c_matrix, __pyx_t_6, __pyx_t_7, __pyx_t_8, __pyx_t_9, __pyx_v_result->c_matrix));

  /* "cgl_wrapper.pyx":1712
 *         result = matrix(m, n)
 *         CGL_matrix_submatrix_to(self.c_matrix, row, column, m, n, result.c_matrix)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def calc_adjugate(self: matrix) -> matrix:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1707
 *         return result
 * 
 *     def submatrix(self: matrix, row: int, column: int, m: int, n: int) -> matrix:             # <<<<<<<<<<<<<<
 *         if row + m > self.m or column + n > self.n:
 *             raise ValueError("Submatrix must be inside the matrix")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.matrix.submatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1714
 *         return result
 * 
 *     def calc_adjugate(self: matrix) -> matrix:             # <<<<<<<<<<<<<<
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_61calc_adjugate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_3cgl_matrix *__pyx_pw_3cgl_6matrix_61calc_adjugate(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_matrix *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calc_adjugate (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_60calc_adjugate(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_matrix *__pyx_pf_3cgl_6matrix_60calc_adjugate(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  struct __pyx_obj_3cgl_matrix *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_matrix *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calc_adjugate", 0);

  /* "cgl_wrapper.pyx":1715
 * 
 *     def calc_adjugate(self: matrix) -> matrix:
 *         if not self.is_square():             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_square); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "cgl_wrapper.pyx":1716
 *     def calc_adjugate(self: matrix) -> matrix:
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_adjugate_to(self.c_matrix, result.c_matrix)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1716, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 1716, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1715
 * 
 *     def calc_adjugate(self: matrix) -> matrix:
 *         if not self.is_square():             # <<<<<<<<<<<<<<
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)
 */
  }

  /* "cgl_wrapper.pyx":1717
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)             # <<<<<<<<<<<<<<
 *         CGL_matrix_adjugate_to(self.c_matrix, result.c_matrix)
 *         return result
 */
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->m); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->n); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_matrix), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_result = ((struct __pyx_obj_3cgl_matrix *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1718
 *             raise ValueError("Matrix must be square")
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_adjugate_to(self.c_matrix, result.c_matrix)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  (void)(CGL_matrix_adjugate_to(__pyx_v_self->c_matrix, __pyx_v_result->c_matrix));

  /* "cgl_wrapper.pyx":1719
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_adjugate_to(self.c_matrix, result.c_matrix)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def make_zero(self: matrix):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1714
 *         return result
 * 
 *     def calc_adjugate(self: matrix) -> matrix:             # <<<<<<<<<<<<<<
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.matrix.calc_adjugate", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1721
 *         return result
 * 
 *     def make_zero(self: matrix):             # <<<<<<<<<<<<<<
 *         CGL_matrix_make_zero(self.c_matrix)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_63make_zero(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_63make_zero(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_zero (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_62make_zero(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_62make_zero(struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_zero", 0);

  /* "cgl_wrapper.pyx":1722
 * 
 *     def make_zero(self: matrix):
 *         CGL_matrix_make_zero(self.c_matrix)             # <<<<<<<<<<<<<<
 * 
 *     def randomize(self: matrix, mian: float, maax: float):
 */
  (void)(CGL_matrix_make_zero(__pyx_v_self->c_matrix));

  /* "cgl_wrapper.pyx":1721
 *         return result
 * 
 *     def make_zero(self: matrix):             # <<<<<<<<<<<<<<
 *         CGL_matrix_make_zero(self.c_matrix)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1724
 *         CGL_matrix_make_zero(self.c_matrix)
 * 
 *     def randomize(self: matrix, mian: float, maax: float):             # <<<<<<<<<<<<<<
 *         for i in range(self.m):
 *             for j in range(self.n):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_65randomize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_65randomize(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_mian;
  double __pyx_v_maax;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("randomize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mian,&__pyx_n_s_maax,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mian)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maax)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("randomize", 1, 2, 2, 1); __PYX_ERR(0, 1724, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "randomize") < 0)) __PYX_ERR(0, 1724, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_mian = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_mian == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1724, __pyx_L3_error)
    __pyx_v_maax = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_maax == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 1724, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("randomize", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1724, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.matrix.randomize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_6matrix_64randomize(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), __pyx_v_mian, __pyx_v_maax);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_64randomize(struct __pyx_obj_3cgl_matrix *__pyx_v_self, double __pyx_v_mian, double __pyx_v_maax) {
  int __pyx_v_i;
  int __pyx_v_j;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("randomize", 0);

  /* "cgl_wrapper.pyx":1725
 * 
 *     def randomize(self: matrix, mian: float, maax: float):
 *         for i in range(self.m):             # <<<<<<<<<<<<<<
 *             for j in range(self.n):
 *                 self[i, j] = random.uniform(mian, maax)
 */
  __pyx_t_1 = __pyx_v_self->m;
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "cgl_wrapper.pyx":1726
 *     def randomize(self: matrix, mian: float, maax: float):
 *         for i in range(self.m):
 *             for j in range(self.n):             # <<<<<<<<<<<<<<
 *                 self[i, j] = random.uniform(mian, maax)
 * 
 */
    __pyx_t_4 = __pyx_v_self->n;
    __pyx_t_5 = __pyx_t_4;
    for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
      __pyx_v_j = __pyx_t_6;

      /* "cgl_wrapper.pyx":1727
 *         for i in range(self.m):
 *             for j in range(self.n):
 *                 self[i, j] = random.uniform(mian, maax)             # <<<<<<<<<<<<<<
 * 
 * KEY_UNKNOWN            = -1
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_random); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_uniform); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = PyFloat_FromDouble(__pyx_v_mian); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_10 = PyFloat_FromDouble(__pyx_v_maax); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_11 = NULL;
      __pyx_t_12 = 0;
      if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_12 = 1;
        }
      }
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_8, __pyx_t_10};
        __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1727, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
        PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_8, __pyx_t_10};
        __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1727, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else
      #endif
      {
        __pyx_t_13 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (__pyx_t_11) {
          __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_11); __pyx_t_11 = NULL;
        }
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_13, 0+__pyx_t_12, __pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_13, 1+__pyx_t_12, __pyx_t_10);
        __pyx_t_8 = 0;
        __pyx_t_10 = 0;
        __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_13, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_j); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1727, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_13);
      PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_13);
      __pyx_t_9 = 0;
      __pyx_t_13 = 0;
      if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_self), __pyx_t_10, __pyx_t_7) < 0)) __PYX_ERR(0, 1727, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
  }

  /* "cgl_wrapper.pyx":1724
 *         CGL_matrix_make_zero(self.c_matrix)
 * 
 *     def randomize(self: matrix, mian: float, maax: float):             # <<<<<<<<<<<<<<
 *         for i in range(self.m):
 *             for j in range(self.n):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("cgl.matrix.randomize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_67__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_67__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_66__reduce_cython__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_66__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_matrix *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.matrix.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6matrix_69__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_6matrix_69__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6matrix_68__setstate_cython__(((struct __pyx_obj_3cgl_matrix *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6matrix_68__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_matrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.matrix.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1868
 * __WINDOW_TABLE = {}
 * 
 * cdef void __pass_through_window_close_callback(CGL_window* window):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.close_callback(window_object)
 */

static void __pyx_f_3cgl___pass_through_window_close_callback(struct CGL_window *__pyx_v_window) {
  PyObject *__pyx_v_window_object = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pass_through_window_close_callback", 0);

  /* "cgl_wrapper.pyx":1869
 * 
 * cdef void __pass_through_window_close_callback(CGL_window* window):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]             # <<<<<<<<<<<<<<
 *     window_object.close_callback(window_object)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_TABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = CGL_utils_super_fast_hash(((void *)__pyx_v_window), (sizeof(struct CGL_window *)));
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_2, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1869, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_window_object = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1870
 * cdef void __pass_through_window_close_callback(CGL_window* window):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.close_callback(window_object)             # <<<<<<<<<<<<<<
 * 
 * cdef void __pass_through_window_key_callback(CGL_window* window, int key, int scancode, int action, int mods):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_window_object, __pyx_n_s_close_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_4, __pyx_v_window_object) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_window_object);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1868
 * __WINDOW_TABLE = {}
 * 
 * cdef void __pass_through_window_close_callback(CGL_window* window):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.close_callback(window_object)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("cgl.__pass_through_window_close_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_window_object);
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":1872
 *     window_object.close_callback(window_object)
 * 
 * cdef void __pass_through_window_key_callback(CGL_window* window, int key, int scancode, int action, int mods):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.key_callback(window_object, key, scancode, action, mods)
 */

static void __pyx_f_3cgl___pass_through_window_key_callback(struct CGL_window *__pyx_v_window, int __pyx_v_key, int __pyx_v_scancode, int __pyx_v_action, int __pyx_v_mods) {
  PyObject *__pyx_v_window_object = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pass_through_window_key_callback", 0);

  /* "cgl_wrapper.pyx":1873
 * 
 * cdef void __pass_through_window_key_callback(CGL_window* window, int key, int scancode, int action, int mods):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]             # <<<<<<<<<<<<<<
 *     window_object.key_callback(window_object, key, scancode, action, mods)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_TABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = CGL_utils_super_fast_hash(((void *)__pyx_v_window), (sizeof(struct CGL_window *)));
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_2, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_window_object = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1874
 * cdef void __pass_through_window_key_callback(CGL_window* window, int key, int scancode, int action, int mods):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.key_callback(window_object, key, scancode, action, mods)             # <<<<<<<<<<<<<<
 * 
 * cdef void __pass_through_window_mouse_button_callback(CGL_window* window, int button, int action, int mods):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_window_object, __pyx_n_s_key_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_scancode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_action); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_mods); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1874, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_9 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_v_window_object, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1874, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_v_window_object, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 5+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1874, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(5+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(__pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_v_window_object);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_9, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_9, __pyx_t_7);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1874, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1872
 *     window_object.close_callback(window_object)
 * 
 * cdef void __pass_through_window_key_callback(CGL_window* window, int key, int scancode, int action, int mods):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.key_callback(window_object, key, scancode, action, mods)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_WriteUnraisable("cgl.__pass_through_window_key_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_window_object);
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":1876
 *     window_object.key_callback(window_object, key, scancode, action, mods)
 * 
 * cdef void __pass_through_window_mouse_button_callback(CGL_window* window, int button, int action, int mods):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.mouse_button_callback(window_object, button, action, mods)
 */

static void __pyx_f_3cgl___pass_through_window_mouse_button_callback(struct CGL_window *__pyx_v_window, int __pyx_v_button, int __pyx_v_action, int __pyx_v_mods) {
  PyObject *__pyx_v_window_object = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pass_through_window_mouse_button_callback", 0);

  /* "cgl_wrapper.pyx":1877
 * 
 * cdef void __pass_through_window_mouse_button_callback(CGL_window* window, int button, int action, int mods):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]             # <<<<<<<<<<<<<<
 *     window_object.mouse_button_callback(window_object, button, action, mods)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_TABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = CGL_utils_super_fast_hash(((void *)__pyx_v_window), (sizeof(struct CGL_window *)));
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_2, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1877, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_window_object = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1878
 * cdef void __pass_through_window_mouse_button_callback(CGL_window* window, int button, int action, int mods):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.mouse_button_callback(window_object, button, action, mods)             # <<<<<<<<<<<<<<
 * 
 * cdef void __pass_through_window_mouse_position_callback(CGL_window* window, double xpos, double ypos):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_window_object, __pyx_n_s_mouse_button_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_button); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_action); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_mods); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1878, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_8 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_window_object, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1878, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_v_window_object, __pyx_t_4, __pyx_t_5, __pyx_t_6};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1878, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  } else
  #endif
  {
    __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (__pyx_t_7) {
      __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
    }
    __Pyx_INCREF(__pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_v_window_object);
    PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_6 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1878, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1876
 *     window_object.key_callback(window_object, key, scancode, action, mods)
 * 
 * cdef void __pass_through_window_mouse_button_callback(CGL_window* window, int button, int action, int mods):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.mouse_button_callback(window_object, button, action, mods)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_WriteUnraisable("cgl.__pass_through_window_mouse_button_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_window_object);
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":1880
 *     window_object.mouse_button_callback(window_object, button, action, mods)
 * 
 * cdef void __pass_through_window_mouse_position_callback(CGL_window* window, double xpos, double ypos):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.mouse_position_callback(window_object, xpos, ypos)
 */

static void __pyx_f_3cgl___pass_through_window_mouse_position_callback(struct CGL_window *__pyx_v_window, double __pyx_v_xpos, double __pyx_v_ypos) {
  PyObject *__pyx_v_window_object = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pass_through_window_mouse_position_callback", 0);

  /* "cgl_wrapper.pyx":1881
 * 
 * cdef void __pass_through_window_mouse_position_callback(CGL_window* window, double xpos, double ypos):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]             # <<<<<<<<<<<<<<
 *     window_object.mouse_position_callback(window_object, xpos, ypos)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_TABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = CGL_utils_super_fast_hash(((void *)__pyx_v_window), (sizeof(struct CGL_window *)));
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_2, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1881, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_window_object = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1882
 * cdef void __pass_through_window_mouse_position_callback(CGL_window* window, double xpos, double ypos):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.mouse_position_callback(window_object, xpos, ypos)             # <<<<<<<<<<<<<<
 * 
 * cdef void __pass_through_window_mouse_scroll_callback(CGL_window* window, double xoffset, double yoffset):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_window_object, __pyx_n_s_mouse_position_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_xpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_ypos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1882, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_window_object, __pyx_t_4, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1882, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_window_object, __pyx_t_4, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1882, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_v_window_object);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1882, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1880
 *     window_object.mouse_button_callback(window_object, button, action, mods)
 * 
 * cdef void __pass_through_window_mouse_position_callback(CGL_window* window, double xpos, double ypos):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.mouse_position_callback(window_object, xpos, ypos)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_WriteUnraisable("cgl.__pass_through_window_mouse_position_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_window_object);
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":1884
 *     window_object.mouse_position_callback(window_object, xpos, ypos)
 * 
 * cdef void __pass_through_window_mouse_scroll_callback(CGL_window* window, double xoffset, double yoffset):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.mouse_scroll_callback(window_object, xoffset, yoffset)
 */

static void __pyx_f_3cgl___pass_through_window_mouse_scroll_callback(struct CGL_window *__pyx_v_window, double __pyx_v_xoffset, double __pyx_v_yoffset) {
  PyObject *__pyx_v_window_object = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pass_through_window_mouse_scroll_callback", 0);

  /* "cgl_wrapper.pyx":1885
 * 
 * cdef void __pass_through_window_mouse_scroll_callback(CGL_window* window, double xoffset, double yoffset):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]             # <<<<<<<<<<<<<<
 *     window_object.mouse_scroll_callback(window_object, xoffset, yoffset)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_TABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = CGL_utils_super_fast_hash(((void *)__pyx_v_window), (sizeof(struct CGL_window *)));
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_2, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_window_object = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1886
 * cdef void __pass_through_window_mouse_scroll_callback(CGL_window* window, double xoffset, double yoffset):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.mouse_scroll_callback(window_object, xoffset, yoffset)             # <<<<<<<<<<<<<<
 * 
 * cdef void __pass_through_window_framebuffer_size_callback(CGL_window* window, int width, int height):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_window_object, __pyx_n_s_mouse_scroll_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_xoffset); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_yoffset); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1886, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_window_object, __pyx_t_4, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1886, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_window_object, __pyx_t_4, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1886, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_v_window_object);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1886, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1884
 *     window_object.mouse_position_callback(window_object, xpos, ypos)
 * 
 * cdef void __pass_through_window_mouse_scroll_callback(CGL_window* window, double xoffset, double yoffset):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.mouse_scroll_callback(window_object, xoffset, yoffset)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_WriteUnraisable("cgl.__pass_through_window_mouse_scroll_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_window_object);
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":1888
 *     window_object.mouse_scroll_callback(window_object, xoffset, yoffset)
 * 
 * cdef void __pass_through_window_framebuffer_size_callback(CGL_window* window, int width, int height):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.framebuffer_size_callback(window_object, width, height)
 */

static void __pyx_f_3cgl___pass_through_window_framebuffer_size_callback(struct CGL_window *__pyx_v_window, int __pyx_v_width, int __pyx_v_height) {
  PyObject *__pyx_v_window_object = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pass_through_window_framebuffer_size_callback", 0);

  /* "cgl_wrapper.pyx":1889
 * 
 * cdef void __pass_through_window_framebuffer_size_callback(CGL_window* window, int width, int height):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]             # <<<<<<<<<<<<<<
 *     window_object.framebuffer_size_callback(window_object, width, height)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_TABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = CGL_utils_super_fast_hash(((void *)__pyx_v_window), (sizeof(struct CGL_window *)));
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_2, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_window_object = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1890
 * cdef void __pass_through_window_framebuffer_size_callback(CGL_window* window, int width, int height):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.framebuffer_size_callback(window_object, width, height)             # <<<<<<<<<<<<<<
 * 
 * cdef void __pass_through_window_drag_n_drop_callback(CGL_window* window, const char** paths, int count):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_window_object, __pyx_n_s_framebuffer_size_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1890, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_7 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_window_object, __pyx_t_4, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_window_object, __pyx_t_4, __pyx_t_5};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  } else
  #endif
  {
    __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(__pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_v_window_object);
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5);
    __pyx_t_4 = 0;
    __pyx_t_5 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1888
 *     window_object.mouse_scroll_callback(window_object, xoffset, yoffset)
 * 
 * cdef void __pass_through_window_framebuffer_size_callback(CGL_window* window, int width, int height):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     window_object.framebuffer_size_callback(window_object, width, height)
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_WriteUnraisable("cgl.__pass_through_window_framebuffer_size_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_window_object);
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":1892
 *     window_object.framebuffer_size_callback(window_object, width, height)
 * 
 * cdef void __pass_through_window_drag_n_drop_callback(CGL_window* window, const char** paths, int count):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     path_list = []
 */

static void __pyx_f_3cgl___pass_through_window_drag_n_drop_callback(struct CGL_window *__pyx_v_window, char const **__pyx_v_paths, int __pyx_v_count) {
  PyObject *__pyx_v_window_object = NULL;
  PyObject *__pyx_v_path_list = NULL;
  int __pyx_v_i;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  uint32_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  char const *__pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pass_through_window_drag_n_drop_callback", 0);

  /* "cgl_wrapper.pyx":1893
 * 
 * cdef void __pass_through_window_drag_n_drop_callback(CGL_window* window, const char** paths, int count):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]             # <<<<<<<<<<<<<<
 *     path_list = []
 *     for i in range(count):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_WINDOW_TABLE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = CGL_utils_super_fast_hash(((void *)__pyx_v_window), (sizeof(struct CGL_window *)));
  __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_2, uint32_t, 0, __Pyx_PyInt_From_uint32_t, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_window_object = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1894
 * cdef void __pass_through_window_drag_n_drop_callback(CGL_window* window, const char** paths, int count):
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     path_list = []             # <<<<<<<<<<<<<<
 *     for i in range(count):
 *         path_list.append(paths[i].decode('utf-8'))
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1894, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_path_list = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1895
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     path_list = []
 *     for i in range(count):             # <<<<<<<<<<<<<<
 *         path_list.append(paths[i].decode('utf-8'))
 *     window_object.drag_n_drop_callback(window_object, path_list)
 */
  __pyx_t_4 = __pyx_v_count;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "cgl_wrapper.pyx":1896
 *     path_list = []
 *     for i in range(count):
 *         path_list.append(paths[i].decode('utf-8'))             # <<<<<<<<<<<<<<
 *     window_object.drag_n_drop_callback(window_object, path_list)
 * 
 */
    __pyx_t_7 = (__pyx_v_paths[__pyx_v_i]);
    __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_7, 0, strlen(__pyx_t_7), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_path_list, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1896, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "cgl_wrapper.pyx":1897
 *     for i in range(count):
 *         path_list.append(paths[i].decode('utf-8'))
 *     window_object.drag_n_drop_callback(window_object, path_list)             # <<<<<<<<<<<<<<
 * 
 * cdef class window:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_window_object, __pyx_n_s_drag_n_drop_callback); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_window_object, __pyx_v_path_list};
    __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1897, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
    PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_window_object, __pyx_v_path_list};
    __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1897, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_GOTREF(__pyx_t_3);
  } else
  #endif
  {
    __pyx_t_10 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (__pyx_t_9) {
      __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
    }
    __Pyx_INCREF(__pyx_v_window_object);
    __Pyx_GIVEREF(__pyx_v_window_object);
    PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_4, __pyx_v_window_object);
    __Pyx_INCREF(__pyx_v_path_list);
    __Pyx_GIVEREF(__pyx_v_path_list);
    PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_4, __pyx_v_path_list);
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1897, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":1892
 *     window_object.framebuffer_size_callback(window_object, width, height)
 * 
 * cdef void __pass_through_window_drag_n_drop_callback(CGL_window* window, const char** paths, int count):             # <<<<<<<<<<<<<<
 *     window_object = __WINDOW_TABLE[CGL_utils_super_fast_hash(<void*>window, sizeof(CGL_window*))]
 *     path_list = []
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_WriteUnraisable("cgl.__pass_through_window_drag_n_drop_callback", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_window_object);
  __Pyx_XDECREF(__pyx_v_path_list);
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":1913
 * 
 *     @property
 *     def close_callback(self):             # <<<<<<<<<<<<<<
 *         return self.close_callback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_14close_callback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_14close_callback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_14close_callback___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_14close_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1914
 *     @property
 *     def close_callback(self):
 *         return self.close_callback             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->close_callback);
  __pyx_r = __pyx_v_self->close_callback;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1913
 * 
 *     @property
 *     def close_callback(self):             # <<<<<<<<<<<<<<
 *         return self.close_callback
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1917
 * 
 *     @property
 *     def key_callback(self):             # <<<<<<<<<<<<<<
 *         return self.key_callback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_12key_callback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_12key_callback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_12key_callback___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_12key_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1918
 *     @property
 *     def key_callback(self):
 *         return self.key_callback             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->key_callback);
  __pyx_r = __pyx_v_self->key_callback;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1917
 * 
 *     @property
 *     def key_callback(self):             # <<<<<<<<<<<<<<
 *         return self.key_callback
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1921
 * 
 *     @property
 *     def mouse_button_callback(self):             # <<<<<<<<<<<<<<
 *         return self.mouse_button_callback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_21mouse_button_callback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_21mouse_button_callback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_21mouse_button_callback___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_21mouse_button_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1922
 *     @property
 *     def mouse_button_callback(self):
 *         return self.mouse_button_callback             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->mouse_button_callback);
  __pyx_r = __pyx_v_self->mouse_button_callback;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1921
 * 
 *     @property
 *     def mouse_button_callback(self):             # <<<<<<<<<<<<<<
 *         return self.mouse_button_callback
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1925
 * 
 *     @property
 *     def mouse_position_callback(self):             # <<<<<<<<<<<<<<
 *         return self.mouse_position_callback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_23mouse_position_callback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_23mouse_position_callback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_23mouse_position_callback___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_23mouse_position_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1926
 *     @property
 *     def mouse_position_callback(self):
 *         return self.mouse_position_callback             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->mouse_position_callback);
  __pyx_r = __pyx_v_self->mouse_position_callback;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1925
 * 
 *     @property
 *     def mouse_position_callback(self):             # <<<<<<<<<<<<<<
 *         return self.mouse_position_callback
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1929
 * 
 *     @property
 *     def mouse_scroll_callback(self):             # <<<<<<<<<<<<<<
 *         return self.mouse_scroll_callback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_21mouse_scroll_callback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_21mouse_scroll_callback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_21mouse_scroll_callback___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_21mouse_scroll_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1930
 *     @property
 *     def mouse_scroll_callback(self):
 *         return self.mouse_scroll_callback             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->mouse_scroll_callback);
  __pyx_r = __pyx_v_self->mouse_scroll_callback;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1929
 * 
 *     @property
 *     def mouse_scroll_callback(self):             # <<<<<<<<<<<<<<
 *         return self.mouse_scroll_callback
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1933
 * 
 *     @property
 *     def framebuffer_size_callback(self):             # <<<<<<<<<<<<<<
 *         return self.framebuffer_size_callback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_25framebuffer_size_callback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_25framebuffer_size_callback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_25framebuffer_size_callback___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_25framebuffer_size_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1934
 *     @property
 *     def framebuffer_size_callback(self):
 *         return self.framebuffer_size_callback             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->framebuffer_size_callback);
  __pyx_r = __pyx_v_self->framebuffer_size_callback;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1933
 * 
 *     @property
 *     def framebuffer_size_callback(self):             # <<<<<<<<<<<<<<
 *         return self.framebuffer_size_callback
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1937
 * 
 *     @property
 *     def drag_n_drop_callback(self):             # <<<<<<<<<<<<<<
 *         return self.drag_n_drop_callback
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_20drag_n_drop_callback_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_20drag_n_drop_callback_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_20drag_n_drop_callback___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_20drag_n_drop_callback___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1938
 *     @property
 *     def drag_n_drop_callback(self):
 *         return self.drag_n_drop_callback             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->drag_n_drop_callback);
  __pyx_r = __pyx_v_self->drag_n_drop_callback;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1937
 * 
 *     @property
 *     def drag_n_drop_callback(self):             # <<<<<<<<<<<<<<
 *         return self.drag_n_drop_callback
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1941
 * 
 *     @property
 *     def width(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.get_size()[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_5width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_5width___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_5width___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1942
 *     @property
 *     def width(self) -> int:
 *         return self.get_size()[0]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1942, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1941
 * 
 *     @property
 *     def width(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.get_size()[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.window.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1945
 * 
 *     @property
 *     def height(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.get_size()[1]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_6height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_6height___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_6height___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1946
 *     @property
 *     def height(self) -> int:
 *         return self.get_size()[1]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1945
 * 
 *     @property
 *     def height(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.get_size()[1]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.window.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1949
 * 
 *     @property
 *     def x(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.get_position()[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_1x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_1x_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_1x___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_1x___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1950
 *     @property
 *     def x(self) -> int:
 *         return self.get_position()[0]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1950, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1949
 * 
 *     @property
 *     def x(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.get_position()[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.window.x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1953
 * 
 *     @property
 *     def y(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.get_position()[1]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_1y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_1y_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_1y___get__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_1y___get__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":1954
 *     @property
 *     def y(self) -> int:
 *         return self.get_position()[1]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1954, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1953
 * 
 *     @property
 *     def y(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.get_position()[1]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.window.y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1957
 * 
 * 
 *     def __init__(self, width: int, height: int, title: str = "CGL Window", decorated: bool = True):             # <<<<<<<<<<<<<<
 *         self.is_decorated = decorated
 *         self.title = title
 */

/* Python wrapper */
static int __pyx_pw_3cgl_6window_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_6window_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  PyObject *__pyx_v_title = 0;
  bool __pyx_v_decorated;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_title,&__pyx_n_s_decorated,0};
    PyObject* values[4] = {0,0,0,0};
    values[2] = ((PyObject*)__pyx_kp_s_CGL_Window);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); __PYX_ERR(0, 1957, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_title);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_decorated);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1957, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_width = values[0];
    __pyx_v_height = values[1];
    __pyx_v_title = ((PyObject*)values[2]);
    if (values[3]) {
      __pyx_v_decorated = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_decorated == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1957, __pyx_L3_error)
    } else {
      __pyx_v_decorated = ((bool)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1957, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.window.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_title), (&PyString_Type), 1, "title", 1))) __PYX_ERR(0, 1957, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6window___init__(((struct __pyx_obj_3cgl_window *)__pyx_v_self), __pyx_v_width, __pyx_v_height, __pyx_v_title, __pyx_v_decorated);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_6window___init__(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_title, bool __pyx_v_decorated) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  CGL_int __pyx_t_2;
  CGL_int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  char const *__pyx_t_5;
  char const *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":1958
 * 
 *     def __init__(self, width: int, height: int, title: str = "CGL Window", decorated: bool = True):
 *         self.is_decorated = decorated             # <<<<<<<<<<<<<<
 *         self.title = title
 *         if decorated:
 */
  __pyx_v_self->is_decorated = __pyx_v_decorated;

  /* "cgl_wrapper.pyx":1959
 *     def __init__(self, width: int, height: int, title: str = "CGL Window", decorated: bool = True):
 *         self.is_decorated = decorated
 *         self.title = title             # <<<<<<<<<<<<<<
 *         if decorated:
 *             self.c_window = CGL_window_create(width, height, title.encode('utf-8'))
 */
  __Pyx_INCREF(__pyx_v_title);
  __Pyx_GIVEREF(__pyx_v_title);
  __Pyx_GOTREF(__pyx_v_self->title);
  __Pyx_DECREF(__pyx_v_self->title);
  __pyx_v_self->title = __pyx_v_title;

  /* "cgl_wrapper.pyx":1960
 *         self.is_decorated = decorated
 *         self.title = title
 *         if decorated:             # <<<<<<<<<<<<<<
 *             self.c_window = CGL_window_create(width, height, title.encode('utf-8'))
 *         else:
 */
  __pyx_t_1 = (__pyx_v_decorated != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":1961
 *         self.title = title
 *         if decorated:
 *             self.c_window = CGL_window_create(width, height, title.encode('utf-8'))             # <<<<<<<<<<<<<<
 *         else:
 *             self.c_window = CGL_window_create_undecorated(width, height, title.encode('utf-8'))
 */
    __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1961, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_height); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1961, __pyx_L1_error)
    __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_title, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1961, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) __PYX_ERR(0, 1961, __pyx_L1_error)
    __pyx_v_self->c_window = CGL_window_create(__pyx_t_2, __pyx_t_3, __pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "cgl_wrapper.pyx":1960
 *         self.is_decorated = decorated
 *         self.title = title
 *         if decorated:             # <<<<<<<<<<<<<<
 *             self.c_window = CGL_window_create(width, height, title.encode('utf-8'))
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":1963
 *             self.c_window = CGL_window_create(width, height, title.encode('utf-8'))
 *         else:
 *             self.c_window = CGL_window_create_undecorated(width, height, title.encode('utf-8'))             # <<<<<<<<<<<<<<
 *         if self.c_window == NULL:
 *             raise RuntimeError("Failed to create window")
 */
  /*else*/ {
    __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_height); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L1_error)
    __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_title, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = __Pyx_PyObject_AsString(__pyx_t_4); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L1_error)
    __pyx_v_self->c_window = CGL_window_create_undecorated(__pyx_t_3, __pyx_t_2, __pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L3:;

  /* "cgl_wrapper.pyx":1964
 *         else:
 *             self.c_window = CGL_window_create_undecorated(width, height, title.encode('utf-8'))
 *         if self.c_window == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create window")
 *         self.has_been_destroyed = False
 */
  __pyx_t_1 = ((__pyx_v_self->c_window == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":1965
 *             self.c_window = CGL_window_create_undecorated(width, height, title.encode('utf-8'))
 *         if self.c_window == NULL:
 *             raise RuntimeError("Failed to create window")             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 *         __WINDOW_TABLE[self.get_id()] = self
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 1965, __pyx_L1_error)

    /* "cgl_wrapper.pyx":1964
 *         else:
 *             self.c_window = CGL_window_create_undecorated(width, height, title.encode('utf-8'))
 *         if self.c_window == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create window")
 *         self.has_been_destroyed = False
 */
  }

  /* "cgl_wrapper.pyx":1966
 *         if self.c_window == NULL:
 *             raise RuntimeError("Failed to create window")
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 *         __WINDOW_TABLE[self.get_id()] = self
 * 
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":1967
 *             raise RuntimeError("Failed to create window")
 *         self.has_been_destroyed = False
 *         __WINDOW_TABLE[self.get_id()] = self             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_WINDOW_TABLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_9 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
    }
  }
  __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_v_self)) < 0)) __PYX_ERR(0, 1967, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "cgl_wrapper.pyx":1957
 * 
 * 
 *     def __init__(self, width: int, height: int, title: str = "CGL Window", decorated: bool = True):             # <<<<<<<<<<<<<<
 *         self.is_decorated = decorated
 *         self.title = title
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cgl.window.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1969
 *         __WINDOW_TABLE[self.get_id()] = self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_6window_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_6window_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_6window_2__dealloc__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_6window_2__dealloc__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":1970
 * 
 *     def __dealloc__(self):
 *         self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self) -> int:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1970, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1969
 *         __WINDOW_TABLE[self.get_id()] = self
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("cgl.window.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":1972
 *         self.destroy()
 * 
 *     def __hash__(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_6window_5__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_6window_5__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_4__hash__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_6window_4__hash__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":1973
 * 
 *     def __hash__(self) -> int:
 *         return self.get_id()             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_AsHash_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_hash_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1973, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1972
 *         self.destroy()
 * 
 *     def __hash__(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.window.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1975
 *         return self.get_id()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if self.has_been_destroyed:
 *             return
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_7destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_7destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_6destroy(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_6destroy(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "cgl_wrapper.pyx":1976
 * 
 *     def destroy(self):
 *         if self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             return
 *         __WINDOW_TABLE.pop(self.get_id())
 */
  __pyx_t_1 = (__pyx_v_self->has_been_destroyed != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":1977
 *     def destroy(self):
 *         if self.has_been_destroyed:
 *             return             # <<<<<<<<<<<<<<
 *         __WINDOW_TABLE.pop(self.get_id())
 *         CGL_window_destroy(self.c_window)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":1976
 * 
 *     def destroy(self):
 *         if self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             return
 *         __WINDOW_TABLE.pop(self.get_id())
 */
  }

  /* "cgl_wrapper.pyx":1978
 *         if self.has_been_destroyed:
 *             return
 *         __WINDOW_TABLE.pop(self.get_id())             # <<<<<<<<<<<<<<
 *         CGL_window_destroy(self.c_window)
 *         self.has_been_destroyed = True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_WINDOW_TABLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_pop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1978, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1979
 *             return
 *         __WINDOW_TABLE.pop(self.get_id())
 *         CGL_window_destroy(self.c_window)             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = True
 * 
 */
  CGL_window_destroy(__pyx_v_self->c_window);

  /* "cgl_wrapper.pyx":1980
 *         __WINDOW_TABLE.pop(self.get_id())
 *         CGL_window_destroy(self.c_window)
 *         self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 * 
 *     def get_id(self) -> int:
 */
  __pyx_v_self->has_been_destroyed = 1;

  /* "cgl_wrapper.pyx":1975
 *         return self.get_id()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if self.has_been_destroyed:
 *             return
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.window.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1982
 *         self.has_been_destroyed = True
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(<void*>self.c_window, sizeof(CGL_window*))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_9get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_9get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_id (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_8get_id(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_8get_id(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_id", 0);

  /* "cgl_wrapper.pyx":1983
 * 
 *     def get_id(self) -> int:
 *         return CGL_utils_super_fast_hash(<void*>self.c_window, sizeof(CGL_window*))             # <<<<<<<<<<<<<<
 * 
 *     def poll_events(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(CGL_utils_super_fast_hash(((void *)__pyx_v_self->c_window), (sizeof(struct CGL_window *)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1982
 *         self.has_been_destroyed = True
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(<void*>self.c_window, sizeof(CGL_window*))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.window.get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1985
 *         return CGL_utils_super_fast_hash(<void*>self.c_window, sizeof(CGL_window*))
 * 
 *     def poll_events(self):             # <<<<<<<<<<<<<<
 *         CGL_window_poll_events(self.c_window)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_11poll_events(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_11poll_events(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("poll_events (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_10poll_events(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_10poll_events(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("poll_events", 0);

  /* "cgl_wrapper.pyx":1986
 * 
 *     def poll_events(self):
 *         CGL_window_poll_events(self.c_window)             # <<<<<<<<<<<<<<
 * 
 *     def should_close(self) -> bool:
 */
  CGL_window_poll_events(__pyx_v_self->c_window);

  /* "cgl_wrapper.pyx":1985
 *         return CGL_utils_super_fast_hash(<void*>self.c_window, sizeof(CGL_window*))
 * 
 *     def poll_events(self):             # <<<<<<<<<<<<<<
 *         CGL_window_poll_events(self.c_window)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1988
 *         CGL_window_poll_events(self.c_window)
 * 
 *     def should_close(self) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_window_should_close(self.c_window)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_13should_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_13should_close(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("should_close (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_12should_close(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_12should_close(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("should_close", 0);

  /* "cgl_wrapper.pyx":1989
 * 
 *     def should_close(self) -> bool:
 *         return CGL_window_should_close(self.c_window)             # <<<<<<<<<<<<<<
 * 
 *     def swap_buffers(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_window_should_close(__pyx_v_self->c_window)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1989, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":1988
 *         CGL_window_poll_events(self.c_window)
 * 
 *     def should_close(self) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_window_should_close(self.c_window)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.window.should_close", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1991
 *         return CGL_window_should_close(self.c_window)
 * 
 *     def swap_buffers(self):             # <<<<<<<<<<<<<<
 *         CGL_window_swap_buffers(self.c_window)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_15swap_buffers(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_15swap_buffers(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("swap_buffers (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_14swap_buffers(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_14swap_buffers(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("swap_buffers", 0);

  /* "cgl_wrapper.pyx":1992
 * 
 *     def swap_buffers(self):
 *         CGL_window_swap_buffers(self.c_window)             # <<<<<<<<<<<<<<
 * 
 *     def set_title(self, title: str):
 */
  CGL_window_swap_buffers(__pyx_v_self->c_window);

  /* "cgl_wrapper.pyx":1991
 *         return CGL_window_should_close(self.c_window)
 * 
 *     def swap_buffers(self):             # <<<<<<<<<<<<<<
 *         CGL_window_swap_buffers(self.c_window)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1994
 *         CGL_window_swap_buffers(self.c_window)
 * 
 *     def set_title(self, title: str):             # <<<<<<<<<<<<<<
 *         CGL_window_set_title(self.c_window, title.encode('utf-8'))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_17set_title(PyObject *__pyx_v_self, PyObject *__pyx_v_title); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_17set_title(PyObject *__pyx_v_self, PyObject *__pyx_v_title) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_title (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_title), (&PyString_Type), 1, "title", 1))) __PYX_ERR(0, 1994, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6window_16set_title(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject*)__pyx_v_title));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_16set_title(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_title) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_title", 0);

  /* "cgl_wrapper.pyx":1995
 * 
 *     def set_title(self, title: str):
 *         CGL_window_set_title(self.c_window, title.encode('utf-8'))             # <<<<<<<<<<<<<<
 * 
 *     def set_size(self, width: int, height: int):
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_title, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1995, __pyx_L1_error)
  CGL_window_set_title(__pyx_v_self->c_window, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1994
 *         CGL_window_swap_buffers(self.c_window)
 * 
 *     def set_title(self, title: str):             # <<<<<<<<<<<<<<
 *         CGL_window_set_title(self.c_window, title.encode('utf-8'))
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.window.set_title", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":1997
 *         CGL_window_set_title(self.c_window, title.encode('utf-8'))
 * 
 *     def set_size(self, width: int, height: int):             # <<<<<<<<<<<<<<
 *         CGL_window_set_size(self.c_window, width, height)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_19set_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_19set_size(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_size (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_size", 1, 2, 2, 1); __PYX_ERR(0, 1997, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_size") < 0)) __PYX_ERR(0, 1997, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_width = values[0];
    __pyx_v_height = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_size", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1997, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.window.set_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_6window_18set_size(((struct __pyx_obj_3cgl_window *)__pyx_v_self), __pyx_v_width, __pyx_v_height);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_18set_size(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_size", 0);

  /* "cgl_wrapper.pyx":1998
 * 
 *     def set_size(self, width: int, height: int):
 *         CGL_window_set_size(self.c_window, width, height)             # <<<<<<<<<<<<<<
 * 
 *     def set_position(self, x: int, y: int):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1998, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_height); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1998, __pyx_L1_error)
  CGL_window_set_size(__pyx_v_self->c_window, __pyx_t_1, __pyx_t_2);

  /* "cgl_wrapper.pyx":1997
 *         CGL_window_set_title(self.c_window, title.encode('utf-8'))
 * 
 *     def set_size(self, width: int, height: int):             # <<<<<<<<<<<<<<
 *         CGL_window_set_size(self.c_window, width, height)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.window.set_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2000
 *         CGL_window_set_size(self.c_window, width, height)
 * 
 *     def set_position(self, x: int, y: int):             # <<<<<<<<<<<<<<
 *         CGL_window_set_position(self.c_window, x, y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_21set_position(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_21set_position(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_position (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_position", 1, 2, 2, 1); __PYX_ERR(0, 2000, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_position") < 0)) __PYX_ERR(0, 2000, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_position", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2000, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.window.set_position", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_6window_20set_position(((struct __pyx_obj_3cgl_window *)__pyx_v_self), __pyx_v_x, __pyx_v_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_20set_position(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_position", 0);

  /* "cgl_wrapper.pyx":2001
 * 
 *     def set_position(self, x: int, y: int):
 *         CGL_window_set_position(self.c_window, x, y)             # <<<<<<<<<<<<<<
 * 
 *     def set_hidden(self, hidden: bool):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_x); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2001, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_y); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2001, __pyx_L1_error)
  CGL_window_set_position(__pyx_v_self->c_window, __pyx_t_1, __pyx_t_2);

  /* "cgl_wrapper.pyx":2000
 *         CGL_window_set_size(self.c_window, width, height)
 * 
 *     def set_position(self, x: int, y: int):             # <<<<<<<<<<<<<<
 *         CGL_window_set_position(self.c_window, x, y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.window.set_position", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2003
 *         CGL_window_set_position(self.c_window, x, y)
 * 
 *     def set_hidden(self, hidden: bool):             # <<<<<<<<<<<<<<
 *         CGL_window_set_hidden(self.c_window, hidden)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_23set_hidden(PyObject *__pyx_v_self, PyObject *__pyx_arg_hidden); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_23set_hidden(PyObject *__pyx_v_self, PyObject *__pyx_arg_hidden) {
  bool __pyx_v_hidden;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_hidden (wrapper)", 0);
  assert(__pyx_arg_hidden); {
    __pyx_v_hidden = __Pyx_PyObject_IsTrue(__pyx_arg_hidden); if (unlikely((__pyx_v_hidden == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2003, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.window.set_hidden", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_6window_22set_hidden(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((bool)__pyx_v_hidden));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_22set_hidden(struct __pyx_obj_3cgl_window *__pyx_v_self, bool __pyx_v_hidden) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_hidden", 0);

  /* "cgl_wrapper.pyx":2004
 * 
 *     def set_hidden(self, hidden: bool):
 *         CGL_window_set_hidden(self.c_window, hidden)             # <<<<<<<<<<<<<<
 * 
 *     def set_user_data(self, data: object):
 */
  CGL_window_set_hidden(__pyx_v_self->c_window, __pyx_v_hidden);

  /* "cgl_wrapper.pyx":2003
 *         CGL_window_set_position(self.c_window, x, y)
 * 
 *     def set_hidden(self, hidden: bool):             # <<<<<<<<<<<<<<
 *         CGL_window_set_hidden(self.c_window, hidden)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2006
 *         CGL_window_set_hidden(self.c_window, hidden)
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_window_set_user_data(self.c_window, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_25set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_25set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_24set_user_data(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_24set_user_data(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data", 0);

  /* "cgl_wrapper.pyx":2007
 * 
 *     def set_user_data(self, data: object):
 *         CGL_window_set_user_data(self.c_window, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def get_user_data(self) -> object:
 */
  CGL_window_set_user_data(__pyx_v_self->c_window, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2006
 *         CGL_window_set_hidden(self.c_window, hidden)
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_window_set_user_data(self.c_window, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2009
 *         CGL_window_set_user_data(self.c_window, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_window_get_user_data(self.c_window)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_27get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_27get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_26get_user_data(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_26get_user_data(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  __Pyx_RefNannySetupContext("get_user_data", 0);

  /* "cgl_wrapper.pyx":2010
 * 
 *     def get_user_data(self) -> object:
 *         return <object>CGL_window_get_user_data(self.c_window)             # <<<<<<<<<<<<<<
 * 
 *     def get_size(self) -> tuple:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = CGL_window_get_user_data(__pyx_v_self->c_window);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2009
 *         CGL_window_set_user_data(self.c_window, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_window_get_user_data(self.c_window)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2012
 *         return <object>CGL_window_get_user_data(self.c_window)
 * 
 *     def get_size(self) -> tuple:             # <<<<<<<<<<<<<<
 *         cdef int width, height
 *         CGL_window_get_size(self.c_window, &width, &height)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_29get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_29get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_size (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_28get_size(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_28get_size(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  int __pyx_v_width;
  int __pyx_v_height;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_size", 0);

  /* "cgl_wrapper.pyx":2014
 *     def get_size(self) -> tuple:
 *         cdef int width, height
 *         CGL_window_get_size(self.c_window, &width, &height)             # <<<<<<<<<<<<<<
 *         return (width, height)
 * 
 */
  CGL_window_get_size(__pyx_v_self->c_window, (&__pyx_v_width), (&__pyx_v_height));

  /* "cgl_wrapper.pyx":2015
 *         cdef int width, height
 *         CGL_window_get_size(self.c_window, &width, &height)
 *         return (width, height)             # <<<<<<<<<<<<<<
 * 
 *     def set_close_callback(self, callback: Callable):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_height); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2012
 *         return <object>CGL_window_get_user_data(self.c_window)
 * 
 *     def get_size(self) -> tuple:             # <<<<<<<<<<<<<<
 *         cdef int width, height
 *         CGL_window_get_size(self.c_window, &width, &height)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.window.get_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2017
 *         return (width, height)
 * 
 *     def set_close_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.close_callback = callback
 *         CGL_window_set_close_callback(self.c_window, __pass_through_window_close_callback)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_31set_close_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_31set_close_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_close_callback (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_30set_close_callback(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_30set_close_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_close_callback", 0);

  /* "cgl_wrapper.pyx":2018
 * 
 *     def set_close_callback(self, callback: Callable):
 *         self.close_callback = callback             # <<<<<<<<<<<<<<
 *         CGL_window_set_close_callback(self.c_window, __pass_through_window_close_callback)
 * 
 */
  __Pyx_INCREF(__pyx_v_callback);
  __Pyx_GIVEREF(__pyx_v_callback);
  __Pyx_GOTREF(__pyx_v_self->close_callback);
  __Pyx_DECREF(__pyx_v_self->close_callback);
  __pyx_v_self->close_callback = __pyx_v_callback;

  /* "cgl_wrapper.pyx":2019
 *     def set_close_callback(self, callback: Callable):
 *         self.close_callback = callback
 *         CGL_window_set_close_callback(self.c_window, __pass_through_window_close_callback)             # <<<<<<<<<<<<<<
 * 
 *     def set_key_callback(self, callback: Callable):
 */
  CGL_window_set_close_callback(__pyx_v_self->c_window, __pyx_f_3cgl___pass_through_window_close_callback);

  /* "cgl_wrapper.pyx":2017
 *         return (width, height)
 * 
 *     def set_close_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.close_callback = callback
 *         CGL_window_set_close_callback(self.c_window, __pass_through_window_close_callback)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2021
 *         CGL_window_set_close_callback(self.c_window, __pass_through_window_close_callback)
 * 
 *     def set_key_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.key_callback = callback
 *         CGL_window_set_key_callback(self.c_window, __pass_through_window_key_callback)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_33set_key_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_33set_key_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_key_callback (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_32set_key_callback(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_32set_key_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_key_callback", 0);

  /* "cgl_wrapper.pyx":2022
 * 
 *     def set_key_callback(self, callback: Callable):
 *         self.key_callback = callback             # <<<<<<<<<<<<<<
 *         CGL_window_set_key_callback(self.c_window, __pass_through_window_key_callback)
 * 
 */
  __Pyx_INCREF(__pyx_v_callback);
  __Pyx_GIVEREF(__pyx_v_callback);
  __Pyx_GOTREF(__pyx_v_self->key_callback);
  __Pyx_DECREF(__pyx_v_self->key_callback);
  __pyx_v_self->key_callback = __pyx_v_callback;

  /* "cgl_wrapper.pyx":2023
 *     def set_key_callback(self, callback: Callable):
 *         self.key_callback = callback
 *         CGL_window_set_key_callback(self.c_window, __pass_through_window_key_callback)             # <<<<<<<<<<<<<<
 * 
 *     def set_mouse_button_callback(self, callback: Callable):
 */
  CGL_window_set_key_callback(__pyx_v_self->c_window, __pyx_f_3cgl___pass_through_window_key_callback);

  /* "cgl_wrapper.pyx":2021
 *         CGL_window_set_close_callback(self.c_window, __pass_through_window_close_callback)
 * 
 *     def set_key_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.key_callback = callback
 *         CGL_window_set_key_callback(self.c_window, __pass_through_window_key_callback)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2025
 *         CGL_window_set_key_callback(self.c_window, __pass_through_window_key_callback)
 * 
 *     def set_mouse_button_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.mouse_button_callback = callback
 *         CGL_window_set_mouse_button_callback(self.c_window, __pass_through_window_mouse_button_callback)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_35set_mouse_button_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_35set_mouse_button_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_mouse_button_callback (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_34set_mouse_button_callback(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_34set_mouse_button_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_mouse_button_callback", 0);

  /* "cgl_wrapper.pyx":2026
 * 
 *     def set_mouse_button_callback(self, callback: Callable):
 *         self.mouse_button_callback = callback             # <<<<<<<<<<<<<<
 *         CGL_window_set_mouse_button_callback(self.c_window, __pass_through_window_mouse_button_callback)
 * 
 */
  __Pyx_INCREF(__pyx_v_callback);
  __Pyx_GIVEREF(__pyx_v_callback);
  __Pyx_GOTREF(__pyx_v_self->mouse_button_callback);
  __Pyx_DECREF(__pyx_v_self->mouse_button_callback);
  __pyx_v_self->mouse_button_callback = __pyx_v_callback;

  /* "cgl_wrapper.pyx":2027
 *     def set_mouse_button_callback(self, callback: Callable):
 *         self.mouse_button_callback = callback
 *         CGL_window_set_mouse_button_callback(self.c_window, __pass_through_window_mouse_button_callback)             # <<<<<<<<<<<<<<
 * 
 *     def set_mouse_position_callback(self, callback: Callable):
 */
  CGL_window_set_mouse_button_callback(__pyx_v_self->c_window, __pyx_f_3cgl___pass_through_window_mouse_button_callback);

  /* "cgl_wrapper.pyx":2025
 *         CGL_window_set_key_callback(self.c_window, __pass_through_window_key_callback)
 * 
 *     def set_mouse_button_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.mouse_button_callback = callback
 *         CGL_window_set_mouse_button_callback(self.c_window, __pass_through_window_mouse_button_callback)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2029
 *         CGL_window_set_mouse_button_callback(self.c_window, __pass_through_window_mouse_button_callback)
 * 
 *     def set_mouse_position_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.mouse_position_callback = callback
 *         CGL_window_set_mouse_position_callback(self.c_window, __pass_through_window_mouse_position_callback)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_37set_mouse_position_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_37set_mouse_position_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_mouse_position_callback (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_36set_mouse_position_callback(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_36set_mouse_position_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_mouse_position_callback", 0);

  /* "cgl_wrapper.pyx":2030
 * 
 *     def set_mouse_position_callback(self, callback: Callable):
 *         self.mouse_position_callback = callback             # <<<<<<<<<<<<<<
 *         CGL_window_set_mouse_position_callback(self.c_window, __pass_through_window_mouse_position_callback)
 * 
 */
  __Pyx_INCREF(__pyx_v_callback);
  __Pyx_GIVEREF(__pyx_v_callback);
  __Pyx_GOTREF(__pyx_v_self->mouse_position_callback);
  __Pyx_DECREF(__pyx_v_self->mouse_position_callback);
  __pyx_v_self->mouse_position_callback = __pyx_v_callback;

  /* "cgl_wrapper.pyx":2031
 *     def set_mouse_position_callback(self, callback: Callable):
 *         self.mouse_position_callback = callback
 *         CGL_window_set_mouse_position_callback(self.c_window, __pass_through_window_mouse_position_callback)             # <<<<<<<<<<<<<<
 * 
 *     def set_mouse_scroll_callback(self, callback: Callable):
 */
  CGL_window_set_mouse_position_callback(__pyx_v_self->c_window, __pyx_f_3cgl___pass_through_window_mouse_position_callback);

  /* "cgl_wrapper.pyx":2029
 *         CGL_window_set_mouse_button_callback(self.c_window, __pass_through_window_mouse_button_callback)
 * 
 *     def set_mouse_position_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.mouse_position_callback = callback
 *         CGL_window_set_mouse_position_callback(self.c_window, __pass_through_window_mouse_position_callback)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2033
 *         CGL_window_set_mouse_position_callback(self.c_window, __pass_through_window_mouse_position_callback)
 * 
 *     def set_mouse_scroll_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.mouse_scroll_callback = callback
 *         CGL_window_set_mouse_scroll_callback(self.c_window, __pass_through_window_mouse_scroll_callback)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_39set_mouse_scroll_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_39set_mouse_scroll_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_mouse_scroll_callback (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_38set_mouse_scroll_callback(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_38set_mouse_scroll_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_mouse_scroll_callback", 0);

  /* "cgl_wrapper.pyx":2034
 * 
 *     def set_mouse_scroll_callback(self, callback: Callable):
 *         self.mouse_scroll_callback = callback             # <<<<<<<<<<<<<<
 *         CGL_window_set_mouse_scroll_callback(self.c_window, __pass_through_window_mouse_scroll_callback)
 * 
 */
  __Pyx_INCREF(__pyx_v_callback);
  __Pyx_GIVEREF(__pyx_v_callback);
  __Pyx_GOTREF(__pyx_v_self->mouse_scroll_callback);
  __Pyx_DECREF(__pyx_v_self->mouse_scroll_callback);
  __pyx_v_self->mouse_scroll_callback = __pyx_v_callback;

  /* "cgl_wrapper.pyx":2035
 *     def set_mouse_scroll_callback(self, callback: Callable):
 *         self.mouse_scroll_callback = callback
 *         CGL_window_set_mouse_scroll_callback(self.c_window, __pass_through_window_mouse_scroll_callback)             # <<<<<<<<<<<<<<
 * 
 *     def set_framebuffer_size_callback(self, callback: Callable):
 */
  CGL_window_set_mouse_scroll_callback(__pyx_v_self->c_window, __pyx_f_3cgl___pass_through_window_mouse_scroll_callback);

  /* "cgl_wrapper.pyx":2033
 *         CGL_window_set_mouse_position_callback(self.c_window, __pass_through_window_mouse_position_callback)
 * 
 *     def set_mouse_scroll_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.mouse_scroll_callback = callback
 *         CGL_window_set_mouse_scroll_callback(self.c_window, __pass_through_window_mouse_scroll_callback)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2037
 *         CGL_window_set_mouse_scroll_callback(self.c_window, __pass_through_window_mouse_scroll_callback)
 * 
 *     def set_framebuffer_size_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.framebuffer_size_callback = callback
 *         CGL_window_set_framebuffer_size_callback(self.c_window, __pass_through_window_framebuffer_size_callback)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_41set_framebuffer_size_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_41set_framebuffer_size_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_framebuffer_size_callback (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_40set_framebuffer_size_callback(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_40set_framebuffer_size_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_framebuffer_size_callback", 0);

  /* "cgl_wrapper.pyx":2038
 * 
 *     def set_framebuffer_size_callback(self, callback: Callable):
 *         self.framebuffer_size_callback = callback             # <<<<<<<<<<<<<<
 *         CGL_window_set_framebuffer_size_callback(self.c_window, __pass_through_window_framebuffer_size_callback)
 * 
 */
  __Pyx_INCREF(__pyx_v_callback);
  __Pyx_GIVEREF(__pyx_v_callback);
  __Pyx_GOTREF(__pyx_v_self->framebuffer_size_callback);
  __Pyx_DECREF(__pyx_v_self->framebuffer_size_callback);
  __pyx_v_self->framebuffer_size_callback = __pyx_v_callback;

  /* "cgl_wrapper.pyx":2039
 *     def set_framebuffer_size_callback(self, callback: Callable):
 *         self.framebuffer_size_callback = callback
 *         CGL_window_set_framebuffer_size_callback(self.c_window, __pass_through_window_framebuffer_size_callback)             # <<<<<<<<<<<<<<
 * 
 *     def set_drag_n_drop_callback(self, callback: Callable):
 */
  CGL_window_set_framebuffer_size_callback(__pyx_v_self->c_window, __pyx_f_3cgl___pass_through_window_framebuffer_size_callback);

  /* "cgl_wrapper.pyx":2037
 *         CGL_window_set_mouse_scroll_callback(self.c_window, __pass_through_window_mouse_scroll_callback)
 * 
 *     def set_framebuffer_size_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.framebuffer_size_callback = callback
 *         CGL_window_set_framebuffer_size_callback(self.c_window, __pass_through_window_framebuffer_size_callback)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2041
 *         CGL_window_set_framebuffer_size_callback(self.c_window, __pass_through_window_framebuffer_size_callback)
 * 
 *     def set_drag_n_drop_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.drag_n_drop_callback = callback
 *         CGL_window_set_drag_n_drop_callback(self.c_window, __pass_through_window_drag_n_drop_callback)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_43set_drag_n_drop_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_43set_drag_n_drop_callback(PyObject *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_drag_n_drop_callback (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_42set_drag_n_drop_callback(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_callback));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_42set_drag_n_drop_callback(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_callback) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_drag_n_drop_callback", 0);

  /* "cgl_wrapper.pyx":2042
 * 
 *     def set_drag_n_drop_callback(self, callback: Callable):
 *         self.drag_n_drop_callback = callback             # <<<<<<<<<<<<<<
 *         CGL_window_set_drag_n_drop_callback(self.c_window, __pass_through_window_drag_n_drop_callback)
 * 
 */
  __Pyx_INCREF(__pyx_v_callback);
  __Pyx_GIVEREF(__pyx_v_callback);
  __Pyx_GOTREF(__pyx_v_self->drag_n_drop_callback);
  __Pyx_DECREF(__pyx_v_self->drag_n_drop_callback);
  __pyx_v_self->drag_n_drop_callback = __pyx_v_callback;

  /* "cgl_wrapper.pyx":2043
 *     def set_drag_n_drop_callback(self, callback: Callable):
 *         self.drag_n_drop_callback = callback
 *         CGL_window_set_drag_n_drop_callback(self.c_window, __pass_through_window_drag_n_drop_callback)             # <<<<<<<<<<<<<<
 * 
 *     def get_position(self) -> tuple:
 */
  CGL_window_set_drag_n_drop_callback(__pyx_v_self->c_window, __pyx_f_3cgl___pass_through_window_drag_n_drop_callback);

  /* "cgl_wrapper.pyx":2041
 *         CGL_window_set_framebuffer_size_callback(self.c_window, __pass_through_window_framebuffer_size_callback)
 * 
 *     def set_drag_n_drop_callback(self, callback: Callable):             # <<<<<<<<<<<<<<
 *         self.drag_n_drop_callback = callback
 *         CGL_window_set_drag_n_drop_callback(self.c_window, __pass_through_window_drag_n_drop_callback)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2045
 *         CGL_window_set_drag_n_drop_callback(self.c_window, __pass_through_window_drag_n_drop_callback)
 * 
 *     def get_position(self) -> tuple:             # <<<<<<<<<<<<<<
 *         cdef int x, y
 *         CGL_window_get_position(self.c_window, &x, &y)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_45get_position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_45get_position(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_position (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_44get_position(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_44get_position(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  int __pyx_v_x;
  int __pyx_v_y;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_position", 0);

  /* "cgl_wrapper.pyx":2047
 *     def get_position(self) -> tuple:
 *         cdef int x, y
 *         CGL_window_get_position(self.c_window, &x, &y)             # <<<<<<<<<<<<<<
 *         return (x, y)
 * 
 */
  CGL_window_get_position(__pyx_v_self->c_window, (&__pyx_v_x), (&__pyx_v_y));

  /* "cgl_wrapper.pyx":2048
 *         cdef int x, y
 *         CGL_window_get_position(self.c_window, &x, &y)
 *         return (x, y)             # <<<<<<<<<<<<<<
 * 
 *     def get_framebuffer_size(self) -> tuple:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2048, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2045
 *         CGL_window_set_drag_n_drop_callback(self.c_window, __pass_through_window_drag_n_drop_callback)
 * 
 *     def get_position(self) -> tuple:             # <<<<<<<<<<<<<<
 *         cdef int x, y
 *         CGL_window_get_position(self.c_window, &x, &y)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.window.get_position", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2050
 *         return (x, y)
 * 
 *     def get_framebuffer_size(self) -> tuple:             # <<<<<<<<<<<<<<
 *         cdef int width, height
 *         CGL_window_get_framebuffer_size(self.c_window, &width, &height)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_47get_framebuffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_47get_framebuffer_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_framebuffer_size (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_46get_framebuffer_size(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_46get_framebuffer_size(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  int __pyx_v_width;
  int __pyx_v_height;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_framebuffer_size", 0);

  /* "cgl_wrapper.pyx":2052
 *     def get_framebuffer_size(self) -> tuple:
 *         cdef int width, height
 *         CGL_window_get_framebuffer_size(self.c_window, &width, &height)             # <<<<<<<<<<<<<<
 *         return (width, height)
 * 
 */
  CGL_window_get_framebuffer_size(__pyx_v_self->c_window, (&__pyx_v_width), (&__pyx_v_height));

  /* "cgl_wrapper.pyx":2053
 *         cdef int width, height
 *         CGL_window_get_framebuffer_size(self.c_window, &width, &height)
 *         return (width, height)             # <<<<<<<<<<<<<<
 * 
 *     def resecure_callbaks(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_height); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2050
 *         return (x, y)
 * 
 *     def get_framebuffer_size(self) -> tuple:             # <<<<<<<<<<<<<<
 *         cdef int width, height
 *         CGL_window_get_framebuffer_size(self.c_window, &width, &height)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.window.get_framebuffer_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2055
 *         return (width, height)
 * 
 *     def resecure_callbaks(self):             # <<<<<<<<<<<<<<
 *         CGL_window_resecure_callbacks(self.c_window)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_49resecure_callbaks(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_49resecure_callbaks(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("resecure_callbaks (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_48resecure_callbaks(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_48resecure_callbaks(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("resecure_callbaks", 0);

  /* "cgl_wrapper.pyx":2056
 * 
 *     def resecure_callbaks(self):
 *         CGL_window_resecure_callbacks(self.c_window)             # <<<<<<<<<<<<<<
 * 
 *     def make_context_current(self):
 */
  CGL_window_resecure_callbacks(__pyx_v_self->c_window);

  /* "cgl_wrapper.pyx":2055
 *         return (width, height)
 * 
 *     def resecure_callbaks(self):             # <<<<<<<<<<<<<<
 *         CGL_window_resecure_callbacks(self.c_window)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2058
 *         CGL_window_resecure_callbacks(self.c_window)
 * 
 *     def make_context_current(self):             # <<<<<<<<<<<<<<
 *         CGL_window_make_context_current(self.c_window)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_51make_context_current(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_51make_context_current(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_context_current (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_50make_context_current(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_50make_context_current(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("make_context_current", 0);

  /* "cgl_wrapper.pyx":2059
 * 
 *     def make_context_current(self):
 *         CGL_window_make_context_current(self.c_window)             # <<<<<<<<<<<<<<
 * 
 *     def get_glfw_handle(self) -> object:
 */
  CGL_window_make_context_current(__pyx_v_self->c_window);

  /* "cgl_wrapper.pyx":2058
 *         CGL_window_resecure_callbacks(self.c_window)
 * 
 *     def make_context_current(self):             # <<<<<<<<<<<<<<
 *         CGL_window_make_context_current(self.c_window)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2061
 *         CGL_window_make_context_current(self.c_window)
 * 
 *     def get_glfw_handle(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_window_get_glfw_handle(self.c_window)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_53get_glfw_handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_53get_glfw_handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_glfw_handle (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_52get_glfw_handle(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_52get_glfw_handle(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  struct GLFWwindow *__pyx_t_1;
  __Pyx_RefNannySetupContext("get_glfw_handle", 0);

  /* "cgl_wrapper.pyx":2062
 * 
 *     def get_glfw_handle(self) -> object:
 *         return <object>CGL_window_get_glfw_handle(self.c_window)             # <<<<<<<<<<<<<<
 * 
 *     def get_key(self, key: int) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = CGL_window_get_glfw_handle(__pyx_v_self->c_window);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2061
 *         CGL_window_make_context_current(self.c_window)
 * 
 *     def get_glfw_handle(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_window_get_glfw_handle(self.c_window)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2064
 *         return <object>CGL_window_get_glfw_handle(self.c_window)
 * 
 *     def get_key(self, key: int) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_window_get_key(self.c_window, key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_55get_key(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_55get_key(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_key (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_54get_key(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_54get_key(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_key", 0);

  /* "cgl_wrapper.pyx":2065
 * 
 *     def get_key(self, key: int) -> int:
 *         return CGL_window_get_key(self.c_window, key)             # <<<<<<<<<<<<<<
 * 
 *     def is_key_pressed(self, key: int) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_key); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2065, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_CGL_int(CGL_window_get_key(__pyx_v_self->c_window, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2064
 *         return <object>CGL_window_get_glfw_handle(self.c_window)
 * 
 *     def get_key(self, key: int) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_window_get_key(self.c_window, key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.window.get_key", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2067
 *         return CGL_window_get_key(self.c_window, key)
 * 
 *     def is_key_pressed(self, key: int) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_window_is_key_pressed(self.c_window, key)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_57is_key_pressed(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_57is_key_pressed(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_key_pressed (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_56is_key_pressed(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_key));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_56is_key_pressed(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_key) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_key_pressed", 0);

  /* "cgl_wrapper.pyx":2068
 * 
 *     def is_key_pressed(self, key: int) -> bool:
 *         return CGL_window_is_key_pressed(self.c_window, key)             # <<<<<<<<<<<<<<
 * 
 *     def get_mouse_button(self, button: int) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_key); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2068, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyBool_FromLong(CGL_window_is_key_pressed(__pyx_v_self->c_window, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2067
 *         return CGL_window_get_key(self.c_window, key)
 * 
 *     def is_key_pressed(self, key: int) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_window_is_key_pressed(self.c_window, key)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.window.is_key_pressed", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2070
 *         return CGL_window_is_key_pressed(self.c_window, key)
 * 
 *     def get_mouse_button(self, button: int) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_window_get_mouse_button(self.c_window, button)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_59get_mouse_button(PyObject *__pyx_v_self, PyObject *__pyx_v_button); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_59get_mouse_button(PyObject *__pyx_v_self, PyObject *__pyx_v_button) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_mouse_button (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_58get_mouse_button(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v_button));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_58get_mouse_button(struct __pyx_obj_3cgl_window *__pyx_v_self, PyObject *__pyx_v_button) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_mouse_button", 0);

  /* "cgl_wrapper.pyx":2071
 * 
 *     def get_mouse_button(self, button: int) -> int:
 *         return CGL_window_get_mouse_button(self.c_window, button)             # <<<<<<<<<<<<<<
 * 
 *     def get_cursor_pos(self) -> tuple:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_button); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2071, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_From_CGL_int(CGL_window_get_mouse_button(__pyx_v_self->c_window, __pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2071, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2070
 *         return CGL_window_is_key_pressed(self.c_window, key)
 * 
 *     def get_mouse_button(self, button: int) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_window_get_mouse_button(self.c_window, button)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.window.get_mouse_button", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2073
 *         return CGL_window_get_mouse_button(self.c_window, button)
 * 
 *     def get_cursor_pos(self) -> tuple:             # <<<<<<<<<<<<<<
 *         cdef double x, y
 *         CGL_window_get_mouse_position(self.c_window, &x, &y)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_61get_cursor_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_61get_cursor_pos(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_cursor_pos (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_60get_cursor_pos(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_60get_cursor_pos(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  double __pyx_v_x;
  double __pyx_v_y;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_cursor_pos", 0);

  /* "cgl_wrapper.pyx":2075
 *     def get_cursor_pos(self) -> tuple:
 *         cdef double x, y
 *         CGL_window_get_mouse_position(self.c_window, &x, &y)             # <<<<<<<<<<<<<<
 *         return (x, y)
 * 
 */
  CGL_window_get_mouse_position(__pyx_v_self->c_window, (&__pyx_v_x), (&__pyx_v_y));

  /* "cgl_wrapper.pyx":2076
 *         cdef double x, y
 *         CGL_window_get_mouse_position(self.c_window, &x, &y)
 *         return (x, y)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2073
 *         return CGL_window_get_mouse_button(self.c_window, button)
 * 
 *     def get_cursor_pos(self) -> tuple:             # <<<<<<<<<<<<<<
 *         cdef double x, y
 *         CGL_window_get_mouse_position(self.c_window, &x, &y)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.window.get_cursor_pos", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2078
 *         return (x, y)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"window({self.width}, {self.height}, {self.title})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_63__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_63__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_62__repr__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_62__repr__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":2079
 * 
 *     def __repr__(self):
 *         return f"window({self.width}, {self.height}, {self.title})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_window);
  __pyx_t_2 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_window);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_window);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_self->title, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2078
 *         return (x, y)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"window({self.width}, {self.height}, {self.title})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.window.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2081
 *         return f"window({self.width}, {self.height}, {self.title})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"window({self.width}, {self.height}, {self.title})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_65__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_65__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_64__str__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_64__str__(struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":2082
 * 
 *     def __str__(self):
 *         return f"window({self.width}, {self.height}, {self.title})"             # <<<<<<<<<<<<<<
 * 
 * cdef class image:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_window);
  __pyx_t_2 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_window);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_window);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_self->title, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2081
 *         return f"window({self.width}, {self.height}, {self.title})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"window({self.width}, {self.height}, {self.title})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.window.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_67__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_67__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_66__reduce_cython__(((struct __pyx_obj_3cgl_window *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_66__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_window *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.window.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6window_69__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_6window_69__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6window_68__setstate_cython__(((struct __pyx_obj_3cgl_window *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6window_68__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_window *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.window.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2089
 * 
 *     @property
 *     def width(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_image.width
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5image_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5image_5width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5image_5width___get__(((struct __pyx_obj_3cgl_image *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5image_5width___get__(struct __pyx_obj_3cgl_image *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2090
 *     @property
 *     def width(self) -> int:
 *         return self.c_image.width             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_image.width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2090, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2089
 * 
 *     @property
 *     def width(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_image.width
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.image.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2093
 * 
 *     @property
 *     def height(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_image.height
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5image_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5image_6height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5image_6height___get__(((struct __pyx_obj_3cgl_image *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5image_6height___get__(struct __pyx_obj_3cgl_image *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2094
 *     @property
 *     def height(self) -> int:
 *         return self.c_image.height             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_image.height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2093
 * 
 *     @property
 *     def height(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_image.height
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.image.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2097
 * 
 *     @property
 *     def channels(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_image.channels
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5image_8channels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5image_8channels_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5image_8channels___get__(((struct __pyx_obj_3cgl_image *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5image_8channels___get__(struct __pyx_obj_3cgl_image *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2098
 *     @property
 *     def channels(self) -> int:
 *         return self.c_image.channels             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_image.channels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2097
 * 
 *     @property
 *     def channels(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_image.channels
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.image.channels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2101
 * 
 *     @property
 *     def data(self) -> object:             # <<<<<<<<<<<<<<
 *         return self.image_data
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5image_4data_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5image_4data_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5image_4data___get__(((struct __pyx_obj_3cgl_image *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5image_4data___get__(struct __pyx_obj_3cgl_image *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2102
 *     @property
 *     def data(self) -> object:
 *         return self.image_data             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->image_data);
  __pyx_r = __pyx_v_self->image_data;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2101
 * 
 *     @property
 *     def data(self) -> object:             # <<<<<<<<<<<<<<
 *         return self.image_data
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2104
 *         return self.image_data
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_image = CGL_image()
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5image_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_5image_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_5image___init__(((struct __pyx_obj_3cgl_image *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5image___init__(struct __pyx_obj_3cgl_image *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  struct CGL_image __pyx_t_1;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":2105
 * 
 *     def __init__(self):
 *         self.c_image = CGL_image()             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __pyx_v_self->c_image = __pyx_t_1;

  /* "cgl_wrapper.pyx":2104
 *         return self.image_data
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_image = CGL_image()
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2107
 *         self.c_image = CGL_image()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash(self.image_data)
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_5image_3__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_5image_3__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5image_2__hash__(((struct __pyx_obj_3cgl_image *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_5image_2__hash__(struct __pyx_obj_3cgl_image *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_hash_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":2108
 * 
 *     def __hash__(self):
 *         return hash(self.image_data)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_1 = __pyx_v_self->image_data;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 2108, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2107
 *         self.c_image = CGL_image()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash(self.image_data)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.image.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2110
 *         return hash(self.image_data)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"image({self.width}, {self.height}, {self.channels})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5image_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5image_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5image_4__repr__(((struct __pyx_obj_3cgl_image *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5image_4__repr__(struct __pyx_obj_3cgl_image *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":2111
 * 
 *     def __repr__(self):
 *         return f"image({self.width}, {self.height}, {self.channels})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_image);
  __pyx_t_2 += 6;
  __Pyx_GIVEREF(__pyx_kp_u_image);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_image);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_channels); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2111, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2110
 *         return hash(self.image_data)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"image({self.width}, {self.height}, {self.channels})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.image.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2113
 *         return f"image({self.width}, {self.height}, {self.channels})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"image({self.width}, {self.height}, {self.channels})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5image_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5image_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5image_6__str__(((struct __pyx_obj_3cgl_image *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5image_6__str__(struct __pyx_obj_3cgl_image *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":2114
 * 
 *     def __str__(self):
 *         return f"image({self.width}, {self.height}, {self.channels})"             # <<<<<<<<<<<<<<
 * 
 *     def load_image(self, path: str):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_image);
  __pyx_t_2 += 6;
  __Pyx_GIVEREF(__pyx_kp_u_image);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_image);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_height); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_channels); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2113
 *         return f"image({self.width}, {self.height}, {self.channels})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"image({self.width}, {self.height}, {self.channels})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.image.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2116
 *         return f"image({self.width}, {self.height}, {self.channels})"
 * 
 *     def load_image(self, path: str):             # <<<<<<<<<<<<<<
 *         img = PIL.Image.open(path)
 *         self.c_image.width = img.width
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5image_9load_image(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
static PyObject *__pyx_pw_3cgl_5image_9load_image(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_image (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 2116, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_5image_8load_image(((struct __pyx_obj_3cgl_image *)__pyx_v_self), ((PyObject*)__pyx_v_path));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5image_8load_image(struct __pyx_obj_3cgl_image *__pyx_v_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_v_img = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_image", 0);

  /* "cgl_wrapper.pyx":2117
 * 
 *     def load_image(self, path: str):
 *         img = PIL.Image.open(path)             # <<<<<<<<<<<<<<
 *         self.c_image.width = img.width
 *         self.c_image.height = img.height
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_PIL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Image); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_path) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_path);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_img = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2118
 *     def load_image(self, path: str):
 *         img = PIL.Image.open(path)
 *         self.c_image.width = img.width             # <<<<<<<<<<<<<<
 *         self.c_image.height = img.height
 *         self.c_image.channels = 3
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_img, __pyx_n_s_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2118, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_image.width = __pyx_t_4;

  /* "cgl_wrapper.pyx":2119
 *         img = PIL.Image.open(path)
 *         self.c_image.width = img.width
 *         self.c_image.height = img.height             # <<<<<<<<<<<<<<
 *         self.c_image.channels = 3
 *         self.c_image.bytes_per_channel = 8
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_img, __pyx_n_s_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_image.height = __pyx_t_4;

  /* "cgl_wrapper.pyx":2120
 *         self.c_image.width = img.width
 *         self.c_image.height = img.height
 *         self.c_image.channels = 3             # <<<<<<<<<<<<<<
 *         self.c_image.bytes_per_channel = 8
 *         self.image_data = img.tobytes()
 */
  __pyx_v_self->c_image.channels = 3;

  /* "cgl_wrapper.pyx":2121
 *         self.c_image.height = img.height
 *         self.c_image.channels = 3
 *         self.c_image.bytes_per_channel = 8             # <<<<<<<<<<<<<<
 *         self.image_data = img.tobytes()
 *         self.c_image.data = <void*>self.image_data
 */
  __pyx_v_self->c_image.bytes_per_channel = 8;

  /* "cgl_wrapper.pyx":2122
 *         self.c_image.channels = 3
 *         self.c_image.bytes_per_channel = 8
 *         self.image_data = img.tobytes()             # <<<<<<<<<<<<<<
 *         self.c_image.data = <void*>self.image_data
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_img, __pyx_n_s_tobytes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->image_data);
  __Pyx_DECREF(__pyx_v_self->image_data);
  __pyx_v_self->image_data = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2123
 *         self.c_image.bytes_per_channel = 8
 *         self.image_data = img.tobytes()
 *         self.c_image.data = <void*>self.image_data             # <<<<<<<<<<<<<<
 * 
 * cdef class mesh_vertex:
 */
  __pyx_v_self->c_image.data = ((void *)__pyx_v_self->image_data);

  /* "cgl_wrapper.pyx":2116
 *         return f"image({self.width}, {self.height}, {self.channels})"
 * 
 *     def load_image(self, path: str):             # <<<<<<<<<<<<<<
 *         img = PIL.Image.open(path)
 *         self.c_image.width = img.width
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.image.load_image", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_img);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5image_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_5image_11__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5image_10__reduce_cython__(((struct __pyx_obj_3cgl_image *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5image_10__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_image *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.image.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5image_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_5image_13__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5image_12__setstate_cython__(((struct __pyx_obj_3cgl_image *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5image_12__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_image *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.image.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2129
 * 
 *     @property
 *     def position(self) -> vec4:             # <<<<<<<<<<<<<<
 *         return vec4(self.c_vertex.position.x, self.c_vertex.position.y, self.c_vertex.position.z, self.c_vertex.position.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11mesh_vertex_8position_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_11mesh_vertex_8position_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_8position___get__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11mesh_vertex_8position___get__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2130
 *     @property
 *     def position(self) -> vec4:
 *         return vec4(self.c_vertex.position.x, self.c_vertex.position.y, self.c_vertex.position.z, self.c_vertex.position.w)             # <<<<<<<<<<<<<<
 * 
 *     @position.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vertex.position.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_vertex.position.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vertex.position.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->c_vertex.position.w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2129
 * 
 *     @property
 *     def position(self) -> vec4:             # <<<<<<<<<<<<<<
 *         return vec4(self.c_vertex.position.x, self.c_vertex.position.y, self.c_vertex.position.z, self.c_vertex.position.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mesh_vertex.position.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2133
 * 
 *     @position.setter
 *     def position(self, value: vec4):             # <<<<<<<<<<<<<<
 *         self.c_vertex.position.x = value.x
 *         self.c_vertex.position.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_11mesh_vertex_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_11mesh_vertex_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec4, 1, "value", 0))) __PYX_ERR(0, 2133, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_8position_2__set__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec4 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_11mesh_vertex_8position_2__set__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":2134
 *     @position.setter
 *     def position(self, value: vec4):
 *         self.c_vertex.position.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_vertex.position.y = value.y
 *         self.c_vertex.position.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2134, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.position.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":2135
 *     def position(self, value: vec4):
 *         self.c_vertex.position.x = value.x
 *         self.c_vertex.position.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_vertex.position.z = value.z
 *         self.c_vertex.position.w = value.w
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.position.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":2136
 *         self.c_vertex.position.x = value.x
 *         self.c_vertex.position.y = value.y
 *         self.c_vertex.position.z = value.z             # <<<<<<<<<<<<<<
 *         self.c_vertex.position.w = value.w
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2136, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.position.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":2137
 *         self.c_vertex.position.y = value.y
 *         self.c_vertex.position.z = value.z
 *         self.c_vertex.position.w = value.w             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.position.w = __pyx_t_2;

  /* "cgl_wrapper.pyx":2133
 * 
 *     @position.setter
 *     def position(self, value: vec4):             # <<<<<<<<<<<<<<
 *         self.c_vertex.position.x = value.x
 *         self.c_vertex.position.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_vertex.position.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2140
 * 
 *     @property
 *     def normal(self) -> vec4:             # <<<<<<<<<<<<<<
 *         return vec4(self.c_vertex.normal.x, self.c_vertex.normal.y, self.c_vertex.normal.z, self.c_vertex.normal.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11mesh_vertex_6normal_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_11mesh_vertex_6normal_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_6normal___get__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11mesh_vertex_6normal___get__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2141
 *     @property
 *     def normal(self) -> vec4:
 *         return vec4(self.c_vertex.normal.x, self.c_vertex.normal.y, self.c_vertex.normal.z, self.c_vertex.normal.w)             # <<<<<<<<<<<<<<
 * 
 *     @normal.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vertex.normal.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_vertex.normal.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vertex.normal.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->c_vertex.normal.w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2140
 * 
 *     @property
 *     def normal(self) -> vec4:             # <<<<<<<<<<<<<<
 *         return vec4(self.c_vertex.normal.x, self.c_vertex.normal.y, self.c_vertex.normal.z, self.c_vertex.normal.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mesh_vertex.normal.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2144
 * 
 *     @normal.setter
 *     def normal(self, value: vec4):             # <<<<<<<<<<<<<<
 *         self.c_vertex.normal.x = value.x
 *         self.c_vertex.normal.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_11mesh_vertex_6normal_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_11mesh_vertex_6normal_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec4, 1, "value", 0))) __PYX_ERR(0, 2144, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_6normal_2__set__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec4 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_11mesh_vertex_6normal_2__set__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":2145
 *     @normal.setter
 *     def normal(self, value: vec4):
 *         self.c_vertex.normal.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_vertex.normal.y = value.y
 *         self.c_vertex.normal.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2145, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.normal.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":2146
 *     def normal(self, value: vec4):
 *         self.c_vertex.normal.x = value.x
 *         self.c_vertex.normal.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_vertex.normal.z = value.z
 *         self.c_vertex.normal.w = value.w
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2146, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.normal.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":2147
 *         self.c_vertex.normal.x = value.x
 *         self.c_vertex.normal.y = value.y
 *         self.c_vertex.normal.z = value.z             # <<<<<<<<<<<<<<
 *         self.c_vertex.normal.w = value.w
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.normal.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":2148
 *         self.c_vertex.normal.y = value.y
 *         self.c_vertex.normal.z = value.z
 *         self.c_vertex.normal.w = value.w             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2148, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.normal.w = __pyx_t_2;

  /* "cgl_wrapper.pyx":2144
 * 
 *     @normal.setter
 *     def normal(self, value: vec4):             # <<<<<<<<<<<<<<
 *         self.c_vertex.normal.x = value.x
 *         self.c_vertex.normal.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_vertex.normal.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2151
 * 
 *     @property
 *     def texture_coordinates(self) -> vec4:             # <<<<<<<<<<<<<<
 *         return vec4(self.c_vertex.texture_coordinates.x, self.c_vertex.texture_coordinates.y, self.c_vertex.texture_coordinates.z, self.c_vertex.texture_coordinates.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11mesh_vertex_19texture_coordinates_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_11mesh_vertex_19texture_coordinates_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_19texture_coordinates___get__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11mesh_vertex_19texture_coordinates___get__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2152
 *     @property
 *     def texture_coordinates(self) -> vec4:
 *         return vec4(self.c_vertex.texture_coordinates.x, self.c_vertex.texture_coordinates.y, self.c_vertex.texture_coordinates.z, self.c_vertex.texture_coordinates.w)             # <<<<<<<<<<<<<<
 * 
 *     @texture_coordinates.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vertex.texture_coordinates.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_vertex.texture_coordinates.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vertex.texture_coordinates.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->c_vertex.texture_coordinates.w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2151
 * 
 *     @property
 *     def texture_coordinates(self) -> vec4:             # <<<<<<<<<<<<<<
 *         return vec4(self.c_vertex.texture_coordinates.x, self.c_vertex.texture_coordinates.y, self.c_vertex.texture_coordinates.z, self.c_vertex.texture_coordinates.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mesh_vertex.texture_coordinates.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2155
 * 
 *     @texture_coordinates.setter
 *     def texture_coordinates(self, value: vec4):             # <<<<<<<<<<<<<<
 *         self.c_vertex.texture_coordinates.x = value.x
 *         self.c_vertex.texture_coordinates.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_11mesh_vertex_19texture_coordinates_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_11mesh_vertex_19texture_coordinates_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec4, 1, "value", 0))) __PYX_ERR(0, 2155, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_19texture_coordinates_2__set__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec4 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_11mesh_vertex_19texture_coordinates_2__set__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":2156
 *     @texture_coordinates.setter
 *     def texture_coordinates(self, value: vec4):
 *         self.c_vertex.texture_coordinates.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_vertex.texture_coordinates.y = value.y
 *         self.c_vertex.texture_coordinates.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.texture_coordinates.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":2157
 *     def texture_coordinates(self, value: vec4):
 *         self.c_vertex.texture_coordinates.x = value.x
 *         self.c_vertex.texture_coordinates.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_vertex.texture_coordinates.z = value.z
 *         self.c_vertex.texture_coordinates.w = value.w
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.texture_coordinates.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":2158
 *         self.c_vertex.texture_coordinates.x = value.x
 *         self.c_vertex.texture_coordinates.y = value.y
 *         self.c_vertex.texture_coordinates.z = value.z             # <<<<<<<<<<<<<<
 *         self.c_vertex.texture_coordinates.w = value.w
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2158, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.texture_coordinates.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":2159
 *         self.c_vertex.texture_coordinates.y = value.y
 *         self.c_vertex.texture_coordinates.z = value.z
 *         self.c_vertex.texture_coordinates.w = value.w             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2159, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.texture_coordinates.w = __pyx_t_2;

  /* "cgl_wrapper.pyx":2155
 * 
 *     @texture_coordinates.setter
 *     def texture_coordinates(self, value: vec4):             # <<<<<<<<<<<<<<
 *         self.c_vertex.texture_coordinates.x = value.x
 *         self.c_vertex.texture_coordinates.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_vertex.texture_coordinates.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2162
 * 
 *     @property
 *     def bone_wieghts(self) -> vec4:             # <<<<<<<<<<<<<<
 *         return vec4(self.c_vertex.bone_wieghts.x, self.c_vertex.bone_wieghts.y, self.c_vertex.bone_wieghts.z, self.c_vertex.bone_wieghts.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11mesh_vertex_12bone_wieghts_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_11mesh_vertex_12bone_wieghts_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_12bone_wieghts___get__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11mesh_vertex_12bone_wieghts___get__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2163
 *     @property
 *     def bone_wieghts(self) -> vec4:
 *         return vec4(self.c_vertex.bone_wieghts.x, self.c_vertex.bone_wieghts.y, self.c_vertex.bone_wieghts.z, self.c_vertex.bone_wieghts.w)             # <<<<<<<<<<<<<<
 * 
 *     @bone_wieghts.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_vertex.bone_wieghts.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_vertex.bone_wieghts.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_vertex.bone_wieghts.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->c_vertex.bone_wieghts.w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec4), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2162
 * 
 *     @property
 *     def bone_wieghts(self) -> vec4:             # <<<<<<<<<<<<<<
 *         return vec4(self.c_vertex.bone_wieghts.x, self.c_vertex.bone_wieghts.y, self.c_vertex.bone_wieghts.z, self.c_vertex.bone_wieghts.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mesh_vertex.bone_wieghts.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2166
 * 
 *     @bone_wieghts.setter
 *     def bone_wieghts(self, value: vec4):             # <<<<<<<<<<<<<<
 *         self.c_vertex.bone_wieghts.x = value.x
 *         self.c_vertex.bone_wieghts.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_11mesh_vertex_12bone_wieghts_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_11mesh_vertex_12bone_wieghts_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec4, 1, "value", 0))) __PYX_ERR(0, 2166, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_12bone_wieghts_2__set__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec4 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_11mesh_vertex_12bone_wieghts_2__set__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, struct __pyx_obj_3cgl_vec4 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":2167
 *     @bone_wieghts.setter
 *     def bone_wieghts(self, value: vec4):
 *         self.c_vertex.bone_wieghts.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_vertex.bone_wieghts.y = value.y
 *         self.c_vertex.bone_wieghts.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.bone_wieghts.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":2168
 *     def bone_wieghts(self, value: vec4):
 *         self.c_vertex.bone_wieghts.x = value.x
 *         self.c_vertex.bone_wieghts.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_vertex.bone_wieghts.z = value.z
 *         self.c_vertex.bone_wieghts.w = value.w
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2168, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.bone_wieghts.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":2169
 *         self.c_vertex.bone_wieghts.x = value.x
 *         self.c_vertex.bone_wieghts.y = value.y
 *         self.c_vertex.bone_wieghts.z = value.z             # <<<<<<<<<<<<<<
 *         self.c_vertex.bone_wieghts.w = value.w
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2169, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.bone_wieghts.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":2170
 *         self.c_vertex.bone_wieghts.y = value.y
 *         self.c_vertex.bone_wieghts.z = value.z
 *         self.c_vertex.bone_wieghts.w = value.w             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2170, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2170, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.bone_wieghts.w = __pyx_t_2;

  /* "cgl_wrapper.pyx":2166
 * 
 *     @bone_wieghts.setter
 *     def bone_wieghts(self, value: vec4):             # <<<<<<<<<<<<<<
 *         self.c_vertex.bone_wieghts.x = value.x
 *         self.c_vertex.bone_wieghts.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_vertex.bone_wieghts.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2173
 * 
 *     @property
 *     def bone_ids(self) -> ivec4:             # <<<<<<<<<<<<<<
 *         return ivec4(self.c_vertex.bone_ids.x, self.c_vertex.bone_ids.y, self.c_vertex.bone_ids.z, self.c_vertex.bone_ids.w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11mesh_vertex_8bone_ids_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_11mesh_vertex_8bone_ids_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_8bone_ids___get__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11mesh_vertex_8bone_ids___get__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2174
 *     @property
 *     def bone_ids(self) -> ivec4:
 *         return ivec4(self.c_vertex.bone_ids.x, self.c_vertex.bone_ids.y, self.c_vertex.bone_ids.z, self.c_vertex.bone_ids.w)             # <<<<<<<<<<<<<<
 * 
 *     @bone_ids.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_vertex.bone_ids.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_vertex.bone_ids.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_vertex.bone_ids.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_vertex.bone_ids.w); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_ivec4), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2173
 * 
 *     @property
 *     def bone_ids(self) -> ivec4:             # <<<<<<<<<<<<<<
 *         return ivec4(self.c_vertex.bone_ids.x, self.c_vertex.bone_ids.y, self.c_vertex.bone_ids.z, self.c_vertex.bone_ids.w)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mesh_vertex.bone_ids.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2177
 * 
 *     @bone_ids.setter
 *     def bone_ids(self, value: ivec4):             # <<<<<<<<<<<<<<
 *         self.c_vertex.bone_ids.x = value.x
 *         self.c_vertex.bone_ids.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_11mesh_vertex_8bone_ids_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_11mesh_vertex_8bone_ids_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_ivec4, 1, "value", 0))) __PYX_ERR(0, 2177, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_8bone_ids_2__set__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self), ((struct __pyx_obj_3cgl_ivec4 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_11mesh_vertex_8bone_ids_2__set__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, struct __pyx_obj_3cgl_ivec4 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":2178
 *     @bone_ids.setter
 *     def bone_ids(self, value: ivec4):
 *         self.c_vertex.bone_ids.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_vertex.bone_ids.y = value.y
 *         self.c_vertex.bone_ids.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.bone_ids.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":2179
 *     def bone_ids(self, value: ivec4):
 *         self.c_vertex.bone_ids.x = value.x
 *         self.c_vertex.bone_ids.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_vertex.bone_ids.z = value.z
 *         self.c_vertex.bone_ids.w = value.w
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2179, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.bone_ids.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":2180
 *         self.c_vertex.bone_ids.x = value.x
 *         self.c_vertex.bone_ids.y = value.y
 *         self.c_vertex.bone_ids.z = value.z             # <<<<<<<<<<<<<<
 *         self.c_vertex.bone_ids.w = value.w
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2180, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.bone_ids.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":2181
 *         self.c_vertex.bone_ids.y = value.y
 *         self.c_vertex.bone_ids.z = value.z
 *         self.c_vertex.bone_ids.w = value.w             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, c_vertex = None):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_w); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2181, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_vertex.bone_ids.w = __pyx_t_2;

  /* "cgl_wrapper.pyx":2177
 * 
 *     @bone_ids.setter
 *     def bone_ids(self, value: ivec4):             # <<<<<<<<<<<<<<
 *         self.c_vertex.bone_ids.x = value.x
 *         self.c_vertex.bone_ids.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_vertex.bone_ids.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2183
 *         self.c_vertex.bone_ids.w = value.w
 * 
 *     def __init__(self, c_vertex = None):             # <<<<<<<<<<<<<<
 *         if c_vertex is not None:
 *             self.c_vertex = c_vertex
 */

/* Python wrapper */
static int __pyx_pw_3cgl_11mesh_vertex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_11mesh_vertex_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_c_vertex = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_c_vertex,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c_vertex);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2183, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_c_vertex = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2183, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_vertex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex___init__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self), __pyx_v_c_vertex);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_11mesh_vertex___init__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, PyObject *__pyx_v_c_vertex) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  struct CGL_mesh_vertex __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":2184
 * 
 *     def __init__(self, c_vertex = None):
 *         if c_vertex is not None:             # <<<<<<<<<<<<<<
 *             self.c_vertex = c_vertex
 *         else:
 */
  __pyx_t_1 = (__pyx_v_c_vertex != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":2185
 *     def __init__(self, c_vertex = None):
 *         if c_vertex is not None:
 *             self.c_vertex = c_vertex             # <<<<<<<<<<<<<<
 *         else:
 *             self.c_vertex = CGL_mesh_vertex()
 */
    __pyx_t_3 = __pyx_convert__from_py_struct__CGL_mesh_vertex(__pyx_v_c_vertex); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2185, __pyx_L1_error)
    __pyx_v_self->c_vertex = __pyx_t_3;

    /* "cgl_wrapper.pyx":2184
 * 
 *     def __init__(self, c_vertex = None):
 *         if c_vertex is not None:             # <<<<<<<<<<<<<<
 *             self.c_vertex = c_vertex
 *         else:
 */
    goto __pyx_L3;
  }

  /* "cgl_wrapper.pyx":2187
 *             self.c_vertex = c_vertex
 *         else:
 *             self.c_vertex = CGL_mesh_vertex()             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  /*else*/ {
    __pyx_v_self->c_vertex = __pyx_t_3;
  }
  __pyx_L3:;

  /* "cgl_wrapper.pyx":2183
 *         self.c_vertex.bone_ids.w = value.w
 * 
 *     def __init__(self, c_vertex = None):             # <<<<<<<<<<<<<<
 *         if c_vertex is not None:
 *             self.c_vertex = c_vertex
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.mesh_vertex.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2189
 *             self.c_vertex = CGL_mesh_vertex()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.position, self.normal, self.texture_coordinates, self.bone_wieghts, self.bone_ids))
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_11mesh_vertex_3__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_11mesh_vertex_3__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_2__hash__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_11mesh_vertex_2__hash__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_hash_t __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":2190
 * 
 *     def __hash__(self):
 *         return hash((self.position, self.normal, self.texture_coordinates, self.bone_wieghts, self.bone_ids))             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_normal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_texture_coordinates); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bone_wieghts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bone_ids); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_5);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_7 = PyObject_Hash(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_hash_t)-1))) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = __pyx_t_7;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2189
 *             self.c_vertex = CGL_mesh_vertex()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return hash((self.position, self.normal, self.texture_coordinates, self.bone_wieghts, self.bone_ids))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.mesh_vertex.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2192
 *         return hash((self.position, self.normal, self.texture_coordinates, self.bone_wieghts, self.bone_ids))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_vertex({self.position}, {self.normal}, {self.texture_coordinates}, {self.bone_wieghts}, {self.bone_ids})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11mesh_vertex_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_11mesh_vertex_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_4__repr__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11mesh_vertex_4__repr__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":2193
 * 
 *     def __repr__(self):
 *         return f"mesh_vertex({self.position}, {self.normal}, {self.texture_coordinates}, {self.bone_wieghts}, {self.bone_ids})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_mesh_vertex);
  __pyx_t_2 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_mesh_vertex);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_mesh_vertex);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_normal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_texture_coordinates); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bone_wieghts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bone_ids); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2192
 *         return hash((self.position, self.normal, self.texture_coordinates, self.bone_wieghts, self.bone_ids))
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_vertex({self.position}, {self.normal}, {self.texture_coordinates}, {self.bone_wieghts}, {self.bone_ids})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mesh_vertex.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2195
 *         return f"mesh_vertex({self.position}, {self.normal}, {self.texture_coordinates}, {self.bone_wieghts}, {self.bone_ids})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_vertex({self.position}, {self.normal}, {self.texture_coordinates}, {self.bone_wieghts}, {self.bone_ids})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11mesh_vertex_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_11mesh_vertex_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_6__str__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11mesh_vertex_6__str__(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":2196
 * 
 *     def __str__(self):
 *         return f"mesh_vertex({self.position}, {self.normal}, {self.texture_coordinates}, {self.bone_wieghts}, {self.bone_ids})"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_mesh_vertex);
  __pyx_t_2 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_mesh_vertex);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_mesh_vertex);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_normal); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_texture_coordinates); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bone_wieghts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_bone_ids); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2195
 *         return f"mesh_vertex({self.position}, {self.normal}, {self.texture_coordinates}, {self.bone_wieghts}, {self.bone_ids})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_vertex({self.position}, {self.normal}, {self.texture_coordinates}, {self.bone_wieghts}, {self.bone_ids})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mesh_vertex.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11mesh_vertex_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_11mesh_vertex_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_8__reduce_cython__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11mesh_vertex_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_vertex.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11mesh_vertex_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_11mesh_vertex_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11mesh_vertex_10__setstate_cython__(((struct __pyx_obj_3cgl_mesh_vertex *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11mesh_vertex_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_vertex.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2204
 * 
 *     @property
 *     def index_count(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_mesh.index_count
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_11index_count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_11index_count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_11index_count___get__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_11index_count___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2205
 *     @property
 *     def index_count(self) -> int:
 *         return self.c_mesh.index_count             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->c_mesh->index_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2204
 * 
 *     @property
 *     def index_count(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_mesh.index_count
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_cpu.index_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2208
 * 
 *     @property
 *     def index_count_used(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_mesh.index_count_used
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_16index_count_used_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_16index_count_used_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_16index_count_used___get__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_16index_count_used___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2209
 *     @property
 *     def index_count_used(self) -> int:
 *         return self.c_mesh.index_count_used             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->c_mesh->index_count_used); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2208
 * 
 *     @property
 *     def index_count_used(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_mesh.index_count_used
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_cpu.index_count_used.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2212
 * 
 *     @property
 *     def indices(self) -> list:             # <<<<<<<<<<<<<<
 *         return [self.c_mesh.indices[i] for i in range(self.index_count_used)]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_7indices_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_7indices_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_7indices___get__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_7indices___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2213
 *     @property
 *     def indices(self) -> list:
 *         return [self.c_mesh.indices[i] for i in range(self.index_count_used)]             # <<<<<<<<<<<<<<
 * 
 *     @indices.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_index_count_used); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2213, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2213, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2213, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2213, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2213, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2213, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2213, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyInt_From_CGL_uint((__pyx_v_self->c_mesh->indices[__pyx_t_6])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 2213, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2212
 * 
 *     @property
 *     def indices(self) -> list:             # <<<<<<<<<<<<<<
 *         return [self.c_mesh.indices[i] for i in range(self.index_count_used)]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.mesh_cpu.indices.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2216
 * 
 *     @indices.setter
 *     def indices(self, value: list):             # <<<<<<<<<<<<<<
 *         if len(value) > self.index_count:
 *             raise ValueError("The number of indices is greater than the maximum number of indices")
 */

/* Python wrapper */
static int __pyx_pw_3cgl_8mesh_cpu_7indices_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_8mesh_cpu_7indices_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), (&PyList_Type), 1, "value", 1))) __PYX_ERR(0, 2216, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_7indices_2__set__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), ((PyObject*)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_8mesh_cpu_7indices_2__set__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_i = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  CGL_uint __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":2217
 *     @indices.setter
 *     def indices(self, value: list):
 *         if len(value) > self.index_count:             # <<<<<<<<<<<<<<
 *             raise ValueError("The number of indices is greater than the maximum number of indices")
 *         self.c_mesh.index_count_used = len(value)
 */
  if (unlikely(__pyx_v_value == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 2217, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_value); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2217, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_index_count); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2217, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(__pyx_t_5)) {

    /* "cgl_wrapper.pyx":2218
 *     def indices(self, value: list):
 *         if len(value) > self.index_count:
 *             raise ValueError("The number of indices is greater than the maximum number of indices")             # <<<<<<<<<<<<<<
 *         self.c_mesh.index_count_used = len(value)
 *         for i in range(self.index_count_used):
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2218, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 2218, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2217
 *     @indices.setter
 *     def indices(self, value: list):
 *         if len(value) > self.index_count:             # <<<<<<<<<<<<<<
 *             raise ValueError("The number of indices is greater than the maximum number of indices")
 *         self.c_mesh.index_count_used = len(value)
 */
  }

  /* "cgl_wrapper.pyx":2219
 *         if len(value) > self.index_count:
 *             raise ValueError("The number of indices is greater than the maximum number of indices")
 *         self.c_mesh.index_count_used = len(value)             # <<<<<<<<<<<<<<
 *         for i in range(self.index_count_used):
 *             self.c_mesh.indices[i] = value[i]
 */
  if (unlikely(__pyx_v_value == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 2219, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_value); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2219, __pyx_L1_error)
  __pyx_v_self->c_mesh->index_count_used = __pyx_t_1;

  /* "cgl_wrapper.pyx":2220
 *             raise ValueError("The number of indices is greater than the maximum number of indices")
 *         self.c_mesh.index_count_used = len(value)
 *         for i in range(self.index_count_used):             # <<<<<<<<<<<<<<
 *             self.c_mesh.indices[i] = value[i]
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_index_count_used); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2220, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_1 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2220, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2220, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_6)) {
      if (likely(PyList_CheckExact(__pyx_t_4))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 2220, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2220, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 2220, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2220, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_4);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2220, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cgl_wrapper.pyx":2221
 *         self.c_mesh.index_count_used = len(value)
 *         for i in range(self.index_count_used):
 *             self.c_mesh.indices[i] = value[i]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    if (unlikely(__pyx_v_value == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2221, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_value, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyInt_As_CGL_uint(__pyx_t_3); if (unlikely((__pyx_t_7 == ((CGL_uint)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2221, __pyx_L1_error)
    (__pyx_v_self->c_mesh->indices[__pyx_t_8]) = __pyx_t_7;

    /* "cgl_wrapper.pyx":2220
 *             raise ValueError("The number of indices is greater than the maximum number of indices")
 *         self.c_mesh.index_count_used = len(value)
 *         for i in range(self.index_count_used):             # <<<<<<<<<<<<<<
 *             self.c_mesh.indices[i] = value[i]
 * 
 */
  }
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2216
 * 
 *     @indices.setter
 *     def indices(self, value: list):             # <<<<<<<<<<<<<<
 *         if len(value) > self.index_count:
 *             raise ValueError("The number of indices is greater than the maximum number of indices")
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.mesh_cpu.indices.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2224
 * 
 *     @property
 *     def vertex_count(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_mesh.vertex_count
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_12vertex_count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_12vertex_count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_12vertex_count___get__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_12vertex_count___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2225
 *     @property
 *     def vertex_count(self) -> int:
 *         return self.c_mesh.vertex_count             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->c_mesh->vertex_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2225, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2224
 * 
 *     @property
 *     def vertex_count(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_mesh.vertex_count
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_cpu.vertex_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2228
 * 
 *     @property
 *     def vertex_count_used(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_mesh.vertex_count_used
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_17vertex_count_used_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_17vertex_count_used_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_17vertex_count_used___get__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_17vertex_count_used___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2229
 *     @property
 *     def vertex_count_used(self) -> int:
 *         return self.c_mesh.vertex_count_used             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t(__pyx_v_self->c_mesh->vertex_count_used); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2229, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2228
 * 
 *     @property
 *     def vertex_count_used(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_mesh.vertex_count_used
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_cpu.vertex_count_used.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2232
 * 
 *     @property
 *     def vertices(self) -> list:             # <<<<<<<<<<<<<<
 *         return [mesh_vertex(self.c_mesh.vertices[i]) for i in range(self.vertex_count_used)]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_8vertices_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_8vertices_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_8vertices___get__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_8vertices___get__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  Py_ssize_t __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2233
 *     @property
 *     def vertices(self) -> list:
 *         return [mesh_vertex(self.c_mesh.vertices[i]) for i in range(self.vertex_count_used)]             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertex_count_used); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2233, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2233, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_5)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2233, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2233, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2233, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2233, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2233, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2233, __pyx_L1_error)
    __pyx_t_3 = __pyx_convert__to_py_struct__CGL_mesh_vertex((__pyx_v_self->c_mesh->vertices[__pyx_t_6])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3cgl_mesh_vertex), __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2233, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 2233, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2232
 * 
 *     @property
 *     def vertices(self) -> list:             # <<<<<<<<<<<<<<
 *         return [mesh_vertex(self.c_mesh.vertices[i]) for i in range(self.vertex_count_used)]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cgl.mesh_cpu.vertices.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2235
 *         return [mesh_vertex(self.c_mesh.vertices[i]) for i in range(self.vertex_count_used)]
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_mesh = NULL
 *         self.has_been_destroyed = True
 */

/* Python wrapper */
static int __pyx_pw_3cgl_8mesh_cpu_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_8mesh_cpu_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu___init__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_8mesh_cpu___init__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":2236
 * 
 *     def __init__(self):
 *         self.c_mesh = NULL             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = True
 * 
 */
  __pyx_v_self->c_mesh = NULL;

  /* "cgl_wrapper.pyx":2237
 *     def __init__(self):
 *         self.c_mesh = NULL
 *         self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->has_been_destroyed = 1;

  /* "cgl_wrapper.pyx":2235
 *         return [mesh_vertex(self.c_mesh.vertices[i]) for i in range(self.vertex_count_used)]
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_mesh = NULL
 *         self.has_been_destroyed = True
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2239
 *         self.has_been_destroyed = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_8mesh_cpu_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_8mesh_cpu_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_8mesh_cpu_2__dealloc__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_8mesh_cpu_2__dealloc__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":2240
 * 
 *     def __dealloc__(self):
 *         self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2239
 *         self.has_been_destroyed = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("cgl.mesh_cpu.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":2242
 *         self.destroy()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return <int><CGL_ulong>self.c_mesh
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_8mesh_cpu_5__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_8mesh_cpu_5__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_4__hash__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_8mesh_cpu_4__hash__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":2243
 * 
 *     def __hash__(self):
 *         return <int><CGL_ulong>self.c_mesh             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = ((int)((CGL_ulong)__pyx_v_self->c_mesh));
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2242
 *         self.destroy()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return <int><CGL_ulong>self.c_mesh
 * 
 */

  /* function exit code */
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2245
 *         return <int><CGL_ulong>self.c_mesh
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_cpu({self.index_count}, {self.index_count_used}, {self.vertex_count}, {self.vertex_count_used})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_6__repr__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_6__repr__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":2246
 * 
 *     def __repr__(self):
 *         return f"mesh_cpu({self.index_count}, {self.index_count_used}, {self.vertex_count}, {self.vertex_count_used})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_mesh_cpu);
  __pyx_t_2 += 9;
  __Pyx_GIVEREF(__pyx_kp_u_mesh_cpu);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_mesh_cpu);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_index_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_index_count_used); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertex_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertex_count_used); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2245
 *         return <int><CGL_ulong>self.c_mesh
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_cpu({self.index_count}, {self.index_count_used}, {self.vertex_count}, {self.vertex_count_used})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mesh_cpu.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2248
 *         return f"mesh_cpu({self.index_count}, {self.index_count_used}, {self.vertex_count}, {self.vertex_count_used})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_cpu({self.index_count}, {self.index_count_used}, {self.vertex_count}, {self.vertex_count_used})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_9__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_9__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_8__str__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_8__str__(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":2249
 * 
 *     def __str__(self):
 *         return f"mesh_cpu({self.index_count}, {self.index_count_used}, {self.vertex_count}, {self.vertex_count_used})"             # <<<<<<<<<<<<<<
 * 
 *     cdef set_c_mesh(self, CGL_mesh_cpu* c_mesh):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_mesh_cpu);
  __pyx_t_2 += 9;
  __Pyx_GIVEREF(__pyx_kp_u_mesh_cpu);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_mesh_cpu);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_index_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_index_count_used); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertex_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertex_count_used); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2248
 *         return f"mesh_cpu({self.index_count}, {self.index_count_used}, {self.vertex_count}, {self.vertex_count_used})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_cpu({self.index_count}, {self.index_count_used}, {self.vertex_count}, {self.vertex_count_used})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.mesh_cpu.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2251
 *         return f"mesh_cpu({self.index_count}, {self.index_count_used}, {self.vertex_count}, {self.vertex_count_used})"
 * 
 *     cdef set_c_mesh(self, CGL_mesh_cpu* c_mesh):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

static PyObject *__pyx_f_3cgl_8mesh_cpu_set_c_mesh(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct CGL_mesh_cpu *__pyx_v_c_mesh) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_c_mesh", 0);

  /* "cgl_wrapper.pyx":2252
 * 
 *     cdef set_c_mesh(self, CGL_mesh_cpu* c_mesh):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 *         self.c_mesh = c_mesh
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2253
 *     cdef set_c_mesh(self, CGL_mesh_cpu* c_mesh):
 *         if not self.has_been_destroyed:
 *             self.destroy()             # <<<<<<<<<<<<<<
 *         self.c_mesh = c_mesh
 *         self.has_been_destroyed = False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":2252
 * 
 *     cdef set_c_mesh(self, CGL_mesh_cpu* c_mesh):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 *         self.c_mesh = c_mesh
 */
  }

  /* "cgl_wrapper.pyx":2254
 *         if not self.has_been_destroyed:
 *             self.destroy()
 *         self.c_mesh = c_mesh             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
  __pyx_v_self->c_mesh = __pyx_v_c_mesh;

  /* "cgl_wrapper.pyx":2255
 *             self.destroy()
 *         self.c_mesh = c_mesh
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2251
 *         return f"mesh_cpu({self.index_count}, {self.index_count_used}, {self.vertex_count}, {self.vertex_count_used})"
 * 
 *     cdef set_c_mesh(self, CGL_mesh_cpu* c_mesh):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.mesh_cpu.set_c_mesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2257
 *         self.has_been_destroyed = False
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.has_been_destroyed = True
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_11destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_11destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_10destroy(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_10destroy(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "cgl_wrapper.pyx":2258
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.has_been_destroyed = True
 *             CGL_mesh_cpu_destroy(self.c_mesh)
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2259
 *     def destroy(self):
 *         if not self.has_been_destroyed:
 *             self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 *             CGL_mesh_cpu_destroy(self.c_mesh)
 * 
 */
    __pyx_v_self->has_been_destroyed = 1;

    /* "cgl_wrapper.pyx":2260
 *         if not self.has_been_destroyed:
 *             self.has_been_destroyed = True
 *             CGL_mesh_cpu_destroy(self.c_mesh)             # <<<<<<<<<<<<<<
 * 
 *     def recalculate_normals(self):
 */
    CGL_mesh_cpu_destroy(__pyx_v_self->c_mesh);

    /* "cgl_wrapper.pyx":2258
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.has_been_destroyed = True
 *             CGL_mesh_cpu_destroy(self.c_mesh)
 */
  }

  /* "cgl_wrapper.pyx":2257
 *         self.has_been_destroyed = False
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.has_been_destroyed = True
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2262
 *             CGL_mesh_cpu_destroy(self.c_mesh)
 * 
 *     def recalculate_normals(self):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_recalculate_normals(self.c_mesh)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_13recalculate_normals(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_13recalculate_normals(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("recalculate_normals (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_12recalculate_normals(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_12recalculate_normals(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("recalculate_normals", 0);

  /* "cgl_wrapper.pyx":2263
 * 
 *     def recalculate_normals(self):
 *         CGL_mesh_cpu_recalculate_normals(self.c_mesh)             # <<<<<<<<<<<<<<
 * 
 *     def load_obj(self, path: str):
 */
  (void)(CGL_mesh_cpu_recalculate_normals(__pyx_v_self->c_mesh));

  /* "cgl_wrapper.pyx":2262
 *             CGL_mesh_cpu_destroy(self.c_mesh)
 * 
 *     def recalculate_normals(self):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_recalculate_normals(self.c_mesh)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2265
 *         CGL_mesh_cpu_recalculate_normals(self.c_mesh)
 * 
 *     def load_obj(self, path: str):             # <<<<<<<<<<<<<<
 *         self.c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *         if self.c_mesh == NULL:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_15load_obj(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_15load_obj(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_obj (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 2265, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_14load_obj(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), ((PyObject*)__pyx_v_path));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_14load_obj(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_obj", 0);

  /* "cgl_wrapper.pyx":2266
 * 
 *     def load_obj(self, path: str):
 *         self.c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))             # <<<<<<<<<<<<<<
 *         if self.c_mesh == NULL:
 *             raise RuntimeError("Failed to load mesh from obj file")
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_path, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2266, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2266, __pyx_L1_error)
  __pyx_v_self->c_mesh = CGL_mesh_cpu_load_obj(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2267
 *     def load_obj(self, path: str):
 *         self.c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *         if self.c_mesh == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to load mesh from obj file")
 *         self.has_been_destroyed = False
 */
  __pyx_t_3 = ((__pyx_v_self->c_mesh == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "cgl_wrapper.pyx":2268
 *         self.c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *         if self.c_mesh == NULL:
 *             raise RuntimeError("Failed to load mesh from obj file")             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2268, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2267
 *     def load_obj(self, path: str):
 *         self.c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *         if self.c_mesh == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to load mesh from obj file")
 *         self.has_been_destroyed = False
 */
  }

  /* "cgl_wrapper.pyx":2269
 *         if self.c_mesh == NULL:
 *             raise RuntimeError("Failed to load mesh from obj file")
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 * 
 *     def add_mesh(self, mesh: mesh_cpu):
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2265
 *         CGL_mesh_cpu_recalculate_normals(self.c_mesh)
 * 
 *     def load_obj(self, path: str):             # <<<<<<<<<<<<<<
 *         self.c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *         if self.c_mesh == NULL:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_cpu.load_obj", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2271
 *         self.has_been_destroyed = False
 * 
 *     def add_mesh(self, mesh: mesh_cpu):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_mesh(self.c_mesh, mesh.c_mesh)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_17add_mesh(PyObject *__pyx_v_self, PyObject *__pyx_v_mesh); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_17add_mesh(PyObject *__pyx_v_self, PyObject *__pyx_v_mesh) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_mesh (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh), __pyx_ptype_3cgl_mesh_cpu, 1, "mesh", 0))) __PYX_ERR(0, 2271, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_16add_mesh(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), ((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_mesh));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_16add_mesh(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_mesh) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_mesh", 0);

  /* "cgl_wrapper.pyx":2272
 * 
 *     def add_mesh(self, mesh: mesh_cpu):
 *         CGL_mesh_cpu_add_mesh(self.c_mesh, mesh.c_mesh)             # <<<<<<<<<<<<<<
 * 
 *     def add_cube(self, use_texture_coordinates: bool = True):
 */
  (void)(CGL_mesh_cpu_add_mesh(__pyx_v_self->c_mesh, __pyx_v_mesh->c_mesh));

  /* "cgl_wrapper.pyx":2271
 *         self.has_been_destroyed = False
 * 
 *     def add_mesh(self, mesh: mesh_cpu):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_mesh(self.c_mesh, mesh.c_mesh)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2274
 *         CGL_mesh_cpu_add_mesh(self.c_mesh, mesh.c_mesh)
 * 
 *     def add_cube(self, use_texture_coordinates: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_cube(self.c_mesh, use_texture_coordinates)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_19add_cube(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_19add_cube(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  bool __pyx_v_use_texture_coordinates;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_cube (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_use_texture_coordinates,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_use_texture_coordinates);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_cube") < 0)) __PYX_ERR(0, 2274, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    if (values[0]) {
      __pyx_v_use_texture_coordinates = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_use_texture_coordinates == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2274, __pyx_L3_error)
    } else {
      __pyx_v_use_texture_coordinates = ((bool)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_cube", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2274, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu.add_cube", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_18add_cube(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), __pyx_v_use_texture_coordinates);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_18add_cube(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, bool __pyx_v_use_texture_coordinates) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_cube", 0);

  /* "cgl_wrapper.pyx":2275
 * 
 *     def add_cube(self, use_texture_coordinates: bool = True):
 *         CGL_mesh_cpu_add_cube(self.c_mesh, use_texture_coordinates)             # <<<<<<<<<<<<<<
 * 
 *     def add_triangle(self, a: vec3, b: vec3, c: vec3):
 */
  (void)(CGL_mesh_cpu_add_cube(__pyx_v_self->c_mesh, __pyx_v_use_texture_coordinates));

  /* "cgl_wrapper.pyx":2274
 *         CGL_mesh_cpu_add_mesh(self.c_mesh, mesh.c_mesh)
 * 
 *     def add_cube(self, use_texture_coordinates: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_cube(self.c_mesh, use_texture_coordinates)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2277
 *         CGL_mesh_cpu_add_cube(self.c_mesh, use_texture_coordinates)
 * 
 *     def add_triangle(self, a: vec3, b: vec3, c: vec3):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_triangle(self.c_mesh, a.c_vec3, b.c_vec3, c.c_vec3)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_21add_triangle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_21add_triangle(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_c = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_triangle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_triangle", 1, 3, 3, 1); __PYX_ERR(0, 2277, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_triangle", 1, 3, 3, 2); __PYX_ERR(0, 2277, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_triangle") < 0)) __PYX_ERR(0, 2277, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_triangle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2277, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu.add_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec3, 1, "a", 0))) __PYX_ERR(0, 2277, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec3, 1, "b", 0))) __PYX_ERR(0, 2277, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec3, 1, "c", 0))) __PYX_ERR(0, 2277, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_20add_triangle(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), __pyx_v_a, __pyx_v_b, __pyx_v_c);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_20add_triangle(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_triangle", 0);

  /* "cgl_wrapper.pyx":2278
 * 
 *     def add_triangle(self, a: vec3, b: vec3, c: vec3):
 *         CGL_mesh_cpu_add_triangle(self.c_mesh, a.c_vec3, b.c_vec3, c.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     def add_quad(self, a: vec3, b: vec3, c: vec3, d: vec3):
 */
  (void)(CGL_mesh_cpu_add_triangle(__pyx_v_self->c_mesh, __pyx_v_a->c_vec3, __pyx_v_b->c_vec3, __pyx_v_c->c_vec3));

  /* "cgl_wrapper.pyx":2277
 *         CGL_mesh_cpu_add_cube(self.c_mesh, use_texture_coordinates)
 * 
 *     def add_triangle(self, a: vec3, b: vec3, c: vec3):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_triangle(self.c_mesh, a.c_vec3, b.c_vec3, c.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2280
 *         CGL_mesh_cpu_add_triangle(self.c_mesh, a.c_vec3, b.c_vec3, c.c_vec3)
 * 
 *     def add_quad(self, a: vec3, b: vec3, c: vec3, d: vec3):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_quad(self.c_mesh, a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_23add_quad(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_23add_quad(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_c = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_d = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_quad (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,&__pyx_n_s_d,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad", 1, 4, 4, 1); __PYX_ERR(0, 2280, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad", 1, 4, 4, 2); __PYX_ERR(0, 2280, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad", 1, 4, 4, 3); __PYX_ERR(0, 2280, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_quad") < 0)) __PYX_ERR(0, 2280, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
    __pyx_v_d = ((struct __pyx_obj_3cgl_vec3 *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_quad", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2280, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu.add_quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec3, 1, "a", 0))) __PYX_ERR(0, 2280, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec3, 1, "b", 0))) __PYX_ERR(0, 2280, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec3, 1, "c", 0))) __PYX_ERR(0, 2280, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_d), __pyx_ptype_3cgl_vec3, 1, "d", 0))) __PYX_ERR(0, 2280, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_22add_quad(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), __pyx_v_a, __pyx_v_b, __pyx_v_c, __pyx_v_d);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_22add_quad(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c, struct __pyx_obj_3cgl_vec3 *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_quad", 0);

  /* "cgl_wrapper.pyx":2281
 * 
 *     def add_quad(self, a: vec3, b: vec3, c: vec3, d: vec3):
 *         CGL_mesh_cpu_add_quad(self.c_mesh, a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     def add_sphere(self, res_u: int, res_v: int):
 */
  (void)(CGL_mesh_cpu_add_quad(__pyx_v_self->c_mesh, __pyx_v_a->c_vec3, __pyx_v_b->c_vec3, __pyx_v_c->c_vec3, __pyx_v_d->c_vec3));

  /* "cgl_wrapper.pyx":2280
 *         CGL_mesh_cpu_add_triangle(self.c_mesh, a.c_vec3, b.c_vec3, c.c_vec3)
 * 
 *     def add_quad(self, a: vec3, b: vec3, c: vec3, d: vec3):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_quad(self.c_mesh, a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2283
 *         CGL_mesh_cpu_add_quad(self.c_mesh, a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 * 
 *     def add_sphere(self, res_u: int, res_v: int):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_sphere(self.c_mesh, res_u, res_v)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_25add_sphere(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_25add_sphere(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_res_u = 0;
  PyObject *__pyx_v_res_v = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_sphere (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_res_u,&__pyx_n_s_res_v,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res_u)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res_v)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_sphere", 1, 2, 2, 1); __PYX_ERR(0, 2283, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_sphere") < 0)) __PYX_ERR(0, 2283, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_res_u = values[0];
    __pyx_v_res_v = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_sphere", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2283, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu.add_sphere", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_24add_sphere(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), __pyx_v_res_u, __pyx_v_res_v);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_24add_sphere(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, PyObject *__pyx_v_res_u, PyObject *__pyx_v_res_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_sphere", 0);

  /* "cgl_wrapper.pyx":2284
 * 
 *     def add_sphere(self, res_u: int, res_v: int):
 *         CGL_mesh_cpu_add_sphere(self.c_mesh, res_u, res_v)             # <<<<<<<<<<<<<<
 * 
 *     def add_cylinder(self, start: vec3, end: vec3, radius0: float, radius1: float, res: int):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_res_u); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2284, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_res_v); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2284, __pyx_L1_error)
  (void)(CGL_mesh_cpu_add_sphere(__pyx_v_self->c_mesh, __pyx_t_1, __pyx_t_2));

  /* "cgl_wrapper.pyx":2283
 *         CGL_mesh_cpu_add_quad(self.c_mesh, a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 * 
 *     def add_sphere(self, res_u: int, res_v: int):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_sphere(self.c_mesh, res_u, res_v)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu.add_sphere", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2286
 *         CGL_mesh_cpu_add_sphere(self.c_mesh, res_u, res_v)
 * 
 *     def add_cylinder(self, start: vec3, end: vec3, radius0: float, radius1: float, res: int):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_cylinder(self.c_mesh, start.c_vec3, end.c_vec3, radius0, radius1, res)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_27add_cylinder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_27add_cylinder(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_start = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_end = 0;
  double __pyx_v_radius0;
  double __pyx_v_radius1;
  PyObject *__pyx_v_res = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_cylinder (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_radius0,&__pyx_n_s_radius1,&__pyx_n_s_res,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cylinder", 1, 5, 5, 1); __PYX_ERR(0, 2286, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius0)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cylinder", 1, 5, 5, 2); __PYX_ERR(0, 2286, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cylinder", 1, 5, 5, 3); __PYX_ERR(0, 2286, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cylinder", 1, 5, 5, 4); __PYX_ERR(0, 2286, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_cylinder") < 0)) __PYX_ERR(0, 2286, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_start = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_end = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_radius0 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_radius0 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2286, __pyx_L3_error)
    __pyx_v_radius1 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_radius1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2286, __pyx_L3_error)
    __pyx_v_res = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_cylinder", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2286, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu.add_cylinder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), __pyx_ptype_3cgl_vec3, 1, "start", 0))) __PYX_ERR(0, 2286, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_end), __pyx_ptype_3cgl_vec3, 1, "end", 0))) __PYX_ERR(0, 2286, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_26add_cylinder(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), __pyx_v_start, __pyx_v_end, __pyx_v_radius0, __pyx_v_radius1, __pyx_v_res);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_26add_cylinder(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec3 *__pyx_v_end, double __pyx_v_radius0, double __pyx_v_radius1, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_cylinder", 0);

  /* "cgl_wrapper.pyx":2287
 * 
 *     def add_cylinder(self, start: vec3, end: vec3, radius0: float, radius1: float, res: int):
 *         CGL_mesh_cpu_add_cylinder(self.c_mesh, start.c_vec3, end.c_vec3, radius0, radius1, res)             # <<<<<<<<<<<<<<
 * 
 *     def offset_vetices(self, offset: vec3):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_res); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2287, __pyx_L1_error)
  (void)(CGL_mesh_cpu_add_cylinder(__pyx_v_self->c_mesh, __pyx_v_start->c_vec3, __pyx_v_end->c_vec3, __pyx_v_radius0, __pyx_v_radius1, __pyx_t_1));

  /* "cgl_wrapper.pyx":2286
 *         CGL_mesh_cpu_add_sphere(self.c_mesh, res_u, res_v)
 * 
 *     def add_cylinder(self, start: vec3, end: vec3, radius0: float, radius1: float, res: int):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_add_cylinder(self.c_mesh, start.c_vec3, end.c_vec3, radius0, radius1, res)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu.add_cylinder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2289
 *         CGL_mesh_cpu_add_cylinder(self.c_mesh, start.c_vec3, end.c_vec3, radius0, radius1, res)
 * 
 *     def offset_vetices(self, offset: vec3):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_offset_vertices(self.c_mesh, offset.c_vec3)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_29offset_vetices(PyObject *__pyx_v_self, PyObject *__pyx_v_offset); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_29offset_vetices(PyObject *__pyx_v_self, PyObject *__pyx_v_offset) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("offset_vetices (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_offset), __pyx_ptype_3cgl_vec3, 1, "offset", 0))) __PYX_ERR(0, 2289, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_28offset_vetices(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_offset));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_28offset_vetices(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_offset) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("offset_vetices", 0);

  /* "cgl_wrapper.pyx":2290
 * 
 *     def offset_vetices(self, offset: vec3):
 *         CGL_mesh_cpu_offset_vertices(self.c_mesh, offset.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     def scale_vertices(self, scale: float):
 */
  (void)(CGL_mesh_cpu_offset_vertices(__pyx_v_self->c_mesh, __pyx_v_offset->c_vec3));

  /* "cgl_wrapper.pyx":2289
 *         CGL_mesh_cpu_add_cylinder(self.c_mesh, start.c_vec3, end.c_vec3, radius0, radius1, res)
 * 
 *     def offset_vetices(self, offset: vec3):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_offset_vertices(self.c_mesh, offset.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2292
 *         CGL_mesh_cpu_offset_vertices(self.c_mesh, offset.c_vec3)
 * 
 *     def scale_vertices(self, scale: float):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_scale_vertices(self.c_mesh, scale)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_31scale_vertices(PyObject *__pyx_v_self, PyObject *__pyx_arg_scale); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_31scale_vertices(PyObject *__pyx_v_self, PyObject *__pyx_arg_scale) {
  double __pyx_v_scale;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scale_vertices (wrapper)", 0);
  assert(__pyx_arg_scale); {
    __pyx_v_scale = __pyx_PyFloat_AsDouble(__pyx_arg_scale); if (unlikely((__pyx_v_scale == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2292, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu.scale_vertices", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_30scale_vertices(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), ((double)__pyx_v_scale));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_30scale_vertices(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, double __pyx_v_scale) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("scale_vertices", 0);

  /* "cgl_wrapper.pyx":2293
 * 
 *     def scale_vertices(self, scale: float):
 *         CGL_mesh_cpu_scale_vertices(self.c_mesh, scale)             # <<<<<<<<<<<<<<
 * 
 *     # def rotate_vertices(self, rotation: quat):
 */
  (void)(CGL_mesh_cpu_scale_vertices(__pyx_v_self->c_mesh, __pyx_v_scale));

  /* "cgl_wrapper.pyx":2292
 *         CGL_mesh_cpu_offset_vertices(self.c_mesh, offset.c_vec3)
 * 
 *     def scale_vertices(self, scale: float):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_scale_vertices(self.c_mesh, scale)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2298
 *     #     CGL_mesh_cpu_rotate_vertices(self.c_mesh, rotation.c_quat)
 * 
 *     def transform_vertices(self, transform: mat4):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_transform_vertices(self.c_mesh, transform.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_33transform_vertices(PyObject *__pyx_v_self, PyObject *__pyx_v_transform); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_33transform_vertices(PyObject *__pyx_v_self, PyObject *__pyx_v_transform) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transform_vertices (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_transform), __pyx_ptype_3cgl_mat4, 1, "transform", 0))) __PYX_ERR(0, 2298, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_32transform_vertices(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), ((struct __pyx_obj_3cgl_mat4 *)__pyx_v_transform));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_32transform_vertices(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, struct __pyx_obj_3cgl_mat4 *__pyx_v_transform) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("transform_vertices", 0);

  /* "cgl_wrapper.pyx":2299
 * 
 *     def transform_vertices(self, transform: mat4):
 *         CGL_mesh_cpu_transform_vertices(self.c_mesh, transform.c_mat4)             # <<<<<<<<<<<<<<
 * 
 *     def get_c_initialization_code(self, function_name: str = "load_object") -> str:
 */
  (void)(CGL_mesh_cpu_transform_vertices(__pyx_v_self->c_mesh, __pyx_v_transform->c_mat4));

  /* "cgl_wrapper.pyx":2298
 *     #     CGL_mesh_cpu_rotate_vertices(self.c_mesh, rotation.c_quat)
 * 
 *     def transform_vertices(self, transform: mat4):             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_transform_vertices(self.c_mesh, transform.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2301
 *         CGL_mesh_cpu_transform_vertices(self.c_mesh, transform.c_mat4)
 * 
 *     def get_c_initialization_code(self, function_name: str = "load_object") -> str:             # <<<<<<<<<<<<<<
 *         cdef CGL_byte* buff = <CGL_byte*>stdlib.malloc(1024 * 1024 * 4)
 *         CGL_mesh_cpu_generate_c_initialization_code(self.c_mesh, buff, function_name.encode("utf-8"))
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_35get_c_initialization_code(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_35get_c_initialization_code(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_function_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_c_initialization_code (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_function_name,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject*)__pyx_n_s_load_object);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_function_name);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_c_initialization_code") < 0)) __PYX_ERR(0, 2301, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_function_name = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_c_initialization_code", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2301, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu.get_c_initialization_code", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_function_name), (&PyString_Type), 1, "function_name", 1))) __PYX_ERR(0, 2301, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_34get_c_initialization_code(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), __pyx_v_function_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_34get_c_initialization_code(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, PyObject *__pyx_v_function_name) {
  CGL_byte *__pyx_v_buff;
  PyObject *__pyx_v_byts = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_c_initialization_code", 0);

  /* "cgl_wrapper.pyx":2302
 * 
 *     def get_c_initialization_code(self, function_name: str = "load_object") -> str:
 *         cdef CGL_byte* buff = <CGL_byte*>stdlib.malloc(1024 * 1024 * 4)             # <<<<<<<<<<<<<<
 *         CGL_mesh_cpu_generate_c_initialization_code(self.c_mesh, buff, function_name.encode("utf-8"))
 *         byts = <bytes>buff
 */
  __pyx_v_buff = ((CGL_byte *)malloc(0x400000));

  /* "cgl_wrapper.pyx":2303
 *     def get_c_initialization_code(self, function_name: str = "load_object") -> str:
 *         cdef CGL_byte* buff = <CGL_byte*>stdlib.malloc(1024 * 1024 * 4)
 *         CGL_mesh_cpu_generate_c_initialization_code(self.c_mesh, buff, function_name.encode("utf-8"))             # <<<<<<<<<<<<<<
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_function_name, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2303, __pyx_L1_error)
  CGL_mesh_cpu_generate_c_initialization_code(__pyx_v_self->c_mesh, __pyx_v_buff, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2304
 *         cdef CGL_byte* buff = <CGL_byte*>stdlib.malloc(1024 * 1024 * 4)
 *         CGL_mesh_cpu_generate_c_initialization_code(self.c_mesh, buff, function_name.encode("utf-8"))
 *         byts = <bytes>buff             # <<<<<<<<<<<<<<
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)
 */
  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_buff); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __pyx_t_1;
  __Pyx_INCREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_byts = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2305
 *         CGL_mesh_cpu_generate_c_initialization_code(self.c_mesh, buff, function_name.encode("utf-8"))
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)             # <<<<<<<<<<<<<<
 *         stdlib.free(buff)
 *         return result.decode("utf-8")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_v_byts) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_byts);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2306
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)             # <<<<<<<<<<<<<<
 *         return result.decode("utf-8")
 * 
 */
  free(__pyx_v_buff);

  /* "cgl_wrapper.pyx":2307
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)
 *         return result.decode("utf-8")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_result, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_kp_s_utf_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s_utf_8);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 2307, __pyx_L1_error)
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2301
 *         CGL_mesh_cpu_transform_vertices(self.c_mesh, transform.c_mat4)
 * 
 *     def get_c_initialization_code(self, function_name: str = "load_object") -> str:             # <<<<<<<<<<<<<<
 *         cdef CGL_byte* buff = <CGL_byte*>stdlib.malloc(1024 * 1024 * 4)
 *         CGL_mesh_cpu_generate_c_initialization_code(self.c_mesh, buff, function_name.encode("utf-8"))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.mesh_cpu.get_c_initialization_code", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_byts);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_37__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_37__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_36__reduce_cython__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_36__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_cpu.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_cpu_39__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_cpu_39__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_cpu_38__setstate_cython__(((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_cpu_38__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_cpu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2310
 * 
 * 
 * def mesh_cpu_create(index_count: int, vertex_count: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create(index_count, vertex_count)
 *     if c_mesh == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_183mesh_cpu_create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_183mesh_cpu_create = {"mesh_cpu_create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_183mesh_cpu_create, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_183mesh_cpu_create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_index_count = 0;
  PyObject *__pyx_v_vertex_count = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mesh_cpu_create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index_count,&__pyx_n_s_vertex_count,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index_count)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertex_count)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_create", 1, 2, 2, 1); __PYX_ERR(0, 2310, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mesh_cpu_create") < 0)) __PYX_ERR(0, 2310, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_index_count = values[0];
    __pyx_v_vertex_count = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mesh_cpu_create", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2310, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_182mesh_cpu_create(__pyx_self, __pyx_v_index_count, __pyx_v_vertex_count);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_182mesh_cpu_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_index_count, PyObject *__pyx_v_vertex_count) {
  struct CGL_mesh_cpu *__pyx_v_c_mesh;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mesh_cpu_create", 0);

  /* "cgl_wrapper.pyx":2311
 * 
 * def mesh_cpu_create(index_count: int, vertex_count: int) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create(index_count, vertex_count)             # <<<<<<<<<<<<<<
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create mesh")
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_index_count); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2311, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_vertex_count); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2311, __pyx_L1_error)
  __pyx_v_c_mesh = CGL_mesh_cpu_create(__pyx_t_1, __pyx_t_2);

  /* "cgl_wrapper.pyx":2312
 * def mesh_cpu_create(index_count: int, vertex_count: int) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create(index_count, vertex_count)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create mesh")
 *     res = mesh_cpu()
 */
  __pyx_t_3 = ((__pyx_v_c_mesh == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "cgl_wrapper.pyx":2313
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create(index_count, vertex_count)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2313, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 2313, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2312
 * def mesh_cpu_create(index_count: int, vertex_count: int) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create(index_count, vertex_count)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create mesh")
 *     res = mesh_cpu()
 */
  }

  /* "cgl_wrapper.pyx":2314
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create mesh")
 *     res = mesh_cpu()             # <<<<<<<<<<<<<<
 *     res.set_c_mesh(c_mesh)
 *     return res
 */
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mesh_cpu)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_res = ((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2315
 *         raise RuntimeError("Failed to create mesh")
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_3cgl_mesh_cpu *)__pyx_v_res->__pyx_vtab)->set_c_mesh(__pyx_v_res, __pyx_v_c_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2316
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def mesh_cpu_load_obj(path: str) -> mesh_cpu:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2310
 * 
 * 
 * def mesh_cpu_create(index_count: int, vertex_count: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create(index_count, vertex_count)
 *     if c_mesh == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.mesh_cpu_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2318
 *     return res
 * 
 * def mesh_cpu_load_obj(path: str) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *     if c_mesh == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_185mesh_cpu_load_obj(PyObject *__pyx_self, PyObject *__pyx_v_path); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_185mesh_cpu_load_obj = {"mesh_cpu_load_obj", (PyCFunction)__pyx_pw_3cgl_185mesh_cpu_load_obj, METH_O, 0};
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_185mesh_cpu_load_obj(PyObject *__pyx_self, PyObject *__pyx_v_path) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mesh_cpu_load_obj (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 2318, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_184mesh_cpu_load_obj(__pyx_self, ((PyObject*)__pyx_v_path));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_184mesh_cpu_load_obj(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path) {
  struct CGL_mesh_cpu *__pyx_v_c_mesh;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mesh_cpu_load_obj", 0);

  /* "cgl_wrapper.pyx":2319
 * 
 * def mesh_cpu_load_obj(path: str) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))             # <<<<<<<<<<<<<<
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to load mesh from obj file")
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_path, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2319, __pyx_L1_error)
  __pyx_v_c_mesh = CGL_mesh_cpu_load_obj(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2320
 * def mesh_cpu_load_obj(path: str) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to load mesh from obj file")
 *     res = mesh_cpu()
 */
  __pyx_t_3 = ((__pyx_v_c_mesh == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "cgl_wrapper.pyx":2321
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to load mesh from obj file")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2321, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2321, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2320
 * def mesh_cpu_load_obj(path: str) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to load mesh from obj file")
 *     res = mesh_cpu()
 */
  }

  /* "cgl_wrapper.pyx":2322
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to load mesh from obj file")
 *     res = mesh_cpu()             # <<<<<<<<<<<<<<
 *     res.set_c_mesh(c_mesh)
 *     return res
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mesh_cpu)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_res = ((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2323
 *         raise RuntimeError("Failed to load mesh from obj file")
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_mesh_cpu *)__pyx_v_res->__pyx_vtab)->set_c_mesh(__pyx_v_res, __pyx_v_c_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2324
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def mesh_cpu_triangle(a: vec3, b: vec3, c: vec3) -> mesh_cpu:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2318
 *     return res
 * 
 * def mesh_cpu_load_obj(path: str) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *     if c_mesh == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_cpu_load_obj", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2326
 *     return res
 * 
 * def mesh_cpu_triangle(a: vec3, b: vec3, c: vec3) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 *     if c_mesh == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_187mesh_cpu_triangle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_187mesh_cpu_triangle = {"mesh_cpu_triangle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_187mesh_cpu_triangle, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_187mesh_cpu_triangle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_c = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mesh_cpu_triangle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_triangle", 1, 3, 3, 1); __PYX_ERR(0, 2326, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_triangle", 1, 3, 3, 2); __PYX_ERR(0, 2326, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mesh_cpu_triangle") < 0)) __PYX_ERR(0, 2326, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mesh_cpu_triangle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2326, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec3, 1, "a", 0))) __PYX_ERR(0, 2326, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec3, 1, "b", 0))) __PYX_ERR(0, 2326, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec3, 1, "c", 0))) __PYX_ERR(0, 2326, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_186mesh_cpu_triangle(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_186mesh_cpu_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c) {
  struct CGL_mesh_cpu *__pyx_v_c_mesh;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mesh_cpu_triangle", 0);

  /* "cgl_wrapper.pyx":2327
 * 
 * def mesh_cpu_triangle(a: vec3, b: vec3, c: vec3) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_triangle(a.c_vec3, b.c_vec3, c.c_vec3)             # <<<<<<<<<<<<<<
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create triangle mesh")
 */
  __pyx_v_c_mesh = CGL_mesh_cpu_triangle(__pyx_v_a->c_vec3, __pyx_v_b->c_vec3, __pyx_v_c->c_vec3);

  /* "cgl_wrapper.pyx":2328
 * def mesh_cpu_triangle(a: vec3, b: vec3, c: vec3) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create triangle mesh")
 *     res = mesh_cpu()
 */
  __pyx_t_1 = ((__pyx_v_c_mesh == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":2329
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create triangle mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2329, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2328
 * def mesh_cpu_triangle(a: vec3, b: vec3, c: vec3) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create triangle mesh")
 *     res = mesh_cpu()
 */
  }

  /* "cgl_wrapper.pyx":2330
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create triangle mesh")
 *     res = mesh_cpu()             # <<<<<<<<<<<<<<
 *     res.set_c_mesh(c_mesh)
 *     return res
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mesh_cpu)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2330, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = ((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2331
 *         raise RuntimeError("Failed to create triangle mesh")
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_3cgl_mesh_cpu *)__pyx_v_res->__pyx_vtab)->set_c_mesh(__pyx_v_res, __pyx_v_c_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2331, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2332
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def mesh_cpu_quad(a: vec3, b: vec3, c: vec3, d: vec3) -> mesh_cpu:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2326
 *     return res
 * 
 * def mesh_cpu_triangle(a: vec3, b: vec3, c: vec3) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 *     if c_mesh == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.mesh_cpu_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2334
 *     return res
 * 
 * def mesh_cpu_quad(a: vec3, b: vec3, c: vec3, d: vec3) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 *     if c_mesh == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_189mesh_cpu_quad(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_189mesh_cpu_quad = {"mesh_cpu_quad", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_189mesh_cpu_quad, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_189mesh_cpu_quad(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_c = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_d = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mesh_cpu_quad (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,&__pyx_n_s_d,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_quad", 1, 4, 4, 1); __PYX_ERR(0, 2334, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_quad", 1, 4, 4, 2); __PYX_ERR(0, 2334, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_quad", 1, 4, 4, 3); __PYX_ERR(0, 2334, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mesh_cpu_quad") < 0)) __PYX_ERR(0, 2334, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
    __pyx_v_d = ((struct __pyx_obj_3cgl_vec3 *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mesh_cpu_quad", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2334, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu_quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec3, 1, "a", 0))) __PYX_ERR(0, 2334, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec3, 1, "b", 0))) __PYX_ERR(0, 2334, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec3, 1, "c", 0))) __PYX_ERR(0, 2334, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_d), __pyx_ptype_3cgl_vec3, 1, "d", 0))) __PYX_ERR(0, 2334, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_188mesh_cpu_quad(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c, __pyx_v_d);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_188mesh_cpu_quad(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c, struct __pyx_obj_3cgl_vec3 *__pyx_v_d) {
  struct CGL_mesh_cpu *__pyx_v_c_mesh;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mesh_cpu_quad", 0);

  /* "cgl_wrapper.pyx":2335
 * 
 * def mesh_cpu_quad(a: vec3, b: vec3, c: vec3, d: vec3) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)             # <<<<<<<<<<<<<<
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create quad mesh")
 */
  __pyx_v_c_mesh = CGL_mesh_cpu_quad(__pyx_v_a->c_vec3, __pyx_v_b->c_vec3, __pyx_v_c->c_vec3, __pyx_v_d->c_vec3);

  /* "cgl_wrapper.pyx":2336
 * def mesh_cpu_quad(a: vec3, b: vec3, c: vec3, d: vec3) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create quad mesh")
 *     res = mesh_cpu()
 */
  __pyx_t_1 = ((__pyx_v_c_mesh == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":2337
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create quad mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2337, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2337, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2336
 * def mesh_cpu_quad(a: vec3, b: vec3, c: vec3, d: vec3) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create quad mesh")
 *     res = mesh_cpu()
 */
  }

  /* "cgl_wrapper.pyx":2338
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create quad mesh")
 *     res = mesh_cpu()             # <<<<<<<<<<<<<<
 *     res.set_c_mesh(c_mesh)
 *     return res
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mesh_cpu)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2338, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = ((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2339
 *         raise RuntimeError("Failed to create quad mesh")
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_3cgl_mesh_cpu *)__pyx_v_res->__pyx_vtab)->set_c_mesh(__pyx_v_res, __pyx_v_c_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2340
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def mesh_cpu_plane(front: vec3, right: vec3, resolution: int, scale: float) -> mesh_cpu:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2334
 *     return res
 * 
 * def mesh_cpu_quad(a: vec3, b: vec3, c: vec3, d: vec3) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 *     if c_mesh == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.mesh_cpu_quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2342
 *     return res
 * 
 * def mesh_cpu_plane(front: vec3, right: vec3, resolution: int, scale: float) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_plane(front.c_vec3, right.c_vec3, resolution, scale)
 *     if c_mesh == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_191mesh_cpu_plane(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_191mesh_cpu_plane = {"mesh_cpu_plane", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_191mesh_cpu_plane, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_191mesh_cpu_plane(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_front = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_right = 0;
  PyObject *__pyx_v_resolution = 0;
  double __pyx_v_scale;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mesh_cpu_plane (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_front,&__pyx_n_s_right,&__pyx_n_s_resolution,&__pyx_n_s_scale,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_front)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_plane", 1, 4, 4, 1); __PYX_ERR(0, 2342, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resolution)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_plane", 1, 4, 4, 2); __PYX_ERR(0, 2342, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_plane", 1, 4, 4, 3); __PYX_ERR(0, 2342, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mesh_cpu_plane") < 0)) __PYX_ERR(0, 2342, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_front = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_right = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_resolution = values[2];
    __pyx_v_scale = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_scale == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2342, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mesh_cpu_plane", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2342, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu_plane", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_front), __pyx_ptype_3cgl_vec3, 1, "front", 0))) __PYX_ERR(0, 2342, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_right), __pyx_ptype_3cgl_vec3, 1, "right", 0))) __PYX_ERR(0, 2342, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_190mesh_cpu_plane(__pyx_self, __pyx_v_front, __pyx_v_right, __pyx_v_resolution, __pyx_v_scale);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_190mesh_cpu_plane(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_front, struct __pyx_obj_3cgl_vec3 *__pyx_v_right, PyObject *__pyx_v_resolution, double __pyx_v_scale) {
  struct CGL_mesh_cpu *__pyx_v_c_mesh;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mesh_cpu_plane", 0);

  /* "cgl_wrapper.pyx":2343
 * 
 * def mesh_cpu_plane(front: vec3, right: vec3, resolution: int, scale: float) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_plane(front.c_vec3, right.c_vec3, resolution, scale)             # <<<<<<<<<<<<<<
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create plane mesh")
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_resolution); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2343, __pyx_L1_error)
  __pyx_v_c_mesh = CGL_mesh_cpu_plane(__pyx_v_front->c_vec3, __pyx_v_right->c_vec3, __pyx_t_1, __pyx_v_scale);

  /* "cgl_wrapper.pyx":2344
 * def mesh_cpu_plane(front: vec3, right: vec3, resolution: int, scale: float) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_plane(front.c_vec3, right.c_vec3, resolution, scale)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create plane mesh")
 *     res = mesh_cpu()
 */
  __pyx_t_2 = ((__pyx_v_c_mesh == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":2345
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_plane(front.c_vec3, right.c_vec3, resolution, scale)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create plane mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2345, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2344
 * def mesh_cpu_plane(front: vec3, right: vec3, resolution: int, scale: float) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_plane(front.c_vec3, right.c_vec3, resolution, scale)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create plane mesh")
 *     res = mesh_cpu()
 */
  }

  /* "cgl_wrapper.pyx":2346
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create plane mesh")
 *     res = mesh_cpu()             # <<<<<<<<<<<<<<
 *     res.set_c_mesh(c_mesh)
 *     return res
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mesh_cpu)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_res = ((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2347
 *         raise RuntimeError("Failed to create plane mesh")
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_3cgl_mesh_cpu *)__pyx_v_res->__pyx_vtab)->set_c_mesh(__pyx_v_res, __pyx_v_c_mesh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2347, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2348
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def mesh_cpu_cube(use_3d_tex_coords: bool) -> mesh_cpu:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2342
 *     return res
 * 
 * def mesh_cpu_plane(front: vec3, right: vec3, resolution: int, scale: float) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_plane(front.c_vec3, right.c_vec3, resolution, scale)
 *     if c_mesh == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.mesh_cpu_plane", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2350
 *     return res
 * 
 * def mesh_cpu_cube(use_3d_tex_coords: bool) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_cube(use_3d_tex_coords)
 *     if c_mesh == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_193mesh_cpu_cube(PyObject *__pyx_self, PyObject *__pyx_arg_use_3d_tex_coords); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_193mesh_cpu_cube = {"mesh_cpu_cube", (PyCFunction)__pyx_pw_3cgl_193mesh_cpu_cube, METH_O, 0};
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_193mesh_cpu_cube(PyObject *__pyx_self, PyObject *__pyx_arg_use_3d_tex_coords) {
  bool __pyx_v_use_3d_tex_coords;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mesh_cpu_cube (wrapper)", 0);
  assert(__pyx_arg_use_3d_tex_coords); {
    __pyx_v_use_3d_tex_coords = __Pyx_PyObject_IsTrue(__pyx_arg_use_3d_tex_coords); if (unlikely((__pyx_v_use_3d_tex_coords == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2350, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu_cube", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_192mesh_cpu_cube(__pyx_self, ((bool)__pyx_v_use_3d_tex_coords));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_192mesh_cpu_cube(CYTHON_UNUSED PyObject *__pyx_self, bool __pyx_v_use_3d_tex_coords) {
  struct CGL_mesh_cpu *__pyx_v_c_mesh;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mesh_cpu_cube", 0);

  /* "cgl_wrapper.pyx":2351
 * 
 * def mesh_cpu_cube(use_3d_tex_coords: bool) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_cube(use_3d_tex_coords)             # <<<<<<<<<<<<<<
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create cube mesh")
 */
  __pyx_v_c_mesh = CGL_mesh_cpu_cube(__pyx_v_use_3d_tex_coords);

  /* "cgl_wrapper.pyx":2352
 * def mesh_cpu_cube(use_3d_tex_coords: bool) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_cube(use_3d_tex_coords)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create cube mesh")
 *     res = mesh_cpu()
 */
  __pyx_t_1 = ((__pyx_v_c_mesh == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":2353
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_cube(use_3d_tex_coords)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create cube mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2353, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2353, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2352
 * def mesh_cpu_cube(use_3d_tex_coords: bool) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_cube(use_3d_tex_coords)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create cube mesh")
 *     res = mesh_cpu()
 */
  }

  /* "cgl_wrapper.pyx":2354
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create cube mesh")
 *     res = mesh_cpu()             # <<<<<<<<<<<<<<
 *     res.set_c_mesh(c_mesh)
 *     return res
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mesh_cpu)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = ((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2355
 *         raise RuntimeError("Failed to create cube mesh")
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_3cgl_mesh_cpu *)__pyx_v_res->__pyx_vtab)->set_c_mesh(__pyx_v_res, __pyx_v_c_mesh); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2355, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2356
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def mesh_cpu_sphere(res_u: int, res_v: int) -> mesh_cpu:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2350
 *     return res
 * 
 * def mesh_cpu_cube(use_3d_tex_coords: bool) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_cube(use_3d_tex_coords)
 *     if c_mesh == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.mesh_cpu_cube", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2358
 *     return res
 * 
 * def mesh_cpu_sphere(res_u: int, res_v: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_sphere(res_u, res_v)
 *     if c_mesh == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_195mesh_cpu_sphere(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_195mesh_cpu_sphere = {"mesh_cpu_sphere", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_195mesh_cpu_sphere, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_195mesh_cpu_sphere(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_res_u = 0;
  PyObject *__pyx_v_res_v = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mesh_cpu_sphere (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_res_u,&__pyx_n_s_res_v,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res_u)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res_v)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_sphere", 1, 2, 2, 1); __PYX_ERR(0, 2358, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mesh_cpu_sphere") < 0)) __PYX_ERR(0, 2358, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_res_u = values[0];
    __pyx_v_res_v = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mesh_cpu_sphere", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2358, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu_sphere", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_194mesh_cpu_sphere(__pyx_self, __pyx_v_res_u, __pyx_v_res_v);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_194mesh_cpu_sphere(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_res_u, PyObject *__pyx_v_res_v) {
  struct CGL_mesh_cpu *__pyx_v_c_mesh;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mesh_cpu_sphere", 0);

  /* "cgl_wrapper.pyx":2359
 * 
 * def mesh_cpu_sphere(res_u: int, res_v: int) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_sphere(res_u, res_v)             # <<<<<<<<<<<<<<
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create sphere mesh")
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_res_u); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2359, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_res_v); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2359, __pyx_L1_error)
  __pyx_v_c_mesh = CGL_mesh_cpu_sphere(__pyx_t_1, __pyx_t_2);

  /* "cgl_wrapper.pyx":2360
 * def mesh_cpu_sphere(res_u: int, res_v: int) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_sphere(res_u, res_v)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create sphere mesh")
 *     res = mesh_cpu()
 */
  __pyx_t_3 = ((__pyx_v_c_mesh == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "cgl_wrapper.pyx":2361
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_sphere(res_u, res_v)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create sphere mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 2361, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2360
 * def mesh_cpu_sphere(res_u: int, res_v: int) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_sphere(res_u, res_v)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create sphere mesh")
 *     res = mesh_cpu()
 */
  }

  /* "cgl_wrapper.pyx":2362
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create sphere mesh")
 *     res = mesh_cpu()             # <<<<<<<<<<<<<<
 *     res.set_c_mesh(c_mesh)
 *     return res
 */
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mesh_cpu)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_res = ((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2363
 *         raise RuntimeError("Failed to create sphere mesh")
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_3cgl_mesh_cpu *)__pyx_v_res->__pyx_vtab)->set_c_mesh(__pyx_v_res, __pyx_v_c_mesh); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2364
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def mesh_cpu_cylinder(start: vec3, end: vec3, radius0: float, radius1: float, resolution: int) -> mesh_cpu:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2358
 *     return res
 * 
 * def mesh_cpu_sphere(res_u: int, res_v: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_sphere(res_u, res_v)
 *     if c_mesh == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.mesh_cpu_sphere", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2366
 *     return res
 * 
 * def mesh_cpu_cylinder(start: vec3, end: vec3, radius0: float, radius1: float, resolution: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create_cylinder(start.c_vec3, end.c_vec3, radius0, radius1, resolution)
 *     if c_mesh == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_197mesh_cpu_cylinder(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_197mesh_cpu_cylinder = {"mesh_cpu_cylinder", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_197mesh_cpu_cylinder, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pw_3cgl_197mesh_cpu_cylinder(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_start = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_end = 0;
  double __pyx_v_radius0;
  double __pyx_v_radius1;
  PyObject *__pyx_v_resolution = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("mesh_cpu_cylinder (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_radius0,&__pyx_n_s_radius1,&__pyx_n_s_resolution,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_cylinder", 1, 5, 5, 1); __PYX_ERR(0, 2366, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius0)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_cylinder", 1, 5, 5, 2); __PYX_ERR(0, 2366, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_cylinder", 1, 5, 5, 3); __PYX_ERR(0, 2366, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_resolution)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("mesh_cpu_cylinder", 1, 5, 5, 4); __PYX_ERR(0, 2366, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "mesh_cpu_cylinder") < 0)) __PYX_ERR(0, 2366, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_start = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_end = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_radius0 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_radius0 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2366, __pyx_L3_error)
    __pyx_v_radius1 = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_radius1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2366, __pyx_L3_error)
    __pyx_v_resolution = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("mesh_cpu_cylinder", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2366, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_cpu_cylinder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), __pyx_ptype_3cgl_vec3, 1, "start", 0))) __PYX_ERR(0, 2366, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_end), __pyx_ptype_3cgl_vec3, 1, "end", 0))) __PYX_ERR(0, 2366, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_196mesh_cpu_cylinder(__pyx_self, __pyx_v_start, __pyx_v_end, __pyx_v_radius0, __pyx_v_radius1, __pyx_v_resolution);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_mesh_cpu *__pyx_pf_3cgl_196mesh_cpu_cylinder(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec3 *__pyx_v_end, double __pyx_v_radius0, double __pyx_v_radius1, PyObject *__pyx_v_resolution) {
  struct CGL_mesh_cpu *__pyx_v_c_mesh;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("mesh_cpu_cylinder", 0);

  /* "cgl_wrapper.pyx":2367
 * 
 * def mesh_cpu_cylinder(start: vec3, end: vec3, radius0: float, radius1: float, resolution: int) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create_cylinder(start.c_vec3, end.c_vec3, radius0, radius1, resolution)             # <<<<<<<<<<<<<<
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create cylinder mesh")
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_resolution); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2367, __pyx_L1_error)
  __pyx_v_c_mesh = CGL_mesh_cpu_create_cylinder(__pyx_v_start->c_vec3, __pyx_v_end->c_vec3, __pyx_v_radius0, __pyx_v_radius1, __pyx_t_1);

  /* "cgl_wrapper.pyx":2368
 * def mesh_cpu_cylinder(start: vec3, end: vec3, radius0: float, radius1: float, resolution: int) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create_cylinder(start.c_vec3, end.c_vec3, radius0, radius1, resolution)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create cylinder mesh")
 *     res = mesh_cpu()
 */
  __pyx_t_2 = ((__pyx_v_c_mesh == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":2369
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create_cylinder(start.c_vec3, end.c_vec3, radius0, radius1, resolution)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create cylinder mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2369, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2368
 * def mesh_cpu_cylinder(start: vec3, end: vec3, radius0: float, radius1: float, resolution: int) -> mesh_cpu:
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create_cylinder(start.c_vec3, end.c_vec3, radius0, radius1, resolution)
 *     if c_mesh == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create cylinder mesh")
 *     res = mesh_cpu()
 */
  }

  /* "cgl_wrapper.pyx":2370
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create cylinder mesh")
 *     res = mesh_cpu()             # <<<<<<<<<<<<<<
 *     res.set_c_mesh(c_mesh)
 *     return res
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_mesh_cpu)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_res = ((struct __pyx_obj_3cgl_mesh_cpu *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2371
 *         raise RuntimeError("Failed to create cylinder mesh")
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_3cgl_mesh_cpu *)__pyx_v_res->__pyx_vtab)->set_c_mesh(__pyx_v_res, __pyx_v_c_mesh); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2371, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2372
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * CUBEMAP_POSITIVE_X = 0x8515
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2366
 *     return res
 * 
 * def mesh_cpu_cylinder(start: vec3, end: vec3, radius0: float, radius1: float, resolution: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create_cylinder(start.c_vec3, end.c_vec3, radius0, radius1, resolution)
 *     if c_mesh == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.mesh_cpu_cylinder", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2386
 * 
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self.get_size()[0]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_5width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_5width___get__(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_5width___get__(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2387
 *     @property
 *     def width(self):
 *         return self.get_size()[0]             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2386
 * 
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self.get_size()[0]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.texture.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2390
 * 
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self.get_size()[1]
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_6height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_6height___get__(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_6height___get__(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2391
 *     @property
 *     def height(self):
 *         return self.get_size()[1]             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2390
 * 
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self.get_size()[1]
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.texture.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2393
 *         return self.get_size()[1]
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_texture = NULL
 *         self.has_been_destroyed = True
 */

/* Python wrapper */
static int __pyx_pw_3cgl_7texture_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_7texture_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_7texture___init__(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_7texture___init__(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":2394
 * 
 *     def __init__(self):
 *         self.c_texture = NULL             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = True
 * 
 */
  __pyx_v_self->c_texture = NULL;

  /* "cgl_wrapper.pyx":2395
 *     def __init__(self):
 *         self.c_texture = NULL
 *         self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->has_been_destroyed = 1;

  /* "cgl_wrapper.pyx":2393
 *         return self.get_size()[1]
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_texture = NULL
 *         self.has_been_destroyed = True
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2397
 *         self.has_been_destroyed = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_7texture_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_7texture_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_7texture_2__dealloc__(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_7texture_2__dealloc__(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":2398
 * 
 *     def __dealloc__(self):
 *         self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2397
 *         self.has_been_destroyed = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("cgl.texture.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":2400
 *         self.destroy()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_internal_handle()
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_7texture_5__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_7texture_5__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_4__hash__(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_7texture_4__hash__(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":2401
 * 
 *     def __hash__(self):
 *         return self.get_internal_handle()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_internal_handle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_AsHash_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_hash_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2401, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2400
 *         self.destroy()
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_internal_handle()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.texture.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2403
 *         return self.get_internal_handle()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"texture({self.get_internal_handle()})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_7__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_7__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_6__repr__(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_6__repr__(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":2404
 * 
 *     def __repr__(self):
 *         return f"texture({self.get_internal_handle()})"             # <<<<<<<<<<<<<<
 * 
 *     def __eq__(self, other):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_texture);
  __pyx_t_2 += 8;
  __Pyx_GIVEREF(__pyx_kp_u_texture);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_texture);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_internal_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2403
 *         return self.get_internal_handle()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"texture({self.get_internal_handle()})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.texture.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2406
 *         return f"texture({self.get_internal_handle()})"
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, texture):
 *             return self.get_internal_handle() == other.get_internal_handle()
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_9__eq__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_8__eq__(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), ((PyObject *)__pyx_v_other));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_8__eq__(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__eq__", 0);

  /* "cgl_wrapper.pyx":2407
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, texture):             # <<<<<<<<<<<<<<
 *             return self.get_internal_handle() == other.get_internal_handle()
 *         return False
 */
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_other, __pyx_ptype_3cgl_texture); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":2408
 *     def __eq__(self, other):
 *         if isinstance(other, texture):
 *             return self.get_internal_handle() == other.get_internal_handle()             # <<<<<<<<<<<<<<
 *         return False
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_internal_handle); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_get_internal_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2408, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2408, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":2407
 * 
 *     def __eq__(self, other):
 *         if isinstance(other, texture):             # <<<<<<<<<<<<<<
 *             return self.get_internal_handle() == other.get_internal_handle()
 *         return False
 */
  }

  /* "cgl_wrapper.pyx":2409
 *         if isinstance(other, texture):
 *             return self.get_internal_handle() == other.get_internal_handle()
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_False);
  __pyx_r = Py_False;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2406
 *         return f"texture({self.get_internal_handle()})"
 * 
 *     def __eq__(self, other):             # <<<<<<<<<<<<<<
 *         if isinstance(other, texture):
 *             return self.get_internal_handle() == other.get_internal_handle()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.texture.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2411
 *         return False
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"texture({self.get_internal_handle()})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_11__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_11__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_10__str__(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_10__str__(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":2412
 * 
 *     def __str__(self):
 *         return f"texture({self.get_internal_handle()})"             # <<<<<<<<<<<<<<
 * 
 *     cdef set_c_texture(self, CGL_texture* c_texture):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_texture);
  __pyx_t_2 += 8;
  __Pyx_GIVEREF(__pyx_kp_u_texture);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_texture);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_internal_handle); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2411
 *         return False
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"texture({self.get_internal_handle()})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.texture.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2414
 *         return f"texture({self.get_internal_handle()})"
 * 
 *     cdef set_c_texture(self, CGL_texture* c_texture):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

static PyObject *__pyx_f_3cgl_7texture_set_c_texture(struct __pyx_obj_3cgl_texture *__pyx_v_self, struct CGL_texture *__pyx_v_c_texture) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_c_texture", 0);

  /* "cgl_wrapper.pyx":2415
 * 
 *     cdef set_c_texture(self, CGL_texture* c_texture):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 *         self.c_texture = c_texture
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2416
 *     cdef set_c_texture(self, CGL_texture* c_texture):
 *         if not self.has_been_destroyed:
 *             self.destroy()             # <<<<<<<<<<<<<<
 *         self.c_texture = c_texture
 *         self.has_been_destroyed = False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2416, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":2415
 * 
 *     cdef set_c_texture(self, CGL_texture* c_texture):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 *         self.c_texture = c_texture
 */
  }

  /* "cgl_wrapper.pyx":2417
 *         if not self.has_been_destroyed:
 *             self.destroy()
 *         self.c_texture = c_texture             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
  __pyx_v_self->c_texture = __pyx_v_c_texture;

  /* "cgl_wrapper.pyx":2418
 *             self.destroy()
 *         self.c_texture = c_texture
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2414
 *         return f"texture({self.get_internal_handle()})"
 * 
 *     cdef set_c_texture(self, CGL_texture* c_texture):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.texture.set_c_texture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2420
 *         self.has_been_destroyed = False
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_texture_destroy(self.c_texture)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_13destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_13destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_12destroy(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_12destroy(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "cgl_wrapper.pyx":2421
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_texture_destroy(self.c_texture)
 *             self.has_been_destroyed = True
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2422
 *     def destroy(self):
 *         if not self.has_been_destroyed:
 *             CGL_texture_destroy(self.c_texture)             # <<<<<<<<<<<<<<
 *             self.has_been_destroyed = True
 * 
 */
    CGL_texture_destroy(__pyx_v_self->c_texture);

    /* "cgl_wrapper.pyx":2423
 *         if not self.has_been_destroyed:
 *             CGL_texture_destroy(self.c_texture)
 *             self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 * 
 *     def load_image(self, image: image):
 */
    __pyx_v_self->has_been_destroyed = 1;

    /* "cgl_wrapper.pyx":2421
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_texture_destroy(self.c_texture)
 *             self.has_been_destroyed = True
 */
  }

  /* "cgl_wrapper.pyx":2420
 *         self.has_been_destroyed = False
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_texture_destroy(self.c_texture)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2425
 *             self.has_been_destroyed = True
 * 
 *     def load_image(self, image: image):             # <<<<<<<<<<<<<<
 *         self.c_texture = CGL_texture_create(&image.c_image)
 *         if self.c_texture == NULL:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_15load_image(PyObject *__pyx_v_self, PyObject *__pyx_v_image); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_15load_image(PyObject *__pyx_v_self, PyObject *__pyx_v_image) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_image (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_3cgl_image, 1, "image", 0))) __PYX_ERR(0, 2425, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7texture_14load_image(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), ((struct __pyx_obj_3cgl_image *)__pyx_v_image));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_14load_image(struct __pyx_obj_3cgl_texture *__pyx_v_self, struct __pyx_obj_3cgl_image *__pyx_v_image) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_image", 0);

  /* "cgl_wrapper.pyx":2426
 * 
 *     def load_image(self, image: image):
 *         self.c_texture = CGL_texture_create(&image.c_image)             # <<<<<<<<<<<<<<
 *         if self.c_texture == NULL:
 *             raise RuntimeError("Failed to create texture from image")
 */
  __pyx_v_self->c_texture = CGL_texture_create((&__pyx_v_image->c_image));

  /* "cgl_wrapper.pyx":2427
 *     def load_image(self, image: image):
 *         self.c_texture = CGL_texture_create(&image.c_image)
 *         if self.c_texture == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create texture from image")
 *         self.has_been_destroyed = False
 */
  __pyx_t_1 = ((__pyx_v_self->c_texture == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":2428
 *         self.c_texture = CGL_texture_create(&image.c_image)
 *         if self.c_texture == NULL:
 *             raise RuntimeError("Failed to create texture from image")             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2428, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2427
 *     def load_image(self, image: image):
 *         self.c_texture = CGL_texture_create(&image.c_image)
 *         if self.c_texture == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create texture from image")
 *         self.has_been_destroyed = False
 */
  }

  /* "cgl_wrapper.pyx":2429
 *         if self.c_texture == NULL:
 *             raise RuntimeError("Failed to create texture from image")
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 * 
 *     def bind(self, slot: int):
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2425
 *             self.has_been_destroyed = True
 * 
 *     def load_image(self, image: image):             # <<<<<<<<<<<<<<
 *         self.c_texture = CGL_texture_create(&image.c_image)
 *         if self.c_texture == NULL:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.texture.load_image", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2431
 *         self.has_been_destroyed = False
 * 
 *     def bind(self, slot: int):             # <<<<<<<<<<<<<<
 *         CGL_texture_bind(self.c_texture, slot)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_17bind(PyObject *__pyx_v_self, PyObject *__pyx_v_slot); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_17bind(PyObject *__pyx_v_self, PyObject *__pyx_v_slot) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bind (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_16bind(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), ((PyObject *)__pyx_v_slot));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_16bind(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_slot) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bind", 0);

  /* "cgl_wrapper.pyx":2432
 * 
 *     def bind(self, slot: int):
 *         CGL_texture_bind(self.c_texture, slot)             # <<<<<<<<<<<<<<
 * 
 *     def cubemap_set_face(self, face: int, image: image):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_slot); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2432, __pyx_L1_error)
  CGL_texture_bind(__pyx_v_self->c_texture, __pyx_t_1);

  /* "cgl_wrapper.pyx":2431
 *         self.has_been_destroyed = False
 * 
 *     def bind(self, slot: int):             # <<<<<<<<<<<<<<
 *         CGL_texture_bind(self.c_texture, slot)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.texture.bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2434
 *         CGL_texture_bind(self.c_texture, slot)
 * 
 *     def cubemap_set_face(self, face: int, image: image):             # <<<<<<<<<<<<<<
 *         CGL_texture_cubemap_set_face(self.c_texture, face, &image.c_image)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_19cubemap_set_face(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_19cubemap_set_face(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_face = 0;
  struct __pyx_obj_3cgl_image *__pyx_v_image = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("cubemap_set_face (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_face,&__pyx_n_s_image_2,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_face)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_image_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("cubemap_set_face", 1, 2, 2, 1); __PYX_ERR(0, 2434, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cubemap_set_face") < 0)) __PYX_ERR(0, 2434, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_face = values[0];
    __pyx_v_image = ((struct __pyx_obj_3cgl_image *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("cubemap_set_face", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2434, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.texture.cubemap_set_face", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_3cgl_image, 1, "image", 0))) __PYX_ERR(0, 2434, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7texture_18cubemap_set_face(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), __pyx_v_face, __pyx_v_image);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_18cubemap_set_face(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_face, struct __pyx_obj_3cgl_image *__pyx_v_image) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("cubemap_set_face", 0);

  /* "cgl_wrapper.pyx":2435
 * 
 *     def cubemap_set_face(self, face: int, image: image):
 *         CGL_texture_cubemap_set_face(self.c_texture, face, &image.c_image)             # <<<<<<<<<<<<<<
 * 
 *     def array_set_layer_data(self, layer: int, data: bytes):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_face); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2435, __pyx_L1_error)
  CGL_texture_cubemap_set_face(__pyx_v_self->c_texture, __pyx_t_1, (&__pyx_v_image->c_image));

  /* "cgl_wrapper.pyx":2434
 *         CGL_texture_bind(self.c_texture, slot)
 * 
 *     def cubemap_set_face(self, face: int, image: image):             # <<<<<<<<<<<<<<
 *         CGL_texture_cubemap_set_face(self.c_texture, face, &image.c_image)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.texture.cubemap_set_face", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2437
 *         CGL_texture_cubemap_set_face(self.c_texture, face, &image.c_image)
 * 
 *     def array_set_layer_data(self, layer: int, data: bytes):             # <<<<<<<<<<<<<<
 *         CGL_texture_array_set_layer_data(self.c_texture, layer, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_21array_set_layer_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_21array_set_layer_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_layer = 0;
  PyObject *__pyx_v_data = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("array_set_layer_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_layer,&__pyx_n_s_data,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_layer)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("array_set_layer_data", 1, 2, 2, 1); __PYX_ERR(0, 2437, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "array_set_layer_data") < 0)) __PYX_ERR(0, 2437, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_layer = values[0];
    __pyx_v_data = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("array_set_layer_data", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2437, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.texture.array_set_layer_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 2437, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7texture_20array_set_layer_data(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), __pyx_v_layer, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_20array_set_layer_data(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_layer, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("array_set_layer_data", 0);

  /* "cgl_wrapper.pyx":2438
 * 
 *     def array_set_layer_data(self, layer: int, data: bytes):
 *         CGL_texture_array_set_layer_data(self.c_texture, layer, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def set_data(self, data: bytes):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_layer); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2438, __pyx_L1_error)
  CGL_texture_array_set_layer_data(__pyx_v_self->c_texture, __pyx_t_1, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2437
 *         CGL_texture_cubemap_set_face(self.c_texture, face, &image.c_image)
 * 
 *     def array_set_layer_data(self, layer: int, data: bytes):             # <<<<<<<<<<<<<<
 *         CGL_texture_array_set_layer_data(self.c_texture, layer, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.texture.array_set_layer_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2440
 *         CGL_texture_array_set_layer_data(self.c_texture, layer, <void*>data)
 * 
 *     def set_data(self, data: bytes):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_data(self.c_texture, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_23set_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_23set_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_data (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 2440, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7texture_22set_data(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_22set_data(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_data", 0);

  /* "cgl_wrapper.pyx":2441
 * 
 *     def set_data(self, data: bytes):
 *         CGL_texture_set_data(self.c_texture, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def set_sub_data(self, x: int, y: int, width: int, height: int, data: bytes):
 */
  CGL_texture_set_data(__pyx_v_self->c_texture, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2440
 *         CGL_texture_array_set_layer_data(self.c_texture, layer, <void*>data)
 * 
 *     def set_data(self, data: bytes):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_data(self.c_texture, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2443
 *         CGL_texture_set_data(self.c_texture, <void*>data)
 * 
 *     def set_sub_data(self, x: int, y: int, width: int, height: int, data: bytes):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_sub_data(self.c_texture, x, y, width, height, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_25set_sub_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_25set_sub_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  PyObject *__pyx_v_data = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_sub_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_data,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_sub_data", 1, 5, 5, 1); __PYX_ERR(0, 2443, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_sub_data", 1, 5, 5, 2); __PYX_ERR(0, 2443, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_sub_data", 1, 5, 5, 3); __PYX_ERR(0, 2443, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_sub_data", 1, 5, 5, 4); __PYX_ERR(0, 2443, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_sub_data") < 0)) __PYX_ERR(0, 2443, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
    __pyx_v_width = values[2];
    __pyx_v_height = values[3];
    __pyx_v_data = ((PyObject*)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_sub_data", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2443, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.texture.set_sub_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 2443, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7texture_24set_sub_data(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_width, __pyx_v_height, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_24set_sub_data(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_sub_data", 0);

  /* "cgl_wrapper.pyx":2444
 * 
 *     def set_sub_data(self, x: int, y: int, width: int, height: int, data: bytes):
 *         CGL_texture_set_sub_data(self.c_texture, x, y, width, height, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def set_pixel_data(self, x: int, y: int, data: bytes):
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_x); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2444, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_y); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2444, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_width); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2444, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyInt_As_size_t(__pyx_v_height); if (unlikely((__pyx_t_4 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2444, __pyx_L1_error)
  CGL_texture_set_sub_data(__pyx_v_self->c_texture, __pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_t_4, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2443
 *         CGL_texture_set_data(self.c_texture, <void*>data)
 * 
 *     def set_sub_data(self, x: int, y: int, width: int, height: int, data: bytes):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_sub_data(self.c_texture, x, y, width, height, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.texture.set_sub_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2446
 *         CGL_texture_set_sub_data(self.c_texture, x, y, width, height, <void*>data)
 * 
 *     def set_pixel_data(self, x: int, y: int, data: bytes):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_pixel_data(self.c_texture, x, y, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_27set_pixel_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_27set_pixel_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_data = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_pixel_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_data,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_pixel_data", 1, 3, 3, 1); __PYX_ERR(0, 2446, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_pixel_data", 1, 3, 3, 2); __PYX_ERR(0, 2446, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_pixel_data") < 0)) __PYX_ERR(0, 2446, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
    __pyx_v_data = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_pixel_data", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2446, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.texture.set_pixel_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 2446, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7texture_26set_pixel_data(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_data);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_26set_pixel_data(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_pixel_data", 0);

  /* "cgl_wrapper.pyx":2447
 * 
 *     def set_pixel_data(self, x: int, y: int, data: bytes):
 *         CGL_texture_set_pixel_data(self.c_texture, x, y, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def set_user_data(self, data: object):
 */
  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_x); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2447, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_v_y); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2447, __pyx_L1_error)
  CGL_texture_set_pixel_data(__pyx_v_self->c_texture, __pyx_t_1, __pyx_t_2, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2446
 *         CGL_texture_set_sub_data(self.c_texture, x, y, width, height, <void*>data)
 * 
 *     def set_pixel_data(self, x: int, y: int, data: bytes):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_pixel_data(self.c_texture, x, y, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.texture.set_pixel_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2449
 *         CGL_texture_set_pixel_data(self.c_texture, x, y, <void*>data)
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_user_data(self.c_texture, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_29set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_29set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_28set_user_data(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_28set_user_data(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data", 0);

  /* "cgl_wrapper.pyx":2450
 * 
 *     def set_user_data(self, data: object):
 *         CGL_texture_set_user_data(self.c_texture, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def get_user_data(self) -> object:
 */
  CGL_texture_set_user_data(__pyx_v_self->c_texture, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2449
 *         CGL_texture_set_pixel_data(self.c_texture, x, y, <void*>data)
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_user_data(self.c_texture, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2452
 *         CGL_texture_set_user_data(self.c_texture, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_texture_get_user_data(self.c_texture)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_31get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_31get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_30get_user_data(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_30get_user_data(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  __Pyx_RefNannySetupContext("get_user_data", 0);

  /* "cgl_wrapper.pyx":2453
 * 
 *     def get_user_data(self) -> object:
 *         return <object>CGL_texture_get_user_data(self.c_texture)             # <<<<<<<<<<<<<<
 * 
 *     def get_internal_handle(self) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = CGL_texture_get_user_data(__pyx_v_self->c_texture);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2452
 *         CGL_texture_set_user_data(self.c_texture, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_texture_get_user_data(self.c_texture)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2455
 *         return <object>CGL_texture_get_user_data(self.c_texture)
 * 
 *     def get_internal_handle(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_texture_get_internal_handle(self.c_texture)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_33get_internal_handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_33get_internal_handle(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_internal_handle (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_32get_internal_handle(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_32get_internal_handle(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_internal_handle", 0);

  /* "cgl_wrapper.pyx":2456
 * 
 *     def get_internal_handle(self) -> int:
 *         return CGL_texture_get_internal_handle(self.c_texture)             # <<<<<<<<<<<<<<
 * 
 *     def get_size(self) -> tuple:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_uint(CGL_texture_get_internal_handle(__pyx_v_self->c_texture)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2456, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2455
 *         return <object>CGL_texture_get_user_data(self.c_texture)
 * 
 *     def get_internal_handle(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_texture_get_internal_handle(self.c_texture)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.texture.get_internal_handle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2458
 *         return CGL_texture_get_internal_handle(self.c_texture)
 * 
 *     def get_size(self) -> tuple:             # <<<<<<<<<<<<<<
 *         cdef CGL_int width
 *         cdef CGL_int height
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_35get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_35get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_size (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_34get_size(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_34get_size(struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  CGL_int __pyx_v_width;
  CGL_int __pyx_v_height;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_size", 0);

  /* "cgl_wrapper.pyx":2461
 *         cdef CGL_int width
 *         cdef CGL_int height
 *         CGL_texture_get_size(self.c_texture, &width, &height)             # <<<<<<<<<<<<<<
 *         return (width, height)
 * 
 */
  CGL_texture_get_size(__pyx_v_self->c_texture, (&__pyx_v_width), (&__pyx_v_height));

  /* "cgl_wrapper.pyx":2462
 *         cdef CGL_int height
 *         CGL_texture_get_size(self.c_texture, &width, &height)
 *         return (width, height)             # <<<<<<<<<<<<<<
 * 
 *     def set_scaling_method(self, scaling_method: int):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_CGL_int(__pyx_v_height); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2462, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2458
 *         return CGL_texture_get_internal_handle(self.c_texture)
 * 
 *     def get_size(self) -> tuple:             # <<<<<<<<<<<<<<
 *         cdef CGL_int width
 *         cdef CGL_int height
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.texture.get_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2464
 *         return (width, height)
 * 
 *     def set_scaling_method(self, scaling_method: int):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_scaling_method(self.c_texture, scaling_method)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_37set_scaling_method(PyObject *__pyx_v_self, PyObject *__pyx_v_scaling_method); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_37set_scaling_method(PyObject *__pyx_v_self, PyObject *__pyx_v_scaling_method) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_scaling_method (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_36set_scaling_method(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), ((PyObject *)__pyx_v_scaling_method));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_36set_scaling_method(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_scaling_method) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  GLint __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_scaling_method", 0);

  /* "cgl_wrapper.pyx":2465
 * 
 *     def set_scaling_method(self, scaling_method: int):
 *         CGL_texture_set_scaling_method(self.c_texture, scaling_method)             # <<<<<<<<<<<<<<
 * 
 *     def set_wrapping_method(self, wrapping_method: int):
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_scaling_method); if (unlikely((__pyx_t_1 == ((GLint)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2465, __pyx_L1_error)
  CGL_texture_set_scaling_method(__pyx_v_self->c_texture, __pyx_t_1);

  /* "cgl_wrapper.pyx":2464
 *         return (width, height)
 * 
 *     def set_scaling_method(self, scaling_method: int):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_scaling_method(self.c_texture, scaling_method)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.texture.set_scaling_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2467
 *         CGL_texture_set_scaling_method(self.c_texture, scaling_method)
 * 
 *     def set_wrapping_method(self, wrapping_method: int):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_wrapping_method(self.c_texture, wrapping_method)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_39set_wrapping_method(PyObject *__pyx_v_self, PyObject *__pyx_v_wrapping_method); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_39set_wrapping_method(PyObject *__pyx_v_self, PyObject *__pyx_v_wrapping_method) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_wrapping_method (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_38set_wrapping_method(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), ((PyObject *)__pyx_v_wrapping_method));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_38set_wrapping_method(struct __pyx_obj_3cgl_texture *__pyx_v_self, PyObject *__pyx_v_wrapping_method) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  GLint __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_wrapping_method", 0);

  /* "cgl_wrapper.pyx":2468
 * 
 *     def set_wrapping_method(self, wrapping_method: int):
 *         CGL_texture_set_wrapping_method(self.c_texture, wrapping_method)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_wrapping_method); if (unlikely((__pyx_t_1 == ((GLint)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2468, __pyx_L1_error)
  CGL_texture_set_wrapping_method(__pyx_v_self->c_texture, __pyx_t_1);

  /* "cgl_wrapper.pyx":2467
 *         CGL_texture_set_scaling_method(self.c_texture, scaling_method)
 * 
 *     def set_wrapping_method(self, wrapping_method: int):             # <<<<<<<<<<<<<<
 *         CGL_texture_set_wrapping_method(self.c_texture, wrapping_method)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.texture.set_wrapping_method", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_41__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_41__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_40__reduce_cython__(((struct __pyx_obj_3cgl_texture *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_40__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_texture *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.texture.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7texture_43__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_7texture_43__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7texture_42__setstate_cython__(((struct __pyx_obj_3cgl_texture *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7texture_42__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_texture *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.texture.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2472
 * 
 * 
 * def texture_create_from_image(image: image) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create(&image.c_image)
 *     if c_texture == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_199texture_create_from_image(PyObject *__pyx_self, PyObject *__pyx_v_image); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_199texture_create_from_image = {"texture_create_from_image", (PyCFunction)__pyx_pw_3cgl_199texture_create_from_image, METH_O, 0};
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_199texture_create_from_image(PyObject *__pyx_self, PyObject *__pyx_v_image) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("texture_create_from_image (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_image), __pyx_ptype_3cgl_image, 1, "image", 0))) __PYX_ERR(0, 2472, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_198texture_create_from_image(__pyx_self, ((struct __pyx_obj_3cgl_image *)__pyx_v_image));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_198texture_create_from_image(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_image *__pyx_v_image) {
  struct CGL_texture *__pyx_v_c_texture;
  struct __pyx_obj_3cgl_texture *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("texture_create_from_image", 0);

  /* "cgl_wrapper.pyx":2473
 * 
 * def texture_create_from_image(image: image) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create(&image.c_image)             # <<<<<<<<<<<<<<
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create texture from image")
 */
  __pyx_v_c_texture = CGL_texture_create((&__pyx_v_image->c_image));

  /* "cgl_wrapper.pyx":2474
 * def texture_create_from_image(image: image) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create(&image.c_image)
 *     if c_texture == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create texture from image")
 *     res = texture()
 */
  __pyx_t_1 = ((__pyx_v_c_texture == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":2475
 *     cdef CGL_texture* c_texture = CGL_texture_create(&image.c_image)
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create texture from image")             # <<<<<<<<<<<<<<
 *     res = texture()
 *     res.set_c_texture(c_texture)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2475, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2475, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2474
 * def texture_create_from_image(image: image) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create(&image.c_image)
 *     if c_texture == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create texture from image")
 *     res = texture()
 */
  }

  /* "cgl_wrapper.pyx":2476
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create texture from image")
 *     res = texture()             # <<<<<<<<<<<<<<
 *     res.set_c_texture(c_texture)
 *     return res
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = ((struct __pyx_obj_3cgl_texture *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2477
 *         raise RuntimeError("Failed to create texture from image")
 *     res = texture()
 *     res.set_c_texture(c_texture)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_res->__pyx_vtab)->set_c_texture(__pyx_v_res, __pyx_v_c_texture); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2478
 *     res = texture()
 *     res.set_c_texture(c_texture)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def texture_create_blank(width: int, height: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2472
 * 
 * 
 * def texture_create_from_image(image: image) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create(&image.c_image)
 *     if c_texture == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.texture_create_from_image", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2480
 *     return res
 * 
 * def texture_create_blank(width: int, height: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_blank(width, height, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_201texture_create_blank(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_201texture_create_blank = {"texture_create_blank", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_201texture_create_blank, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_201texture_create_blank(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  GLenum __pyx_v_formatf;
  GLenum __pyx_v_internal_format;
  GLenum __pyx_v_typef;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("texture_create_blank (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_formatf,&__pyx_n_s_internal_format,&__pyx_n_s_typef,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_create_blank", 1, 5, 5, 1); __PYX_ERR(0, 2480, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_formatf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_create_blank", 1, 5, 5, 2); __PYX_ERR(0, 2480, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_internal_format)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_create_blank", 1, 5, 5, 3); __PYX_ERR(0, 2480, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typef)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_create_blank", 1, 5, 5, 4); __PYX_ERR(0, 2480, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "texture_create_blank") < 0)) __PYX_ERR(0, 2480, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_width = values[0];
    __pyx_v_height = values[1];
    __pyx_v_formatf = __Pyx_PyInt_As_CGL_uint(values[2]); if (unlikely((__pyx_v_formatf == ((GLenum)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2480, __pyx_L3_error)
    __pyx_v_internal_format = __Pyx_PyInt_As_CGL_uint(values[3]); if (unlikely((__pyx_v_internal_format == ((GLenum)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2480, __pyx_L3_error)
    __pyx_v_typef = __Pyx_PyInt_As_CGL_uint(values[4]); if (unlikely((__pyx_v_typef == ((GLenum)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2480, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("texture_create_blank", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2480, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.texture_create_blank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_200texture_create_blank(__pyx_self, __pyx_v_width, __pyx_v_height, __pyx_v_formatf, __pyx_v_internal_format, __pyx_v_typef);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_200texture_create_blank(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, GLenum __pyx_v_formatf, GLenum __pyx_v_internal_format, GLenum __pyx_v_typef) {
  struct CGL_texture *__pyx_v_c_texture;
  struct __pyx_obj_3cgl_texture *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("texture_create_blank", 0);

  /* "cgl_wrapper.pyx":2481
 * 
 * def texture_create_blank(width: int, height: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_blank(width, height, formatf, internal_format, typef)             # <<<<<<<<<<<<<<
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create blank texture")
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2481, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_height); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2481, __pyx_L1_error)
  __pyx_v_c_texture = CGL_texture_create_blank(__pyx_t_1, __pyx_t_2, __pyx_v_formatf, __pyx_v_internal_format, __pyx_v_typef);

  /* "cgl_wrapper.pyx":2482
 * def texture_create_blank(width: int, height: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_blank(width, height, formatf, internal_format, typef)
 *     if c_texture == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create blank texture")
 *     res = texture()
 */
  __pyx_t_3 = ((__pyx_v_c_texture == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "cgl_wrapper.pyx":2483
 *     cdef CGL_texture* c_texture = CGL_texture_create_blank(width, height, formatf, internal_format, typef)
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create blank texture")             # <<<<<<<<<<<<<<
 *     res = texture()
 *     res.set_c_texture(c_texture)
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 2483, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2482
 * def texture_create_blank(width: int, height: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_blank(width, height, formatf, internal_format, typef)
 *     if c_texture == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create blank texture")
 *     res = texture()
 */
  }

  /* "cgl_wrapper.pyx":2484
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create blank texture")
 *     res = texture()             # <<<<<<<<<<<<<<
 *     res.set_c_texture(c_texture)
 *     return res
 */
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_res = ((struct __pyx_obj_3cgl_texture *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2485
 *         raise RuntimeError("Failed to create blank texture")
 *     res = texture()
 *     res.set_c_texture(c_texture)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_res->__pyx_vtab)->set_c_texture(__pyx_v_res, __pyx_v_c_texture); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2486
 *     res = texture()
 *     res.set_c_texture(c_texture)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def texture_create_array(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2480
 *     return res
 * 
 * def texture_create_blank(width: int, height: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_blank(width, height, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.texture_create_blank", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2488
 *     return res
 * 
 * def texture_create_array(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_array(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_203texture_create_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_203texture_create_array = {"texture_create_array", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_203texture_create_array, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_203texture_create_array(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  PyObject *__pyx_v_depth = 0;
  GLenum __pyx_v_formatf;
  GLenum __pyx_v_internal_format;
  GLenum __pyx_v_typef;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("texture_create_array (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_depth,&__pyx_n_s_formatf,&__pyx_n_s_internal_format,&__pyx_n_s_typef,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_create_array", 1, 6, 6, 1); __PYX_ERR(0, 2488, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_create_array", 1, 6, 6, 2); __PYX_ERR(0, 2488, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_formatf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_create_array", 1, 6, 6, 3); __PYX_ERR(0, 2488, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_internal_format)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_create_array", 1, 6, 6, 4); __PYX_ERR(0, 2488, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typef)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_create_array", 1, 6, 6, 5); __PYX_ERR(0, 2488, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "texture_create_array") < 0)) __PYX_ERR(0, 2488, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_width = values[0];
    __pyx_v_height = values[1];
    __pyx_v_depth = values[2];
    __pyx_v_formatf = __Pyx_PyInt_As_CGL_uint(values[3]); if (unlikely((__pyx_v_formatf == ((GLenum)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2488, __pyx_L3_error)
    __pyx_v_internal_format = __Pyx_PyInt_As_CGL_uint(values[4]); if (unlikely((__pyx_v_internal_format == ((GLenum)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2488, __pyx_L3_error)
    __pyx_v_typef = __Pyx_PyInt_As_CGL_uint(values[5]); if (unlikely((__pyx_v_typef == ((GLenum)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2488, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("texture_create_array", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2488, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.texture_create_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_202texture_create_array(__pyx_self, __pyx_v_width, __pyx_v_height, __pyx_v_depth, __pyx_v_formatf, __pyx_v_internal_format, __pyx_v_typef);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_202texture_create_array(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_depth, GLenum __pyx_v_formatf, GLenum __pyx_v_internal_format, GLenum __pyx_v_typef) {
  struct CGL_texture *__pyx_v_c_texture;
  struct __pyx_obj_3cgl_texture *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  CGL_int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("texture_create_array", 0);

  /* "cgl_wrapper.pyx":2489
 * 
 * def texture_create_array(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_array(width, height, depth, formatf, internal_format, typef)             # <<<<<<<<<<<<<<
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create texture array")
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2489, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_height); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2489, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2489, __pyx_L1_error)
  __pyx_v_c_texture = CGL_texture_create_array(__pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_v_formatf, __pyx_v_internal_format, __pyx_v_typef);

  /* "cgl_wrapper.pyx":2490
 * def texture_create_array(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_array(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create texture array")
 *     res = texture()
 */
  __pyx_t_4 = ((__pyx_v_c_texture == NULL) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cgl_wrapper.pyx":2491
 *     cdef CGL_texture* c_texture = CGL_texture_create_array(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create texture array")             # <<<<<<<<<<<<<<
 *     res = texture()
 *     res.set_c_texture(c_texture)
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2491, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 2491, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2490
 * def texture_create_array(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_array(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create texture array")
 *     res = texture()
 */
  }

  /* "cgl_wrapper.pyx":2492
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create texture array")
 *     res = texture()             # <<<<<<<<<<<<<<
 *     res.set_c_texture(c_texture)
 *     return res
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2492, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_res = ((struct __pyx_obj_3cgl_texture *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cgl_wrapper.pyx":2493
 *         raise RuntimeError("Failed to create texture array")
 *     res = texture()
 *     res.set_c_texture(c_texture)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_res->__pyx_vtab)->set_c_texture(__pyx_v_res, __pyx_v_c_texture); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cgl_wrapper.pyx":2494
 *     res = texture()
 *     res.set_c_texture(c_texture)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def texture_creae_3d(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2488
 *     return res
 * 
 * def texture_create_array(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_array(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.texture_create_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2496
 *     return res
 * 
 * def texture_creae_3d(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_3d(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_205texture_creae_3d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_205texture_creae_3d = {"texture_creae_3d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_205texture_creae_3d, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_205texture_creae_3d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  PyObject *__pyx_v_depth = 0;
  GLenum __pyx_v_formatf;
  GLenum __pyx_v_internal_format;
  GLenum __pyx_v_typef;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("texture_creae_3d (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_depth,&__pyx_n_s_formatf,&__pyx_n_s_internal_format,&__pyx_n_s_typef,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_creae_3d", 1, 6, 6, 1); __PYX_ERR(0, 2496, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_creae_3d", 1, 6, 6, 2); __PYX_ERR(0, 2496, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_formatf)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_creae_3d", 1, 6, 6, 3); __PYX_ERR(0, 2496, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_internal_format)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_creae_3d", 1, 6, 6, 4); __PYX_ERR(0, 2496, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_typef)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("texture_creae_3d", 1, 6, 6, 5); __PYX_ERR(0, 2496, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "texture_creae_3d") < 0)) __PYX_ERR(0, 2496, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_width = values[0];
    __pyx_v_height = values[1];
    __pyx_v_depth = values[2];
    __pyx_v_formatf = __Pyx_PyInt_As_CGL_uint(values[3]); if (unlikely((__pyx_v_formatf == ((GLenum)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L3_error)
    __pyx_v_internal_format = __Pyx_PyInt_As_CGL_uint(values[4]); if (unlikely((__pyx_v_internal_format == ((GLenum)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L3_error)
    __pyx_v_typef = __Pyx_PyInt_As_CGL_uint(values[5]); if (unlikely((__pyx_v_typef == ((GLenum)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2496, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("texture_creae_3d", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2496, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.texture_creae_3d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_204texture_creae_3d(__pyx_self, __pyx_v_width, __pyx_v_height, __pyx_v_depth, __pyx_v_formatf, __pyx_v_internal_format, __pyx_v_typef);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_204texture_creae_3d(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_depth, GLenum __pyx_v_formatf, GLenum __pyx_v_internal_format, GLenum __pyx_v_typef) {
  struct CGL_texture *__pyx_v_c_texture;
  struct __pyx_obj_3cgl_texture *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  CGL_int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("texture_creae_3d", 0);

  /* "cgl_wrapper.pyx":2497
 * 
 * def texture_creae_3d(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_3d(width, height, depth, formatf, internal_format, typef)             # <<<<<<<<<<<<<<
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create 3d texture")
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2497, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_height); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2497, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_depth); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2497, __pyx_L1_error)
  __pyx_v_c_texture = CGL_texture_create_3d(__pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_v_formatf, __pyx_v_internal_format, __pyx_v_typef);

  /* "cgl_wrapper.pyx":2498
 * def texture_creae_3d(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_3d(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create 3d texture")
 *     res = texture()
 */
  __pyx_t_4 = ((__pyx_v_c_texture == NULL) != 0);
  if (unlikely(__pyx_t_4)) {

    /* "cgl_wrapper.pyx":2499
 *     cdef CGL_texture* c_texture = CGL_texture_create_3d(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create 3d texture")             # <<<<<<<<<<<<<<
 *     res = texture()
 *     res.set_c_texture(c_texture)
 */
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __PYX_ERR(0, 2499, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2498
 * def texture_creae_3d(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_3d(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create 3d texture")
 *     res = texture()
 */
  }

  /* "cgl_wrapper.pyx":2500
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create 3d texture")
 *     res = texture()             # <<<<<<<<<<<<<<
 *     res.set_c_texture(c_texture)
 *     return res
 */
  __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2500, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_v_res = ((struct __pyx_obj_3cgl_texture *)__pyx_t_5);
  __pyx_t_5 = 0;

  /* "cgl_wrapper.pyx":2501
 *         raise RuntimeError("Failed to create 3d texture")
 *     res = texture()
 *     res.set_c_texture(c_texture)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_5 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_res->__pyx_vtab)->set_c_texture(__pyx_v_res, __pyx_v_c_texture); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "cgl_wrapper.pyx":2502
 *     res = texture()
 *     res.set_c_texture(c_texture)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def texture_create_cubemap() -> texture:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2496
 *     return res
 * 
 * def texture_creae_3d(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_3d(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.texture_creae_3d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2504
 *     return res
 * 
 * def texture_create_cubemap() -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_cubemap()
 *     if c_texture == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_207texture_create_cubemap(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_207texture_create_cubemap = {"texture_create_cubemap", (PyCFunction)__pyx_pw_3cgl_207texture_create_cubemap, METH_NOARGS, 0};
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_207texture_create_cubemap(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("texture_create_cubemap (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_206texture_create_cubemap(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_206texture_create_cubemap(CYTHON_UNUSED PyObject *__pyx_self) {
  struct CGL_texture *__pyx_v_c_texture;
  struct __pyx_obj_3cgl_texture *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("texture_create_cubemap", 0);

  /* "cgl_wrapper.pyx":2505
 * 
 * def texture_create_cubemap() -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_cubemap()             # <<<<<<<<<<<<<<
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create cubemap texture")
 */
  __pyx_v_c_texture = CGL_texture_create_cubemap();

  /* "cgl_wrapper.pyx":2506
 * def texture_create_cubemap() -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_cubemap()
 *     if c_texture == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create cubemap texture")
 *     res = texture()
 */
  __pyx_t_1 = ((__pyx_v_c_texture == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":2507
 *     cdef CGL_texture* c_texture = CGL_texture_create_cubemap()
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create cubemap texture")             # <<<<<<<<<<<<<<
 *     res = texture()
 *     res.set_c_texture(c_texture)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2507, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2506
 * def texture_create_cubemap() -> texture:
 *     cdef CGL_texture* c_texture = CGL_texture_create_cubemap()
 *     if c_texture == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create cubemap texture")
 *     res = texture()
 */
  }

  /* "cgl_wrapper.pyx":2508
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create cubemap texture")
 *     res = texture()             # <<<<<<<<<<<<<<
 *     res.set_c_texture(c_texture)
 *     return res
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = ((struct __pyx_obj_3cgl_texture *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2509
 *         raise RuntimeError("Failed to create cubemap texture")
 *     res = texture()
 *     res.set_c_texture(c_texture)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_res->__pyx_vtab)->set_c_texture(__pyx_v_res, __pyx_v_c_texture); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2510
 *     res = texture()
 *     res.set_c_texture(c_texture)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * cdef class framebuffer:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2504
 *     return res
 * 
 * def texture_create_cubemap() -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_cubemap()
 *     if c_texture == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.texture_create_cubemap", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2516
 *     cdef bool has_been_destroyed
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_framebuffer = NULL
 *         self.has_been_destroyed = True
 */

/* Python wrapper */
static int __pyx_pw_3cgl_11framebuffer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_11framebuffer_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_11framebuffer___init__(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_11framebuffer___init__(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":2517
 * 
 *     def __init__(self):
 *         self.c_framebuffer = NULL             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = True
 * 
 */
  __pyx_v_self->c_framebuffer = NULL;

  /* "cgl_wrapper.pyx":2518
 *     def __init__(self):
 *         self.c_framebuffer = NULL
 *         self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->has_been_destroyed = 1;

  /* "cgl_wrapper.pyx":2516
 *     cdef bool has_been_destroyed
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_framebuffer = NULL
 *         self.has_been_destroyed = True
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2520
 *         self.has_been_destroyed = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_11framebuffer_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_11framebuffer_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_11framebuffer_2__dealloc__(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_11framebuffer_2__dealloc__(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":2521
 * 
 *     def __dealloc__(self):
 *         self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2520
 *         self.has_been_destroyed = True
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("cgl.framebuffer.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":2523
 *         self.destroy()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"framebuffer({self.get_id()})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_4__repr__(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_4__repr__(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":2524
 * 
 *     def __repr__(self):
 *         return f"framebuffer({self.get_id()})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_framebuffer);
  __pyx_t_2 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_framebuffer);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_framebuffer);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2524, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2523
 *         self.destroy()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"framebuffer({self.get_id()})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.framebuffer.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2526
 *         return f"framebuffer({self.get_id()})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"framebuffer({self.get_id()})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_6__str__(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_6__str__(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":2527
 * 
 *     def __str__(self):
 *         return f"framebuffer({self.get_id()})"             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_framebuffer);
  __pyx_t_2 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_framebuffer);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_framebuffer);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2526
 *         return f"framebuffer({self.get_id()})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"framebuffer({self.get_id()})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.framebuffer.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2529
 *         return f"framebuffer({self.get_id()})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_11framebuffer_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_11framebuffer_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_8__hash__(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_11framebuffer_8__hash__(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":2530
 * 
 *     def __hash__(self):
 *         return self.get_id()             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_AsHash_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_hash_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2529
 *         return f"framebuffer({self.get_id()})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.framebuffer.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2532
 *         return self.get_id()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_framebuffer_destroy(self.c_framebuffer)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_11destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_11destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_10destroy(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_10destroy(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "cgl_wrapper.pyx":2533
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_framebuffer_destroy(self.c_framebuffer)
 *             self.has_been_destroyed = True
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2534
 *     def destroy(self):
 *         if not self.has_been_destroyed:
 *             CGL_framebuffer_destroy(self.c_framebuffer)             # <<<<<<<<<<<<<<
 *             self.has_been_destroyed = True
 * 
 */
    CGL_framebuffer_destroy(__pyx_v_self->c_framebuffer);

    /* "cgl_wrapper.pyx":2535
 *         if not self.has_been_destroyed:
 *             CGL_framebuffer_destroy(self.c_framebuffer)
 *             self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 * 
 *     def get_id(self) -> int:
 */
    __pyx_v_self->has_been_destroyed = 1;

    /* "cgl_wrapper.pyx":2533
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_framebuffer_destroy(self.c_framebuffer)
 *             self.has_been_destroyed = True
 */
  }

  /* "cgl_wrapper.pyx":2532
 *         return self.get_id()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_framebuffer_destroy(self.c_framebuffer)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2537
 *             self.has_been_destroyed = True
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(&self.c_framebuffer, sizeof(CGL_framebuffer*))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_13get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_13get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_id (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_12get_id(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_12get_id(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_id", 0);

  /* "cgl_wrapper.pyx":2538
 * 
 *     def get_id(self) -> int:
 *         return CGL_utils_super_fast_hash(&self.c_framebuffer, sizeof(CGL_framebuffer*))             # <<<<<<<<<<<<<<
 * 
 *     cdef set_c_framebuffer(self, CGL_framebuffer* c_framebuffer):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(CGL_utils_super_fast_hash((&__pyx_v_self->c_framebuffer), (sizeof(struct CGL_framebuffer *)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2537
 *             self.has_been_destroyed = True
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(&self.c_framebuffer, sizeof(CGL_framebuffer*))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.framebuffer.get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2540
 *         return CGL_utils_super_fast_hash(&self.c_framebuffer, sizeof(CGL_framebuffer*))
 * 
 *     cdef set_c_framebuffer(self, CGL_framebuffer* c_framebuffer):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

static PyObject *__pyx_f_3cgl_11framebuffer_set_c_framebuffer(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, struct CGL_framebuffer *__pyx_v_c_framebuffer) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_c_framebuffer", 0);

  /* "cgl_wrapper.pyx":2541
 * 
 *     cdef set_c_framebuffer(self, CGL_framebuffer* c_framebuffer):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 *         self.c_framebuffer = c_framebuffer
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2542
 *     cdef set_c_framebuffer(self, CGL_framebuffer* c_framebuffer):
 *         if not self.has_been_destroyed:
 *             self.destroy()             # <<<<<<<<<<<<<<
 *         self.c_framebuffer = c_framebuffer
 *         self.has_been_destroyed = False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2542, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":2541
 * 
 *     cdef set_c_framebuffer(self, CGL_framebuffer* c_framebuffer):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 *         self.c_framebuffer = c_framebuffer
 */
  }

  /* "cgl_wrapper.pyx":2543
 *         if not self.has_been_destroyed:
 *             self.destroy()
 *         self.c_framebuffer = c_framebuffer             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
  __pyx_v_self->c_framebuffer = __pyx_v_c_framebuffer;

  /* "cgl_wrapper.pyx":2544
 *             self.destroy()
 *         self.c_framebuffer = c_framebuffer
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 * 
 *     def add_color_attachment(self, tex: texture):
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2540
 *         return CGL_utils_super_fast_hash(&self.c_framebuffer, sizeof(CGL_framebuffer*))
 * 
 *     cdef set_c_framebuffer(self, CGL_framebuffer* c_framebuffer):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.framebuffer.set_c_framebuffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2546
 *         self.has_been_destroyed = False
 * 
 *     def add_color_attachment(self, tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_framebuffer_add_color_attachment(self.c_framebuffer, tex.c_texture)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_15add_color_attachment(PyObject *__pyx_v_self, PyObject *__pyx_v_tex); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_15add_color_attachment(PyObject *__pyx_v_self, PyObject *__pyx_v_tex) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_color_attachment (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tex), __pyx_ptype_3cgl_texture, 1, "tex", 0))) __PYX_ERR(0, 2546, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_11framebuffer_14add_color_attachment(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self), ((struct __pyx_obj_3cgl_texture *)__pyx_v_tex));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_14add_color_attachment(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, struct __pyx_obj_3cgl_texture *__pyx_v_tex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_color_attachment", 0);

  /* "cgl_wrapper.pyx":2547
 * 
 *     def add_color_attachment(self, tex: texture):
 *         CGL_framebuffer_add_color_attachment(self.c_framebuffer, tex.c_texture)             # <<<<<<<<<<<<<<
 * 
 *     def get_color_attacment(self, index: int) -> texture:
 */
  CGL_framebuffer_add_color_attachment(__pyx_v_self->c_framebuffer, __pyx_v_tex->c_texture);

  /* "cgl_wrapper.pyx":2546
 *         self.has_been_destroyed = False
 * 
 *     def add_color_attachment(self, tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_framebuffer_add_color_attachment(self.c_framebuffer, tex.c_texture)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2549
 *         CGL_framebuffer_add_color_attachment(self.c_framebuffer, tex.c_texture)
 * 
 *     def get_color_attacment(self, index: int) -> texture:             # <<<<<<<<<<<<<<
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_attachment(self.c_framebuffer, index)
 *         if c_texture == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_11framebuffer_17get_color_attacment(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_11framebuffer_17get_color_attacment(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_color_attacment (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_16get_color_attacment(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_11framebuffer_16get_color_attacment(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, PyObject *__pyx_v_index) {
  struct CGL_texture *__pyx_v_c_texture;
  struct __pyx_obj_3cgl_texture *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_color_attacment", 0);

  /* "cgl_wrapper.pyx":2550
 * 
 *     def get_color_attacment(self, index: int) -> texture:
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_attachment(self.c_framebuffer, index)             # <<<<<<<<<<<<<<
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get color attachment")
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_index); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2550, __pyx_L1_error)
  __pyx_v_c_texture = CGL_framebuffer_get_color_attachment(__pyx_v_self->c_framebuffer, __pyx_t_1);

  /* "cgl_wrapper.pyx":2551
 *     def get_color_attacment(self, index: int) -> texture:
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_attachment(self.c_framebuffer, index)
 *         if c_texture == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to get color attachment")
 *         res = texture()
 */
  __pyx_t_2 = ((__pyx_v_c_texture == NULL) != 0);
  if (unlikely(__pyx_t_2)) {

    /* "cgl_wrapper.pyx":2552
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_attachment(self.c_framebuffer, index)
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get color attachment")             # <<<<<<<<<<<<<<
 *         res = texture()
 *         res.set_c_texture(c_texture)
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2552, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2551
 *     def get_color_attacment(self, index: int) -> texture:
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_attachment(self.c_framebuffer, index)
 *         if c_texture == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to get color attachment")
 *         res = texture()
 */
  }

  /* "cgl_wrapper.pyx":2553
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get color attachment")
 *         res = texture()             # <<<<<<<<<<<<<<
 *         res.set_c_texture(c_texture)
 *         return res
 */
  __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_res = ((struct __pyx_obj_3cgl_texture *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2554
 *             raise RuntimeError("Failed to get color attachment")
 *         res = texture()
 *         res.set_c_texture(c_texture)             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_res->__pyx_vtab)->set_c_texture(__pyx_v_res, __pyx_v_c_texture); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2555
 *         res = texture()
 *         res.set_c_texture(c_texture)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def bind(self):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2549
 *         CGL_framebuffer_add_color_attachment(self.c_framebuffer, tex.c_texture)
 * 
 *     def get_color_attacment(self, index: int) -> texture:             # <<<<<<<<<<<<<<
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_attachment(self.c_framebuffer, index)
 *         if c_texture == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.framebuffer.get_color_attacment", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2557
 *         return res
 * 
 *     def bind(self):             # <<<<<<<<<<<<<<
 *         CGL_framebuffer_bind(self.c_framebuffer)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_19bind(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_19bind(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bind (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_18bind(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_18bind(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bind", 0);

  /* "cgl_wrapper.pyx":2558
 * 
 *     def bind(self):
 *         CGL_framebuffer_bind(self.c_framebuffer)             # <<<<<<<<<<<<<<
 * 
 *     def set_user_data(self, data: object):
 */
  CGL_framebuffer_bind(__pyx_v_self->c_framebuffer);

  /* "cgl_wrapper.pyx":2557
 *         return res
 * 
 *     def bind(self):             # <<<<<<<<<<<<<<
 *         CGL_framebuffer_bind(self.c_framebuffer)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2560
 *         CGL_framebuffer_bind(self.c_framebuffer)
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_framebuffer_set_user_data(self.c_framebuffer, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_21set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_21set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_20set_user_data(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_20set_user_data(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data", 0);

  /* "cgl_wrapper.pyx":2561
 * 
 *     def set_user_data(self, data: object):
 *         CGL_framebuffer_set_user_data(self.c_framebuffer, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def get_user_data(self) -> object:
 */
  CGL_framebuffer_set_user_data(__pyx_v_self->c_framebuffer, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2560
 *         CGL_framebuffer_bind(self.c_framebuffer)
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_framebuffer_set_user_data(self.c_framebuffer, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2563
 *         CGL_framebuffer_set_user_data(self.c_framebuffer, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_framebuffer_get_user_data(self.c_framebuffer)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_23get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_23get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_22get_user_data(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_22get_user_data(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  __Pyx_RefNannySetupContext("get_user_data", 0);

  /* "cgl_wrapper.pyx":2564
 * 
 *     def get_user_data(self) -> object:
 *         return <object>CGL_framebuffer_get_user_data(self.c_framebuffer)             # <<<<<<<<<<<<<<
 * 
 *     def read_pixels(self, x: int, y: int, width: int, height: int) -> bytes:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = CGL_framebuffer_get_user_data(__pyx_v_self->c_framebuffer);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2563
 *         CGL_framebuffer_set_user_data(self.c_framebuffer, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_framebuffer_get_user_data(self.c_framebuffer)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2566
 *         return <object>CGL_framebuffer_get_user_data(self.c_framebuffer)
 * 
 *     def read_pixels(self, x: int, y: int, width: int, height: int) -> bytes:             # <<<<<<<<<<<<<<
 *         cdef CGL_int size = width * height * 4
 *         cdef void* data = stdlib.malloc(size)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_25read_pixels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_25read_pixels(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("read_pixels (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_width,&__pyx_n_s_height,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_pixels", 1, 4, 4, 1); __PYX_ERR(0, 2566, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_pixels", 1, 4, 4, 2); __PYX_ERR(0, 2566, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("read_pixels", 1, 4, 4, 3); __PYX_ERR(0, 2566, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_pixels") < 0)) __PYX_ERR(0, 2566, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
    __pyx_v_width = values[2];
    __pyx_v_height = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("read_pixels", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2566, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.framebuffer.read_pixels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_11framebuffer_24read_pixels(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_width, __pyx_v_height);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_24read_pixels(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_width, PyObject *__pyx_v_height) {
  CGL_int __pyx_v_size;
  void *__pyx_v_data;
  PyObject *__pyx_v_temp = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  CGL_int __pyx_t_3;
  CGL_int __pyx_t_4;
  CGL_int __pyx_t_5;
  CGL_int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("read_pixels", 0);

  /* "cgl_wrapper.pyx":2567
 * 
 *     def read_pixels(self, x: int, y: int, width: int, height: int) -> bytes:
 *         cdef CGL_int size = width * height * 4             # <<<<<<<<<<<<<<
 *         cdef void* data = stdlib.malloc(size)
 *         CGL_framebuffer_read_pixels(self.c_framebuffer, x, y, width, height, data)
 */
  __pyx_t_1 = PyNumber_Multiply(__pyx_v_width, __pyx_v_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_int_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2567, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_t_2); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2567, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_size = __pyx_t_3;

  /* "cgl_wrapper.pyx":2568
 *     def read_pixels(self, x: int, y: int, width: int, height: int) -> bytes:
 *         cdef CGL_int size = width * height * 4
 *         cdef void* data = stdlib.malloc(size)             # <<<<<<<<<<<<<<
 *         CGL_framebuffer_read_pixels(self.c_framebuffer, x, y, width, height, data)
 *         temp = <bytes>data
 */
  __pyx_v_data = malloc(__pyx_v_size);

  /* "cgl_wrapper.pyx":2569
 *         cdef CGL_int size = width * height * 4
 *         cdef void* data = stdlib.malloc(size)
 *         CGL_framebuffer_read_pixels(self.c_framebuffer, x, y, width, height, data)             # <<<<<<<<<<<<<<
 *         temp = <bytes>data
 *         res = copy.deepcopy(temp)
 */
  __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_x); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2569, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_v_y); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2569, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_5 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2569, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyInt_As_CGL_int(__pyx_v_height); if (unlikely((__pyx_t_6 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2569, __pyx_L1_error)
  CGL_framebuffer_read_pixels(__pyx_v_self->c_framebuffer, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_v_data);

  /* "cgl_wrapper.pyx":2570
 *         cdef void* data = stdlib.malloc(size)
 *         CGL_framebuffer_read_pixels(self.c_framebuffer, x, y, width, height, data)
 *         temp = <bytes>data             # <<<<<<<<<<<<<<
 *         res = copy.deepcopy(temp)
 *         stdlib.free(data)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_data);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_temp = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2571
 *         CGL_framebuffer_read_pixels(self.c_framebuffer, x, y, width, height, data)
 *         temp = <bytes>data
 *         res = copy.deepcopy(temp)             # <<<<<<<<<<<<<<
 *         stdlib.free(data)
 *         return res
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
    }
  }
  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_1, __pyx_v_temp) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_temp);
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2571, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_v_res = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2572
 *         temp = <bytes>data
 *         res = copy.deepcopy(temp)
 *         stdlib.free(data)             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
  free(__pyx_v_data);

  /* "cgl_wrapper.pyx":2573
 *         res = copy.deepcopy(temp)
 *         stdlib.free(data)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def get_mouse_pick_id(self, x: int, y: int, index: int) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyBytes_CheckExact(__pyx_v_res))||((__pyx_v_res) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_res)->tp_name), 0))) __PYX_ERR(0, 2573, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_res);
  __pyx_r = ((PyObject*)__pyx_v_res);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2566
 *         return <object>CGL_framebuffer_get_user_data(self.c_framebuffer)
 * 
 *     def read_pixels(self, x: int, y: int, width: int, height: int) -> bytes:             # <<<<<<<<<<<<<<
 *         cdef CGL_int size = width * height * 4
 *         cdef void* data = stdlib.malloc(size)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cgl.framebuffer.read_pixels", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_temp);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2575
 *         return res
 * 
 *     def get_mouse_pick_id(self, x: int, y: int, index: int) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_framebuffer_get_mouse_pick_id(self.c_framebuffer, x, y, index)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_27get_mouse_pick_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_27get_mouse_pick_id(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_index = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_mouse_pick_id (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_index,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_mouse_pick_id", 1, 3, 3, 1); __PYX_ERR(0, 2575, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_mouse_pick_id", 1, 3, 3, 2); __PYX_ERR(0, 2575, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_mouse_pick_id") < 0)) __PYX_ERR(0, 2575, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
    __pyx_v_index = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_mouse_pick_id", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2575, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.framebuffer.get_mouse_pick_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_11framebuffer_26get_mouse_pick_id(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_26get_mouse_pick_id(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  CGL_int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_mouse_pick_id", 0);

  /* "cgl_wrapper.pyx":2576
 * 
 *     def get_mouse_pick_id(self, x: int, y: int, index: int) -> int:
 *         return CGL_framebuffer_get_mouse_pick_id(self.c_framebuffer, x, y, index)             # <<<<<<<<<<<<<<
 * 
 *     def get_color_texture(self) -> texture:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_x); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2576, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_y); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2576, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_index); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2576, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyInt_From_CGL_int(CGL_framebuffer_get_mouse_pick_id(__pyx_v_self->c_framebuffer, __pyx_t_1, __pyx_t_2, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2575
 *         return res
 * 
 *     def get_mouse_pick_id(self, x: int, y: int, index: int) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_framebuffer_get_mouse_pick_id(self.c_framebuffer, x, y, index)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.framebuffer.get_mouse_pick_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2578
 *         return CGL_framebuffer_get_mouse_pick_id(self.c_framebuffer, x, y, index)
 * 
 *     def get_color_texture(self) -> texture:             # <<<<<<<<<<<<<<
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_texture(self.c_framebuffer)
 *         if c_texture == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_11framebuffer_29get_color_texture(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_11framebuffer_29get_color_texture(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_color_texture (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_28get_color_texture(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_11framebuffer_28get_color_texture(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  struct CGL_texture *__pyx_v_c_texture;
  struct __pyx_obj_3cgl_texture *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_color_texture", 0);

  /* "cgl_wrapper.pyx":2579
 * 
 *     def get_color_texture(self) -> texture:
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_texture(self.c_framebuffer)             # <<<<<<<<<<<<<<
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get color texture")
 */
  __pyx_v_c_texture = CGL_framebuffer_get_color_texture(__pyx_v_self->c_framebuffer);

  /* "cgl_wrapper.pyx":2580
 *     def get_color_texture(self) -> texture:
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_texture(self.c_framebuffer)
 *         if c_texture == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to get color texture")
 *         res = texture()
 */
  __pyx_t_1 = ((__pyx_v_c_texture == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":2581
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_texture(self.c_framebuffer)
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get color texture")             # <<<<<<<<<<<<<<
 *         res = texture()
 *         res.set_c_texture(c_texture)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2581, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2580
 *     def get_color_texture(self) -> texture:
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_texture(self.c_framebuffer)
 *         if c_texture == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to get color texture")
 *         res = texture()
 */
  }

  /* "cgl_wrapper.pyx":2582
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get color texture")
 *         res = texture()             # <<<<<<<<<<<<<<
 *         res.set_c_texture(c_texture)
 *         return res
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = ((struct __pyx_obj_3cgl_texture *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2583
 *             raise RuntimeError("Failed to get color texture")
 *         res = texture()
 *         res.set_c_texture(c_texture)             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_res->__pyx_vtab)->set_c_texture(__pyx_v_res, __pyx_v_c_texture); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2583, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2584
 *         res = texture()
 *         res.set_c_texture(c_texture)
 *         return res             # <<<<<<<<<<<<<<
 * 
 *     def get_depth_texture(self) -> texture:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2578
 *         return CGL_framebuffer_get_mouse_pick_id(self.c_framebuffer, x, y, index)
 * 
 *     def get_color_texture(self) -> texture:             # <<<<<<<<<<<<<<
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_texture(self.c_framebuffer)
 *         if c_texture == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.framebuffer.get_color_texture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2586
 *         return res
 * 
 *     def get_depth_texture(self) -> texture:             # <<<<<<<<<<<<<<
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_depth_texture(self.c_framebuffer)
 *         if c_texture == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_11framebuffer_31get_depth_texture(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_11framebuffer_31get_depth_texture(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_depth_texture (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_30get_depth_texture(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_11framebuffer_30get_depth_texture(struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  struct CGL_texture *__pyx_v_c_texture;
  struct __pyx_obj_3cgl_texture *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_depth_texture", 0);

  /* "cgl_wrapper.pyx":2587
 * 
 *     def get_depth_texture(self) -> texture:
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_depth_texture(self.c_framebuffer)             # <<<<<<<<<<<<<<
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get depth texture")
 */
  __pyx_v_c_texture = CGL_framebuffer_get_depth_texture(__pyx_v_self->c_framebuffer);

  /* "cgl_wrapper.pyx":2588
 *     def get_depth_texture(self) -> texture:
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_depth_texture(self.c_framebuffer)
 *         if c_texture == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to get depth texture")
 *         res = texture()
 */
  __pyx_t_1 = ((__pyx_v_c_texture == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":2589
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_depth_texture(self.c_framebuffer)
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get depth texture")             # <<<<<<<<<<<<<<
 *         res = texture()
 *         res.set_c_texture(c_texture)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2589, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2589, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2588
 *     def get_depth_texture(self) -> texture:
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_depth_texture(self.c_framebuffer)
 *         if c_texture == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to get depth texture")
 *         res = texture()
 */
  }

  /* "cgl_wrapper.pyx":2590
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get depth texture")
 *         res = texture()             # <<<<<<<<<<<<<<
 *         res.set_c_texture(c_texture)
 *         return res
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = ((struct __pyx_obj_3cgl_texture *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2591
 *             raise RuntimeError("Failed to get depth texture")
 *         res = texture()
 *         res.set_c_texture(c_texture)             # <<<<<<<<<<<<<<
 *         return res
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_res->__pyx_vtab)->set_c_texture(__pyx_v_res, __pyx_v_c_texture); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2591, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2592
 *         res = texture()
 *         res.set_c_texture(c_texture)
 *         return res             # <<<<<<<<<<<<<<
 * 
 * def framebuffer_create_from_default(wnd: window) -> framebuffer:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2586
 *         return res
 * 
 *     def get_depth_texture(self) -> texture:             # <<<<<<<<<<<<<<
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_depth_texture(self.c_framebuffer)
 *         if c_texture == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.framebuffer.get_depth_texture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_32__reduce_cython__(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_framebuffer *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.framebuffer.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_11framebuffer_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_11framebuffer_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_11framebuffer_34__setstate_cython__(((struct __pyx_obj_3cgl_framebuffer *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_11framebuffer_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_framebuffer *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.framebuffer.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2594
 *         return res
 * 
 * def framebuffer_create_from_default(wnd: window) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_from_default(wnd.c_window)
 *     if c_framebuffer == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_framebuffer *__pyx_pw_3cgl_209framebuffer_create_from_default(PyObject *__pyx_self, PyObject *__pyx_v_wnd); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_209framebuffer_create_from_default = {"framebuffer_create_from_default", (PyCFunction)__pyx_pw_3cgl_209framebuffer_create_from_default, METH_O, 0};
static struct __pyx_obj_3cgl_framebuffer *__pyx_pw_3cgl_209framebuffer_create_from_default(PyObject *__pyx_self, PyObject *__pyx_v_wnd) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_framebuffer *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("framebuffer_create_from_default (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_wnd), __pyx_ptype_3cgl_window, 1, "wnd", 0))) __PYX_ERR(0, 2594, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_208framebuffer_create_from_default(__pyx_self, ((struct __pyx_obj_3cgl_window *)__pyx_v_wnd));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_framebuffer *__pyx_pf_3cgl_208framebuffer_create_from_default(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_window *__pyx_v_wnd) {
  struct CGL_framebuffer *__pyx_v_c_framebuffer;
  struct __pyx_obj_3cgl_framebuffer *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_framebuffer *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("framebuffer_create_from_default", 0);

  /* "cgl_wrapper.pyx":2595
 * 
 * def framebuffer_create_from_default(wnd: window) -> framebuffer:
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_from_default(wnd.c_window)             # <<<<<<<<<<<<<<
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create framebuffer from default")
 */
  __pyx_v_c_framebuffer = CGL_framebuffer_create_from_default(__pyx_v_wnd->c_window);

  /* "cgl_wrapper.pyx":2596
 * def framebuffer_create_from_default(wnd: window) -> framebuffer:
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_from_default(wnd.c_window)
 *     if c_framebuffer == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create framebuffer from default")
 *     res = framebuffer()
 */
  __pyx_t_1 = ((__pyx_v_c_framebuffer == NULL) != 0);
  if (unlikely(__pyx_t_1)) {

    /* "cgl_wrapper.pyx":2597
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_from_default(wnd.c_window)
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create framebuffer from default")             # <<<<<<<<<<<<<<
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)
 */
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2597, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __PYX_ERR(0, 2597, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2596
 * def framebuffer_create_from_default(wnd: window) -> framebuffer:
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_from_default(wnd.c_window)
 *     if c_framebuffer == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create framebuffer from default")
 *     res = framebuffer()
 */
  }

  /* "cgl_wrapper.pyx":2598
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create framebuffer from default")
 *     res = framebuffer()             # <<<<<<<<<<<<<<
 *     res.set_c_framebuffer(c_framebuffer)
 *     return res
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_framebuffer)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_res = ((struct __pyx_obj_3cgl_framebuffer *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2599
 *         raise RuntimeError("Failed to create framebuffer from default")
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_3cgl_framebuffer *)__pyx_v_res->__pyx_vtab)->set_c_framebuffer(__pyx_v_res, __pyx_v_c_framebuffer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2600
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def framebuffer_create(width: int, height: int) -> framebuffer:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2594
 *         return res
 * 
 * def framebuffer_create_from_default(wnd: window) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_from_default(wnd.c_window)
 *     if c_framebuffer == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.framebuffer_create_from_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2602
 *     return res
 * 
 * def framebuffer_create(width: int, height: int) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create(width, height)
 *     if c_framebuffer == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_framebuffer *__pyx_pw_3cgl_211framebuffer_create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_211framebuffer_create = {"framebuffer_create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_211framebuffer_create, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_framebuffer *__pyx_pw_3cgl_211framebuffer_create(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_framebuffer *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("framebuffer_create (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("framebuffer_create", 1, 2, 2, 1); __PYX_ERR(0, 2602, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "framebuffer_create") < 0)) __PYX_ERR(0, 2602, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_width = values[0];
    __pyx_v_height = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("framebuffer_create", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2602, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.framebuffer_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_210framebuffer_create(__pyx_self, __pyx_v_width, __pyx_v_height);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_framebuffer *__pyx_pf_3cgl_210framebuffer_create(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height) {
  struct CGL_framebuffer *__pyx_v_c_framebuffer;
  struct __pyx_obj_3cgl_framebuffer *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_framebuffer *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("framebuffer_create", 0);

  /* "cgl_wrapper.pyx":2603
 * 
 * def framebuffer_create(width: int, height: int) -> framebuffer:
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create(width, height)             # <<<<<<<<<<<<<<
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create framebuffer")
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2603, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_height); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2603, __pyx_L1_error)
  __pyx_v_c_framebuffer = CGL_framebuffer_create(__pyx_t_1, __pyx_t_2);

  /* "cgl_wrapper.pyx":2604
 * def framebuffer_create(width: int, height: int) -> framebuffer:
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create(width, height)
 *     if c_framebuffer == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create framebuffer")
 *     res = framebuffer()
 */
  __pyx_t_3 = ((__pyx_v_c_framebuffer == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "cgl_wrapper.pyx":2605
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create(width, height)
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create framebuffer")             # <<<<<<<<<<<<<<
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__60, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 2605, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2604
 * def framebuffer_create(width: int, height: int) -> framebuffer:
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create(width, height)
 *     if c_framebuffer == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create framebuffer")
 *     res = framebuffer()
 */
  }

  /* "cgl_wrapper.pyx":2606
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create framebuffer")
 *     res = framebuffer()             # <<<<<<<<<<<<<<
 *     res.set_c_framebuffer(c_framebuffer)
 *     return res
 */
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_framebuffer)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_res = ((struct __pyx_obj_3cgl_framebuffer *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2607
 *         raise RuntimeError("Failed to create framebuffer")
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_3cgl_framebuffer *)__pyx_v_res->__pyx_vtab)->set_c_framebuffer(__pyx_v_res, __pyx_v_c_framebuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2608
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def framebuffer_create_basic(width: int, height: int) -> framebuffer:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2602
 *     return res
 * 
 * def framebuffer_create(width: int, height: int) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create(width, height)
 *     if c_framebuffer == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.framebuffer_create", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2610
 *     return res
 * 
 * def framebuffer_create_basic(width: int, height: int) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_basic(width, height)
 *     if c_framebuffer == NULL:
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_framebuffer *__pyx_pw_3cgl_213framebuffer_create_basic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_213framebuffer_create_basic = {"framebuffer_create_basic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_213framebuffer_create_basic, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_framebuffer *__pyx_pw_3cgl_213framebuffer_create_basic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_framebuffer *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("framebuffer_create_basic (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("framebuffer_create_basic", 1, 2, 2, 1); __PYX_ERR(0, 2610, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "framebuffer_create_basic") < 0)) __PYX_ERR(0, 2610, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_width = values[0];
    __pyx_v_height = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("framebuffer_create_basic", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2610, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.framebuffer_create_basic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_212framebuffer_create_basic(__pyx_self, __pyx_v_width, __pyx_v_height);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_framebuffer *__pyx_pf_3cgl_212framebuffer_create_basic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height) {
  struct CGL_framebuffer *__pyx_v_c_framebuffer;
  struct __pyx_obj_3cgl_framebuffer *__pyx_v_res = NULL;
  struct __pyx_obj_3cgl_framebuffer *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("framebuffer_create_basic", 0);

  /* "cgl_wrapper.pyx":2611
 * 
 * def framebuffer_create_basic(width: int, height: int) -> framebuffer:
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_basic(width, height)             # <<<<<<<<<<<<<<
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create basic framebuffer")
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_height); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2611, __pyx_L1_error)
  __pyx_v_c_framebuffer = CGL_framebuffer_create_basic(__pyx_t_1, __pyx_t_2);

  /* "cgl_wrapper.pyx":2612
 * def framebuffer_create_basic(width: int, height: int) -> framebuffer:
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_basic(width, height)
 *     if c_framebuffer == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create basic framebuffer")
 *     res = framebuffer()
 */
  __pyx_t_3 = ((__pyx_v_c_framebuffer == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "cgl_wrapper.pyx":2613
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_basic(width, height)
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create basic framebuffer")             # <<<<<<<<<<<<<<
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)
 */
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__61, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2613, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(0, 2613, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2612
 * def framebuffer_create_basic(width: int, height: int) -> framebuffer:
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_basic(width, height)
 *     if c_framebuffer == NULL:             # <<<<<<<<<<<<<<
 *         raise RuntimeError("Failed to create basic framebuffer")
 *     res = framebuffer()
 */
  }

  /* "cgl_wrapper.pyx":2614
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create basic framebuffer")
 *     res = framebuffer()             # <<<<<<<<<<<<<<
 *     res.set_c_framebuffer(c_framebuffer)
 *     return res
 */
  __pyx_t_4 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_framebuffer)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_res = ((struct __pyx_obj_3cgl_framebuffer *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2615
 *         raise RuntimeError("Failed to create basic framebuffer")
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)             # <<<<<<<<<<<<<<
 *     return res
 * 
 */
  __pyx_t_4 = ((struct __pyx_vtabstruct_3cgl_framebuffer *)__pyx_v_res->__pyx_vtab)->set_c_framebuffer(__pyx_v_res, __pyx_v_c_framebuffer); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2615, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":2616
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)
 *     return res             # <<<<<<<<<<<<<<
 * 
 * def gl_clear(r: float, g: float, b: float, a: float):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = __pyx_v_res;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2610
 *     return res
 * 
 * def framebuffer_create_basic(width: int, height: int) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_basic(width, height)
 *     if c_framebuffer == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.framebuffer_create_basic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_res);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2618
 *     return res
 * 
 * def gl_clear(r: float, g: float, b: float, a: float):             # <<<<<<<<<<<<<<
 *     CGL_gl_clear(r, g, b, a)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_215gl_clear(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_215gl_clear = {"gl_clear", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_215gl_clear, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_215gl_clear(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_r;
  double __pyx_v_g;
  double __pyx_v_b;
  double __pyx_v_a;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gl_clear (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_r,&__pyx_n_s_g,&__pyx_n_s_b,&__pyx_n_s_a,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("gl_clear", 1, 4, 4, 1); __PYX_ERR(0, 2618, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("gl_clear", 1, 4, 4, 2); __PYX_ERR(0, 2618, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("gl_clear", 1, 4, 4, 3); __PYX_ERR(0, 2618, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gl_clear") < 0)) __PYX_ERR(0, 2618, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_r = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2618, __pyx_L3_error)
    __pyx_v_g = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_g == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2618, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2618, __pyx_L3_error)
    __pyx_v_a = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_a == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2618, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gl_clear", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2618, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.gl_clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_214gl_clear(__pyx_self, __pyx_v_r, __pyx_v_g, __pyx_v_b, __pyx_v_a);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_214gl_clear(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_r, double __pyx_v_g, double __pyx_v_b, double __pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gl_clear", 0);

  /* "cgl_wrapper.pyx":2619
 * 
 * def gl_clear(r: float, g: float, b: float, a: float):
 *     CGL_gl_clear(r, g, b, a)             # <<<<<<<<<<<<<<
 * 
 * def gl_init() -> bool:
 */
  CGL_gl_clear(__pyx_v_r, __pyx_v_g, __pyx_v_b, __pyx_v_a);

  /* "cgl_wrapper.pyx":2618
 *     return res
 * 
 * def gl_clear(r: float, g: float, b: float, a: float):             # <<<<<<<<<<<<<<
 *     CGL_gl_clear(r, g, b, a)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2621
 *     CGL_gl_clear(r, g, b, a)
 * 
 * def gl_init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_gl_init()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_217gl_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_217gl_init = {"gl_init", (PyCFunction)__pyx_pw_3cgl_217gl_init, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_217gl_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gl_init (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_216gl_init(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_216gl_init(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gl_init", 0);

  /* "cgl_wrapper.pyx":2622
 * 
 * def gl_init() -> bool:
 *     return CGL_gl_init()             # <<<<<<<<<<<<<<
 * 
 * def gl_shutdown():
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_gl_init()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2621
 *     CGL_gl_clear(r, g, b, a)
 * 
 * def gl_init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_gl_init()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.gl_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2624
 *     return CGL_gl_init()
 * 
 * def gl_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_gl_shutdown()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_219gl_shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_219gl_shutdown = {"gl_shutdown", (PyCFunction)__pyx_pw_3cgl_219gl_shutdown, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_219gl_shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gl_shutdown (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_218gl_shutdown(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_218gl_shutdown(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gl_shutdown", 0);

  /* "cgl_wrapper.pyx":2625
 * 
 * def gl_shutdown():
 *     CGL_gl_shutdown()             # <<<<<<<<<<<<<<
 * 
 * def gl_render_screen_quad():
 */
  CGL_gl_shutdown();

  /* "cgl_wrapper.pyx":2624
 *     return CGL_gl_init()
 * 
 * def gl_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_gl_shutdown()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2627
 *     CGL_gl_shutdown()
 * 
 * def gl_render_screen_quad():             # <<<<<<<<<<<<<<
 *     CGL_gl_render_screen_quad()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_221gl_render_screen_quad(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_221gl_render_screen_quad = {"gl_render_screen_quad", (PyCFunction)__pyx_pw_3cgl_221gl_render_screen_quad, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_221gl_render_screen_quad(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gl_render_screen_quad (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_220gl_render_screen_quad(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_220gl_render_screen_quad(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gl_render_screen_quad", 0);

  /* "cgl_wrapper.pyx":2628
 * 
 * def gl_render_screen_quad():
 *     CGL_gl_render_screen_quad()             # <<<<<<<<<<<<<<
 * 
 * cdef class mesh_gpu:
 */
  CGL_gl_render_screen_quad();

  /* "cgl_wrapper.pyx":2627
 *     CGL_gl_shutdown()
 * 
 * def gl_render_screen_quad():             # <<<<<<<<<<<<<<
 *     CGL_gl_render_screen_quad()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2636
 * 
 *     @property
 *     def name(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_4name___get__(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_4name___get__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2637
 *     @property
 *     def name(self):
 *         return self.name             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, name: str = "GPU Mesh"):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2636
 * 
 *     @property
 *     def name(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2639
 *         return self.name
 * 
 *     def __init__(self, name: str = "GPU Mesh"):             # <<<<<<<<<<<<<<
 *         self.c_mesh = CGL_mesh_gpu_create()
 *         self.has_been_destroyed = False
 */

/* Python wrapper */
static int __pyx_pw_3cgl_8mesh_gpu_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_8mesh_gpu_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject*)__pyx_kp_s_GPU_Mesh);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2639, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2639, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_gpu.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2639, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu___init__(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_8mesh_gpu___init__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":2640
 * 
 *     def __init__(self, name: str = "GPU Mesh"):
 *         self.c_mesh = CGL_mesh_gpu_create()             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 *         self.name = name
 */
  __pyx_v_self->c_mesh = CGL_mesh_gpu_create();

  /* "cgl_wrapper.pyx":2641
 *     def __init__(self, name: str = "GPU Mesh"):
 *         self.c_mesh = CGL_mesh_gpu_create()
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 *         self.name = name
 * 
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2642
 *         self.c_mesh = CGL_mesh_gpu_create()
 *         self.has_been_destroyed = False
 *         self.name = name             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_name;

  /* "cgl_wrapper.pyx":2639
 *         return self.name
 * 
 *     def __init__(self, name: str = "GPU Mesh"):             # <<<<<<<<<<<<<<
 *         self.c_mesh = CGL_mesh_gpu_create()
 *         self.has_been_destroyed = False
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2644
 *         self.name = name
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_8mesh_gpu_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_8mesh_gpu_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_8mesh_gpu_2__dealloc__(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_8mesh_gpu_2__dealloc__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":2645
 * 
 *     def __dealloc__(self):
 *         self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2644
 *         self.name = name
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("cgl.mesh_gpu.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":2647
 *         self.destroy()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_gpu({self.name})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_4__repr__(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_4__repr__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":2648
 * 
 *     def __repr__(self):
 *         return f"mesh_gpu({self.name})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_mesh_gpu);
  __pyx_t_2 += 9;
  __Pyx_GIVEREF(__pyx_kp_u_mesh_gpu);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_mesh_gpu);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_self->name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2647
 *         self.destroy()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_gpu({self.name})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.mesh_gpu.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2650
 *         return f"mesh_gpu({self.name})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_gpu({self.name})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_6__str__(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_6__str__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":2651
 * 
 *     def __str__(self):
 *         return f"mesh_gpu({self.name})"             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_mesh_gpu);
  __pyx_t_2 += 9;
  __Pyx_GIVEREF(__pyx_kp_u_mesh_gpu);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_mesh_gpu);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_self->name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2650
 *         return f"mesh_gpu({self.name})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"mesh_gpu({self.name})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.mesh_gpu.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2653
 *         return f"mesh_gpu({self.name})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_8mesh_gpu_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_8mesh_gpu_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_8__hash__(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_8mesh_gpu_8__hash__(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":2654
 * 
 *     def __hash__(self):
 *         return self.get_id()             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_AsHash_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_hash_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2653
 *         return f"mesh_gpu({self.name})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.mesh_gpu.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2656
 *         return self.get_id()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_mesh_gpu_destroy(self.c_mesh)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_11destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_11destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_10destroy(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_10destroy(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "cgl_wrapper.pyx":2657
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_mesh_gpu_destroy(self.c_mesh)
 *             self.has_been_destroyed = True
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2658
 *     def destroy(self):
 *         if not self.has_been_destroyed:
 *             CGL_mesh_gpu_destroy(self.c_mesh)             # <<<<<<<<<<<<<<
 *             self.has_been_destroyed = True
 * 
 */
    CGL_mesh_gpu_destroy(__pyx_v_self->c_mesh);

    /* "cgl_wrapper.pyx":2659
 *         if not self.has_been_destroyed:
 *             CGL_mesh_gpu_destroy(self.c_mesh)
 *             self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 * 
 *     cdef set_c_mesh(self, CGL_mesh_gpu* c_mesh):
 */
    __pyx_v_self->has_been_destroyed = 1;

    /* "cgl_wrapper.pyx":2657
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_mesh_gpu_destroy(self.c_mesh)
 *             self.has_been_destroyed = True
 */
  }

  /* "cgl_wrapper.pyx":2656
 *         return self.get_id()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_mesh_gpu_destroy(self.c_mesh)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2661
 *             self.has_been_destroyed = True
 * 
 *     cdef set_c_mesh(self, CGL_mesh_gpu* c_mesh):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

static PyObject *__pyx_f_3cgl_8mesh_gpu_set_c_mesh(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, struct CGL_mesh_gpu *__pyx_v_c_mesh) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_c_mesh", 0);

  /* "cgl_wrapper.pyx":2662
 * 
 *     cdef set_c_mesh(self, CGL_mesh_gpu* c_mesh):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 *         self.c_mesh = c_mesh
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2663
 *     cdef set_c_mesh(self, CGL_mesh_gpu* c_mesh):
 *         if not self.has_been_destroyed:
 *             self.destroy()             # <<<<<<<<<<<<<<
 *         self.c_mesh = c_mesh
 *         self.has_been_destroyed = False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2663, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":2662
 * 
 *     cdef set_c_mesh(self, CGL_mesh_gpu* c_mesh):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 *         self.c_mesh = c_mesh
 */
  }

  /* "cgl_wrapper.pyx":2664
 *         if not self.has_been_destroyed:
 *             self.destroy()
 *         self.c_mesh = c_mesh             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
  __pyx_v_self->c_mesh = __pyx_v_c_mesh;

  /* "cgl_wrapper.pyx":2665
 *             self.destroy()
 *         self.c_mesh = c_mesh
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 * 
 *     def get_id(self) -> int:
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2661
 *             self.has_been_destroyed = True
 * 
 *     cdef set_c_mesh(self, CGL_mesh_gpu* c_mesh):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.mesh_gpu.set_c_mesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2667
 *         self.has_been_destroyed = False
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(&self.c_mesh, sizeof(CGL_mesh_gpu*))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_13get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_13get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_id (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_12get_id(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_12get_id(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_id", 0);

  /* "cgl_wrapper.pyx":2668
 * 
 *     def get_id(self) -> int:
 *         return CGL_utils_super_fast_hash(&self.c_mesh, sizeof(CGL_mesh_gpu*))             # <<<<<<<<<<<<<<
 * 
 *     def render(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(CGL_utils_super_fast_hash((&__pyx_v_self->c_mesh), (sizeof(struct CGL_mesh_gpu *)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2668, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2667
 *         self.has_been_destroyed = False
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(&self.c_mesh, sizeof(CGL_mesh_gpu*))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_gpu.get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2670
 *         return CGL_utils_super_fast_hash(&self.c_mesh, sizeof(CGL_mesh_gpu*))
 * 
 *     def render(self):             # <<<<<<<<<<<<<<
 *         CGL_mesh_gpu_render(self.c_mesh)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_15render(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_15render(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_14render(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_14render(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render", 0);

  /* "cgl_wrapper.pyx":2671
 * 
 *     def render(self):
 *         CGL_mesh_gpu_render(self.c_mesh)             # <<<<<<<<<<<<<<
 * 
 *     def render_instanced(self, count: int):
 */
  CGL_mesh_gpu_render(__pyx_v_self->c_mesh);

  /* "cgl_wrapper.pyx":2670
 *         return CGL_utils_super_fast_hash(&self.c_mesh, sizeof(CGL_mesh_gpu*))
 * 
 *     def render(self):             # <<<<<<<<<<<<<<
 *         CGL_mesh_gpu_render(self.c_mesh)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2673
 *         CGL_mesh_gpu_render(self.c_mesh)
 * 
 *     def render_instanced(self, count: int):             # <<<<<<<<<<<<<<
 *         CGL_mesh_gpu_render_instanced(self.c_mesh, count)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_17render_instanced(PyObject *__pyx_v_self, PyObject *__pyx_v_count); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_17render_instanced(PyObject *__pyx_v_self, PyObject *__pyx_v_count) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render_instanced (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_16render_instanced(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self), ((PyObject *)__pyx_v_count));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_16render_instanced(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, PyObject *__pyx_v_count) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("render_instanced", 0);

  /* "cgl_wrapper.pyx":2674
 * 
 *     def render_instanced(self, count: int):
 *         CGL_mesh_gpu_render_instanced(self.c_mesh, count)             # <<<<<<<<<<<<<<
 * 
 *     def set_user_data(self, data: object):
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint32_t(__pyx_v_count); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2674, __pyx_L1_error)
  CGL_mesh_gpu_render_instanced(__pyx_v_self->c_mesh, __pyx_t_1);

  /* "cgl_wrapper.pyx":2673
 *         CGL_mesh_gpu_render(self.c_mesh)
 * 
 *     def render_instanced(self, count: int):             # <<<<<<<<<<<<<<
 *         CGL_mesh_gpu_render_instanced(self.c_mesh, count)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.mesh_gpu.render_instanced", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2676
 *         CGL_mesh_gpu_render_instanced(self.c_mesh, count)
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_mesh_gpu_set_user_data(self.c_mesh, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_19set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_19set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_18set_user_data(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_18set_user_data(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data", 0);

  /* "cgl_wrapper.pyx":2677
 * 
 *     def set_user_data(self, data: object):
 *         CGL_mesh_gpu_set_user_data(self.c_mesh, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def get_user_data(self) -> object:
 */
  CGL_mesh_gpu_set_user_data(__pyx_v_self->c_mesh, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2676
 *         CGL_mesh_gpu_render_instanced(self.c_mesh, count)
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_mesh_gpu_set_user_data(self.c_mesh, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2679
 *         CGL_mesh_gpu_set_user_data(self.c_mesh, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_mesh_gpu_get_user_data(self.c_mesh)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_21get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_21get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_20get_user_data(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_20get_user_data(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  __Pyx_RefNannySetupContext("get_user_data", 0);

  /* "cgl_wrapper.pyx":2680
 * 
 *     def get_user_data(self) -> object:
 *         return <object>CGL_mesh_gpu_get_user_data(self.c_mesh)             # <<<<<<<<<<<<<<
 * 
 *     def upload_mesh_cpu(self, mesh: mesh_cpu, static_draw: bool = True):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = CGL_mesh_gpu_get_user_data(__pyx_v_self->c_mesh);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2679
 *         CGL_mesh_gpu_set_user_data(self.c_mesh, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_mesh_gpu_get_user_data(self.c_mesh)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2682
 *         return <object>CGL_mesh_gpu_get_user_data(self.c_mesh)
 * 
 *     def upload_mesh_cpu(self, mesh: mesh_cpu, static_draw: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_mesh_gpu_upload(self.c_mesh, mesh.c_mesh, static_draw)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_23upload_mesh_cpu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_23upload_mesh_cpu(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_mesh = 0;
  bool __pyx_v_static_draw;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upload_mesh_cpu (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mesh,&__pyx_n_s_static_draw,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mesh)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_static_draw);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "upload_mesh_cpu") < 0)) __PYX_ERR(0, 2682, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_mesh = ((struct __pyx_obj_3cgl_mesh_cpu *)values[0]);
    if (values[1]) {
      __pyx_v_static_draw = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_static_draw == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2682, __pyx_L3_error)
    } else {
      __pyx_v_static_draw = ((bool)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("upload_mesh_cpu", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2682, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.mesh_gpu.upload_mesh_cpu", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mesh), __pyx_ptype_3cgl_mesh_cpu, 1, "mesh", 0))) __PYX_ERR(0, 2682, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_22upload_mesh_cpu(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self), __pyx_v_mesh, __pyx_v_static_draw);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_22upload_mesh_cpu(struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_mesh, bool __pyx_v_static_draw) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upload_mesh_cpu", 0);

  /* "cgl_wrapper.pyx":2683
 * 
 *     def upload_mesh_cpu(self, mesh: mesh_cpu, static_draw: bool = True):
 *         CGL_mesh_gpu_upload(self.c_mesh, mesh.c_mesh, static_draw)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  CGL_mesh_gpu_upload(__pyx_v_self->c_mesh, __pyx_v_mesh->c_mesh, __pyx_v_static_draw);

  /* "cgl_wrapper.pyx":2682
 *         return <object>CGL_mesh_gpu_get_user_data(self.c_mesh)
 * 
 *     def upload_mesh_cpu(self, mesh: mesh_cpu, static_draw: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_mesh_gpu_upload(self.c_mesh, mesh.c_mesh, static_draw)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_25__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_24__reduce_cython__(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__62, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_gpu.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_8mesh_gpu_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_8mesh_gpu_27__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_8mesh_gpu_26__setstate_cython__(((struct __pyx_obj_3cgl_mesh_gpu *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_8mesh_gpu_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_mesh_gpu *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__63, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.mesh_gpu.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2693
 * 
 *     @property
 *     def name(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_4name_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_4name___get__(((struct __pyx_obj_3cgl_shader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_4name___get__(struct __pyx_obj_3cgl_shader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2694
 *     @property
 *     def name(self):
 *         return self.name             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, name: str = "Shader"):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->name);
  __pyx_r = __pyx_v_self->name;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2693
 * 
 *     @property
 *     def name(self):             # <<<<<<<<<<<<<<
 *         return self.name
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2696
 *         return self.name
 * 
 *     def __init__(self, name: str = "Shader"):             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = True
 *         self.name = name
 */

/* Python wrapper */
static int __pyx_pw_3cgl_6shader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_6shader_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject*)__pyx_n_s_Shader);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2696, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2696, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2696, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader___init__(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_6shader___init__(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":2697
 * 
 *     def __init__(self, name: str = "Shader"):
 *         self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 *         self.name = name
 *         self.uniform_map = {}
 */
  __pyx_v_self->has_been_destroyed = 1;

  /* "cgl_wrapper.pyx":2698
 *     def __init__(self, name: str = "Shader"):
 *         self.has_been_destroyed = True
 *         self.name = name             # <<<<<<<<<<<<<<
 *         self.uniform_map = {}
 * 
 */
  __Pyx_INCREF(__pyx_v_name);
  __Pyx_GIVEREF(__pyx_v_name);
  __Pyx_GOTREF(__pyx_v_self->name);
  __Pyx_DECREF(__pyx_v_self->name);
  __pyx_v_self->name = __pyx_v_name;

  /* "cgl_wrapper.pyx":2699
 *         self.has_been_destroyed = True
 *         self.name = name
 *         self.uniform_map = {}             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->uniform_map);
  __Pyx_DECREF(__pyx_v_self->uniform_map);
  __pyx_v_self->uniform_map = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2696
 *         return self.name
 * 
 *     def __init__(self, name: str = "Shader"):             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = True
 *         self.name = name
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shader.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2701
 *         self.uniform_map = {}
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_6shader_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_6shader_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_6shader_2__dealloc__(((struct __pyx_obj_3cgl_shader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_6shader_2__dealloc__(struct __pyx_obj_3cgl_shader *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":2702
 * 
 *     def __dealloc__(self):
 *         self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2702, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2701
 *         self.uniform_map = {}
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("cgl.shader.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":2704
 *         self.destroy()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"shader({self.name})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_4__repr__(((struct __pyx_obj_3cgl_shader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_4__repr__(struct __pyx_obj_3cgl_shader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":2705
 * 
 *     def __repr__(self):
 *         return f"shader({self.name})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_shader);
  __pyx_t_2 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_shader);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_shader);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_self->name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2705, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2704
 *         self.destroy()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"shader({self.name})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.shader.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2707
 *         return f"shader({self.name})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"shader({self.name})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_6__str__(((struct __pyx_obj_3cgl_shader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_6__str__(struct __pyx_obj_3cgl_shader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":2708
 * 
 *     def __str__(self):
 *         return f"shader({self.name})"             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_shader);
  __pyx_t_2 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_shader);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_shader);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_self->name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2708, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2707
 *         return f"shader({self.name})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"shader({self.name})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.shader.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2710
 *         return f"shader({self.name})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_6shader_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_6shader_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_8__hash__(((struct __pyx_obj_3cgl_shader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_6shader_8__hash__(struct __pyx_obj_3cgl_shader *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":2711
 * 
 *     def __hash__(self):
 *         return self.get_id()             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_AsHash_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_hash_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2711, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2710
 *         return f"shader({self.name})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2713
 *         return self.get_id()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_shader_destroy(self.c_shader)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_11destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_11destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_10destroy(((struct __pyx_obj_3cgl_shader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_10destroy(struct __pyx_obj_3cgl_shader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "cgl_wrapper.pyx":2714
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_shader_destroy(self.c_shader)
 *             self.has_been_destroyed = True
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2715
 *     def destroy(self):
 *         if not self.has_been_destroyed:
 *             CGL_shader_destroy(self.c_shader)             # <<<<<<<<<<<<<<
 *             self.has_been_destroyed = True
 *         self.uniform_map = {}
 */
    CGL_shader_destroy(__pyx_v_self->c_shader);

    /* "cgl_wrapper.pyx":2716
 *         if not self.has_been_destroyed:
 *             CGL_shader_destroy(self.c_shader)
 *             self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 *         self.uniform_map = {}
 * 
 */
    __pyx_v_self->has_been_destroyed = 1;

    /* "cgl_wrapper.pyx":2714
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_shader_destroy(self.c_shader)
 *             self.has_been_destroyed = True
 */
  }

  /* "cgl_wrapper.pyx":2717
 *             CGL_shader_destroy(self.c_shader)
 *             self.has_been_destroyed = True
 *         self.uniform_map = {}             # <<<<<<<<<<<<<<
 * 
 *     cdef set_c_shader(self, CGL_shader* c_shader):
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __Pyx_GOTREF(__pyx_v_self->uniform_map);
  __Pyx_DECREF(__pyx_v_self->uniform_map);
  __pyx_v_self->uniform_map = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2713
 *         return self.get_id()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_shader_destroy(self.c_shader)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.shader.destroy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2719
 *         self.uniform_map = {}
 * 
 *     cdef set_c_shader(self, CGL_shader* c_shader):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

static PyObject *__pyx_f_3cgl_6shader_set_c_shader(struct __pyx_obj_3cgl_shader *__pyx_v_self, struct CGL_shader *__pyx_v_c_shader) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_c_shader", 0);

  /* "cgl_wrapper.pyx":2720
 * 
 *     cdef set_c_shader(self, CGL_shader* c_shader):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 *         self.c_shader = c_shader
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2721
 *     cdef set_c_shader(self, CGL_shader* c_shader):
 *         if not self.has_been_destroyed:
 *             self.destroy()             # <<<<<<<<<<<<<<
 *         self.c_shader = c_shader
 *         self.has_been_destroyed = False
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":2720
 * 
 *     cdef set_c_shader(self, CGL_shader* c_shader):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 *         self.c_shader = c_shader
 */
  }

  /* "cgl_wrapper.pyx":2722
 *         if not self.has_been_destroyed:
 *             self.destroy()
 *         self.c_shader = c_shader             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
  __pyx_v_self->c_shader = __pyx_v_c_shader;

  /* "cgl_wrapper.pyx":2723
 *             self.destroy()
 *         self.c_shader = c_shader
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 * 
 *     def get_id(self) -> int:
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2719
 *         self.uniform_map = {}
 * 
 *     cdef set_c_shader(self, CGL_shader* c_shader):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.shader.set_c_shader", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2725
 *         self.has_been_destroyed = False
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(&self.c_shader, sizeof(CGL_shader*))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_13get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_13get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_id (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_12get_id(((struct __pyx_obj_3cgl_shader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_12get_id(struct __pyx_obj_3cgl_shader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_id", 0);

  /* "cgl_wrapper.pyx":2726
 * 
 *     def get_id(self) -> int:
 *         return CGL_utils_super_fast_hash(&self.c_shader, sizeof(CGL_shader*))             # <<<<<<<<<<<<<<
 * 
 *     def set_user_data(self, data: object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(CGL_utils_super_fast_hash((&__pyx_v_self->c_shader), (sizeof(struct CGL_shader *)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2726, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2725
 *         self.has_been_destroyed = False
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(&self.c_shader, sizeof(CGL_shader*))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shader.get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2728
 *         return CGL_utils_super_fast_hash(&self.c_shader, sizeof(CGL_shader*))
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_user_data(self.c_shader, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_15set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_15set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_14set_user_data(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_14set_user_data(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data", 0);

  /* "cgl_wrapper.pyx":2729
 * 
 *     def set_user_data(self, data: object):
 *         CGL_shader_set_user_data(self.c_shader, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def get_user_data(self) -> object:
 */
  CGL_shader_set_user_data(__pyx_v_self->c_shader, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2728
 *         return CGL_utils_super_fast_hash(&self.c_shader, sizeof(CGL_shader*))
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_user_data(self.c_shader, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2731
 *         CGL_shader_set_user_data(self.c_shader, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_shader_get_user_data(self.c_shader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_17get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_17get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_16get_user_data(((struct __pyx_obj_3cgl_shader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_16get_user_data(struct __pyx_obj_3cgl_shader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  __Pyx_RefNannySetupContext("get_user_data", 0);

  /* "cgl_wrapper.pyx":2732
 * 
 *     def get_user_data(self) -> object:
 *         return <object>CGL_shader_get_user_data(self.c_shader)             # <<<<<<<<<<<<<<
 * 
 *     def load_from_file(self, vertex_shader_path: str, fragment_shader_path: str) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = CGL_shader_get_user_data(__pyx_v_self->c_shader);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2731
 *         CGL_shader_set_user_data(self.c_shader, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_shader_get_user_data(self.c_shader)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2734
 *         return <object>CGL_shader_get_user_data(self.c_shader)
 * 
 *     def load_from_file(self, vertex_shader_path: str, fragment_shader_path: str) -> bool:             # <<<<<<<<<<<<<<
 *         cdef CGL_shader* c_shader = CGL_shader_create_from_files(vertex_shader_path.encode("utf-8"), fragment_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_19load_from_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_19load_from_file(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertex_shader_path = 0;
  PyObject *__pyx_v_fragment_shader_path = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_from_file (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vertex_shader_path,&__pyx_n_s_fragment_shader_path,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertex_shader_path)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fragment_shader_path)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("load_from_file", 1, 2, 2, 1); __PYX_ERR(0, 2734, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load_from_file") < 0)) __PYX_ERR(0, 2734, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vertex_shader_path = ((PyObject*)values[0]);
    __pyx_v_fragment_shader_path = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load_from_file", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2734, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.load_from_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vertex_shader_path), (&PyString_Type), 1, "vertex_shader_path", 1))) __PYX_ERR(0, 2734, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fragment_shader_path), (&PyString_Type), 1, "fragment_shader_path", 1))) __PYX_ERR(0, 2734, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_18load_from_file(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_vertex_shader_path, __pyx_v_fragment_shader_path);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_18load_from_file(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_vertex_shader_path, PyObject *__pyx_v_fragment_shader_path) {
  struct CGL_shader *__pyx_v_c_shader;
  CYTHON_UNUSED int __pyx_v_has_been_destroyed;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_from_file", 0);

  /* "cgl_wrapper.pyx":2735
 * 
 *     def load_from_file(self, vertex_shader_path: str, fragment_shader_path: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_create_from_files(vertex_shader_path.encode("utf-8"), fragment_shader_path.encode("utf-8"), NULL)             # <<<<<<<<<<<<<<
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_vertex_shader_path, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2735, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_fragment_shader_path, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2735, __pyx_L1_error)
  __pyx_v_c_shader = CGL_shader_create_from_files(__pyx_t_2, __pyx_t_4, NULL);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2736
 *     def load_from_file(self, vertex_shader_path: str, fragment_shader_path: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_create_from_files(vertex_shader_path.encode("utf-8"), fragment_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 */
  __pyx_t_5 = ((__pyx_v_c_shader == NULL) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "cgl_wrapper.pyx":2737
 *         cdef CGL_shader* c_shader = CGL_shader_create_from_files(vertex_shader_path.encode("utf-8"), fragment_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")             # <<<<<<<<<<<<<<
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2737, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2737, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2736
 *     def load_from_file(self, vertex_shader_path: str, fragment_shader_path: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_create_from_files(vertex_shader_path.encode("utf-8"), fragment_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 */
  }

  /* "cgl_wrapper.pyx":2738
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)             # <<<<<<<<<<<<<<
 *         has_been_destroyed = False
 *         return True
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_3cgl_shader *)__pyx_v_self->__pyx_vtab)->set_c_shader(__pyx_v_self, __pyx_v_c_shader); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2739
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_v_has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2740
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def load(self, vertex_shader_source: str, fragment_shader_source: str) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2734
 *         return <object>CGL_shader_get_user_data(self.c_shader)
 * 
 *     def load_from_file(self, vertex_shader_path: str, fragment_shader_path: str) -> bool:             # <<<<<<<<<<<<<<
 *         cdef CGL_shader* c_shader = CGL_shader_create_from_files(vertex_shader_path.encode("utf-8"), fragment_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.load_from_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2742
 *         return True
 * 
 *     def load(self, vertex_shader_source: str, fragment_shader_source: str) -> bool:             # <<<<<<<<<<<<<<
 *         cdef CGL_shader* c_shader = CGL_shader_create(vertex_shader_source.encode("utf-8"), fragment_shader_source.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_21load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_21load(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertex_shader_source = 0;
  PyObject *__pyx_v_fragment_shader_source = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vertex_shader_source,&__pyx_n_s_fragment_shader_source,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertex_shader_source)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_fragment_shader_source)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("load", 1, 2, 2, 1); __PYX_ERR(0, 2742, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "load") < 0)) __PYX_ERR(0, 2742, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vertex_shader_source = ((PyObject*)values[0]);
    __pyx_v_fragment_shader_source = ((PyObject*)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("load", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2742, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vertex_shader_source), (&PyString_Type), 1, "vertex_shader_source", 1))) __PYX_ERR(0, 2742, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fragment_shader_source), (&PyString_Type), 1, "fragment_shader_source", 1))) __PYX_ERR(0, 2742, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_20load(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_vertex_shader_source, __pyx_v_fragment_shader_source);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_20load(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_vertex_shader_source, PyObject *__pyx_v_fragment_shader_source) {
  struct CGL_shader *__pyx_v_c_shader;
  CYTHON_UNUSED int __pyx_v_has_been_destroyed;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load", 0);

  /* "cgl_wrapper.pyx":2743
 * 
 *     def load(self, vertex_shader_source: str, fragment_shader_source: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_create(vertex_shader_source.encode("utf-8"), fragment_shader_source.encode("utf-8"), NULL)             # <<<<<<<<<<<<<<
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_vertex_shader_source, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2743, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_fragment_shader_source, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2743, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2743, __pyx_L1_error)
  __pyx_v_c_shader = CGL_shader_create(__pyx_t_2, __pyx_t_4, NULL);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2744
 *     def load(self, vertex_shader_source: str, fragment_shader_source: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_create(vertex_shader_source.encode("utf-8"), fragment_shader_source.encode("utf-8"), NULL)
 *         if c_shader == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 */
  __pyx_t_5 = ((__pyx_v_c_shader == NULL) != 0);
  if (unlikely(__pyx_t_5)) {

    /* "cgl_wrapper.pyx":2745
 *         cdef CGL_shader* c_shader = CGL_shader_create(vertex_shader_source.encode("utf-8"), fragment_shader_source.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")             # <<<<<<<<<<<<<<
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2745, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __PYX_ERR(0, 2745, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2744
 *     def load(self, vertex_shader_source: str, fragment_shader_source: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_create(vertex_shader_source.encode("utf-8"), fragment_shader_source.encode("utf-8"), NULL)
 *         if c_shader == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 */
  }

  /* "cgl_wrapper.pyx":2746
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)             # <<<<<<<<<<<<<<
 *         has_been_destroyed = False
 *         return True
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_3cgl_shader *)__pyx_v_self->__pyx_vtab)->set_c_shader(__pyx_v_self, __pyx_v_c_shader); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2747
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_v_has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2748
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def load_compute_from_file(self, compute_shader_path: str) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2742
 *         return True
 * 
 *     def load(self, vertex_shader_source: str, fragment_shader_source: str) -> bool:             # <<<<<<<<<<<<<<
 *         cdef CGL_shader* c_shader = CGL_shader_create(vertex_shader_source.encode("utf-8"), fragment_shader_source.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2750
 *         return True
 * 
 *     def load_compute_from_file(self, compute_shader_path: str) -> bool:             # <<<<<<<<<<<<<<
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create_from_files(compute_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_23load_compute_from_file(PyObject *__pyx_v_self, PyObject *__pyx_v_compute_shader_path); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_23load_compute_from_file(PyObject *__pyx_v_self, PyObject *__pyx_v_compute_shader_path) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_compute_from_file (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_compute_shader_path), (&PyString_Type), 1, "compute_shader_path", 1))) __PYX_ERR(0, 2750, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_22load_compute_from_file(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), ((PyObject*)__pyx_v_compute_shader_path));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_22load_compute_from_file(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_compute_shader_path) {
  struct CGL_shader *__pyx_v_c_shader;
  CYTHON_UNUSED int __pyx_v_has_been_destroyed;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_compute_from_file", 0);

  /* "cgl_wrapper.pyx":2751
 * 
 *     def load_compute_from_file(self, compute_shader_path: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create_from_files(compute_shader_path.encode("utf-8"), NULL)             # <<<<<<<<<<<<<<
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_compute_shader_path, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2751, __pyx_L1_error)
  __pyx_v_c_shader = CGL_shader_compute_create_from_files(__pyx_t_2, NULL);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2752
 *     def load_compute_from_file(self, compute_shader_path: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create_from_files(compute_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 */
  __pyx_t_3 = ((__pyx_v_c_shader == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "cgl_wrapper.pyx":2753
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create_from_files(compute_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")             # <<<<<<<<<<<<<<
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2753, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2752
 *     def load_compute_from_file(self, compute_shader_path: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create_from_files(compute_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 */
  }

  /* "cgl_wrapper.pyx":2754
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)             # <<<<<<<<<<<<<<
 *         has_been_destroyed = False
 *         return True
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_shader *)__pyx_v_self->__pyx_vtab)->set_c_shader(__pyx_v_self, __pyx_v_c_shader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2755
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_v_has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2756
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def load_compute(self, compute_shader_source: str) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2750
 *         return True
 * 
 *     def load_compute_from_file(self, compute_shader_path: str) -> bool:             # <<<<<<<<<<<<<<
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create_from_files(compute_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shader.load_compute_from_file", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2758
 *         return True
 * 
 *     def load_compute(self, compute_shader_source: str) -> bool:             # <<<<<<<<<<<<<<
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create(compute_shader_source.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_25load_compute(PyObject *__pyx_v_self, PyObject *__pyx_v_compute_shader_source); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_25load_compute(PyObject *__pyx_v_self, PyObject *__pyx_v_compute_shader_source) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_compute (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_compute_shader_source), (&PyString_Type), 1, "compute_shader_source", 1))) __PYX_ERR(0, 2758, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_24load_compute(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), ((PyObject*)__pyx_v_compute_shader_source));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_24load_compute(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_compute_shader_source) {
  struct CGL_shader *__pyx_v_c_shader;
  CYTHON_UNUSED int __pyx_v_has_been_destroyed;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_compute", 0);

  /* "cgl_wrapper.pyx":2759
 * 
 *     def load_compute(self, compute_shader_source: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create(compute_shader_source.encode("utf-8"), NULL)             # <<<<<<<<<<<<<<
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_compute_shader_source, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2759, __pyx_L1_error)
  __pyx_v_c_shader = CGL_shader_compute_create(__pyx_t_2, NULL);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2760
 *     def load_compute(self, compute_shader_source: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create(compute_shader_source.encode("utf-8"), NULL)
 *         if c_shader == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 */
  __pyx_t_3 = ((__pyx_v_c_shader == NULL) != 0);
  if (unlikely(__pyx_t_3)) {

    /* "cgl_wrapper.pyx":2761
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create(compute_shader_source.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")             # <<<<<<<<<<<<<<
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__64, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2761, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __PYX_ERR(0, 2761, __pyx_L1_error)

    /* "cgl_wrapper.pyx":2760
 *     def load_compute(self, compute_shader_source: str) -> bool:
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create(compute_shader_source.encode("utf-8"), NULL)
 *         if c_shader == NULL:             # <<<<<<<<<<<<<<
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 */
  }

  /* "cgl_wrapper.pyx":2762
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)             # <<<<<<<<<<<<<<
 *         has_been_destroyed = False
 *         return True
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_shader *)__pyx_v_self->__pyx_vtab)->set_c_shader(__pyx_v_self, __pyx_v_c_shader); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2763
 *             raise RuntimeError("Failed to create shader")
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_v_has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2764
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def bind(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2758
 *         return True
 * 
 *     def load_compute(self, compute_shader_source: str) -> bool:             # <<<<<<<<<<<<<<
 *         cdef CGL_shader* c_shader = CGL_shader_compute_create(compute_shader_source.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shader.load_compute", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2766
 *         return True
 * 
 *     def bind(self):             # <<<<<<<<<<<<<<
 *         CGL_shader_bind(self.c_shader)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_27bind(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_27bind(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bind (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_26bind(((struct __pyx_obj_3cgl_shader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_26bind(struct __pyx_obj_3cgl_shader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bind", 0);

  /* "cgl_wrapper.pyx":2767
 * 
 *     def bind(self):
 *         CGL_shader_bind(self.c_shader)             # <<<<<<<<<<<<<<
 * 
 *     def get_uniform_location(self, name: str) -> int:
 */
  CGL_shader_bind(__pyx_v_self->c_shader);

  /* "cgl_wrapper.pyx":2766
 *         return True
 * 
 *     def bind(self):             # <<<<<<<<<<<<<<
 *         CGL_shader_bind(self.c_shader)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2769
 *         CGL_shader_bind(self.c_shader)
 * 
 *     def get_uniform_location(self, name: str) -> int:             # <<<<<<<<<<<<<<
 *         if name in self.uniform_map:
 *             return self.uniform_map[name]
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_29get_uniform_location(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_29get_uniform_location(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_uniform_location (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2769, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_28get_uniform_location(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), ((PyObject*)__pyx_v_name));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_28get_uniform_location(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name) {
  int __pyx_v_location;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  char const *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_uniform_location", 0);

  /* "cgl_wrapper.pyx":2770
 * 
 *     def get_uniform_location(self, name: str) -> int:
 *         if name in self.uniform_map:             # <<<<<<<<<<<<<<
 *             return self.uniform_map[name]
 *         cdef int location = CGL_shader_get_uniform_location(self.c_shader, name.encode("utf-8"))
 */
  if (unlikely(__pyx_v_self->uniform_map == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
    __PYX_ERR(0, 2770, __pyx_L1_error)
  }
  __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_self->uniform_map, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2770, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":2771
 *     def get_uniform_location(self, name: str) -> int:
 *         if name in self.uniform_map:
 *             return self.uniform_map[name]             # <<<<<<<<<<<<<<
 *         cdef int location = CGL_shader_get_uniform_location(self.c_shader, name.encode("utf-8"))
 *         self.uniform_map[name] = location
 */
    __Pyx_XDECREF(__pyx_r);
    if (unlikely(__pyx_v_self->uniform_map == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 2771, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->uniform_map, __pyx_v_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2771, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_r = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L0;

    /* "cgl_wrapper.pyx":2770
 * 
 *     def get_uniform_location(self, name: str) -> int:
 *         if name in self.uniform_map:             # <<<<<<<<<<<<<<
 *             return self.uniform_map[name]
 *         cdef int location = CGL_shader_get_uniform_location(self.c_shader, name.encode("utf-8"))
 */
  }

  /* "cgl_wrapper.pyx":2772
 *         if name in self.uniform_map:
 *             return self.uniform_map[name]
 *         cdef int location = CGL_shader_get_uniform_location(self.c_shader, name.encode("utf-8"))             # <<<<<<<<<<<<<<
 *         self.uniform_map[name] = location
 *         return location
 */
  __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_name, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2772, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_AsString(__pyx_t_3); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(0, 2772, __pyx_L1_error)
  __pyx_v_location = CGL_shader_get_uniform_location(__pyx_v_self->c_shader, __pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2773
 *             return self.uniform_map[name]
 *         cdef int location = CGL_shader_get_uniform_location(self.c_shader, name.encode("utf-8"))
 *         self.uniform_map[name] = location             # <<<<<<<<<<<<<<
 *         return location
 * 
 */
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(__pyx_v_self->uniform_map == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
    __PYX_ERR(0, 2773, __pyx_L1_error)
  }
  if (unlikely(PyDict_SetItem(__pyx_v_self->uniform_map, __pyx_v_name, __pyx_t_3) < 0)) __PYX_ERR(0, 2773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2774
 *         cdef int location = CGL_shader_get_uniform_location(self.c_shader, name.encode("utf-8"))
 *         self.uniform_map[name] = location
 *         return location             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_mat4(self, name: str, mat: mat4):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_location); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2774, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2769
 *         CGL_shader_bind(self.c_shader)
 * 
 *     def get_uniform_location(self, name: str) -> int:             # <<<<<<<<<<<<<<
 *         if name in self.uniform_map:
 *             return self.uniform_map[name]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.get_uniform_location", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2776
 *         return location
 * 
 *     def set_uniform_mat4(self, name: str, mat: mat4):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_mat4(self.c_shader, self.get_uniform_location(name), &mat.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_31set_uniform_mat4(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_31set_uniform_mat4(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  struct __pyx_obj_3cgl_mat4 *__pyx_v_mat = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_mat4 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_mat,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mat)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_mat4", 1, 2, 2, 1); __PYX_ERR(0, 2776, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_mat4") < 0)) __PYX_ERR(0, 2776, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_mat = ((struct __pyx_obj_3cgl_mat4 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_mat4", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2776, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_mat4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2776, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mat), __pyx_ptype_3cgl_mat4, 1, "mat", 0))) __PYX_ERR(0, 2776, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_30set_uniform_mat4(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_mat);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_30set_uniform_mat4(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_obj_3cgl_mat4 *__pyx_v_mat) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_mat4", 0);

  /* "cgl_wrapper.pyx":2777
 * 
 *     def set_uniform_mat4(self, name: str, mat: mat4):
 *         CGL_shader_set_uniform_mat4(self.c_shader, self.get_uniform_location(name), &mat.c_mat4)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_vec4(self, name: str, vec: vec4):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2777, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CGL_shader_set_uniform_mat4(__pyx_v_self->c_shader, __pyx_t_4, (&__pyx_v_mat->c_mat4));

  /* "cgl_wrapper.pyx":2776
 *         return location
 * 
 *     def set_uniform_mat4(self, name: str, mat: mat4):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_mat4(self.c_shader, self.get_uniform_location(name), &mat.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_mat4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2779
 *         CGL_shader_set_uniform_mat4(self.c_shader, self.get_uniform_location(name), &mat.c_mat4)
 * 
 *     def set_uniform_vec4(self, name: str, vec: vec4):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec4(self.c_shader, self.get_uniform_location(name), &vec.c_vec4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_33set_uniform_vec4(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_33set_uniform_vec4(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  struct __pyx_obj_3cgl_vec4 *__pyx_v_vec = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_vec4 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_vec,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec4", 1, 2, 2, 1); __PYX_ERR(0, 2779, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_vec4") < 0)) __PYX_ERR(0, 2779, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_vec = ((struct __pyx_obj_3cgl_vec4 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_vec4", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2779, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2779, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vec), __pyx_ptype_3cgl_vec4, 1, "vec", 0))) __PYX_ERR(0, 2779, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_32set_uniform_vec4(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_vec);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_32set_uniform_vec4(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_obj_3cgl_vec4 *__pyx_v_vec) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_vec4", 0);

  /* "cgl_wrapper.pyx":2780
 * 
 *     def set_uniform_vec4(self, name: str, vec: vec4):
 *         CGL_shader_set_uniform_vec4(self.c_shader, self.get_uniform_location(name), &vec.c_vec4)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_vec3(self, name: str, vec: vec3):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2780, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2780, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CGL_shader_set_uniform_vec4(__pyx_v_self->c_shader, __pyx_t_4, (&__pyx_v_vec->c_vec4));

  /* "cgl_wrapper.pyx":2779
 *         CGL_shader_set_uniform_mat4(self.c_shader, self.get_uniform_location(name), &mat.c_mat4)
 * 
 *     def set_uniform_vec4(self, name: str, vec: vec4):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec4(self.c_shader, self.get_uniform_location(name), &vec.c_vec4)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2782
 *         CGL_shader_set_uniform_vec4(self.c_shader, self.get_uniform_location(name), &vec.c_vec4)
 * 
 *     def set_uniform_vec3(self, name: str, vec: vec3):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec3(self.c_shader, self.get_uniform_location(name), &vec.c_vec3)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_35set_uniform_vec3(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_35set_uniform_vec3(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_vec = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_vec3 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_vec,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec3", 1, 2, 2, 1); __PYX_ERR(0, 2782, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_vec3") < 0)) __PYX_ERR(0, 2782, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_vec = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_vec3", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2782, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2782, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vec), __pyx_ptype_3cgl_vec3, 1, "vec", 0))) __PYX_ERR(0, 2782, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_34set_uniform_vec3(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_vec);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_34set_uniform_vec3(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_obj_3cgl_vec3 *__pyx_v_vec) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_vec3", 0);

  /* "cgl_wrapper.pyx":2783
 * 
 *     def set_uniform_vec3(self, name: str, vec: vec3):
 *         CGL_shader_set_uniform_vec3(self.c_shader, self.get_uniform_location(name), &vec.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_vec2(self, name: str, vec: vec2):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2783, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2783, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CGL_shader_set_uniform_vec3(__pyx_v_self->c_shader, __pyx_t_4, (&__pyx_v_vec->c_vec3));

  /* "cgl_wrapper.pyx":2782
 *         CGL_shader_set_uniform_vec4(self.c_shader, self.get_uniform_location(name), &vec.c_vec4)
 * 
 *     def set_uniform_vec3(self, name: str, vec: vec3):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec3(self.c_shader, self.get_uniform_location(name), &vec.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2785
 *         CGL_shader_set_uniform_vec3(self.c_shader, self.get_uniform_location(name), &vec.c_vec3)
 * 
 *     def set_uniform_vec2(self, name: str, vec: vec2):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec2(self.c_shader, self.get_uniform_location(name), &vec.c_vec2)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_37set_uniform_vec2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_37set_uniform_vec2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_vec = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_vec2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_vec,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vec)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec2", 1, 2, 2, 1); __PYX_ERR(0, 2785, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_vec2") < 0)) __PYX_ERR(0, 2785, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_vec = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_vec2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2785, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2785, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vec), __pyx_ptype_3cgl_vec2, 1, "vec", 0))) __PYX_ERR(0, 2785, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_36set_uniform_vec2(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_vec);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_36set_uniform_vec2(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, struct __pyx_obj_3cgl_vec2 *__pyx_v_vec) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_vec2", 0);

  /* "cgl_wrapper.pyx":2786
 * 
 *     def set_uniform_vec2(self, name: str, vec: vec2):
 *         CGL_shader_set_uniform_vec2(self.c_shader, self.get_uniform_location(name), &vec.c_vec2)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_float(self, name: str, value: float):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CGL_shader_set_uniform_vec2(__pyx_v_self->c_shader, __pyx_t_4, (&__pyx_v_vec->c_vec2));

  /* "cgl_wrapper.pyx":2785
 *         CGL_shader_set_uniform_vec3(self.c_shader, self.get_uniform_location(name), &vec.c_vec3)
 * 
 *     def set_uniform_vec2(self, name: str, vec: vec2):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec2(self.c_shader, self.get_uniform_location(name), &vec.c_vec2)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2788
 *         CGL_shader_set_uniform_vec2(self.c_shader, self.get_uniform_location(name), &vec.c_vec2)
 * 
 *     def set_uniform_float(self, name: str, value: float):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_float(self.c_shader, self.get_uniform_location(name), value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_39set_uniform_float(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_39set_uniform_float(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  double __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_float (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_float", 1, 2, 2, 1); __PYX_ERR(0, 2788, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_float") < 0)) __PYX_ERR(0, 2788, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_value = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2788, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_float", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2788, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2788, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_38set_uniform_float(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_38set_uniform_float(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, double __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_float", 0);

  /* "cgl_wrapper.pyx":2789
 * 
 *     def set_uniform_float(self, name: str, value: float):
 *         CGL_shader_set_uniform_float(self.c_shader, self.get_uniform_location(name), value)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_int(self, name: str, value: int):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2789, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2789, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CGL_shader_set_uniform_float(__pyx_v_self->c_shader, __pyx_t_4, __pyx_v_value);

  /* "cgl_wrapper.pyx":2788
 *         CGL_shader_set_uniform_vec2(self.c_shader, self.get_uniform_location(name), &vec.c_vec2)
 * 
 *     def set_uniform_float(self, name: str, value: float):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_float(self.c_shader, self.get_uniform_location(name), value)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2791
 *         CGL_shader_set_uniform_float(self.c_shader, self.get_uniform_location(name), value)
 * 
 *     def set_uniform_int(self, name: str, value: int):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_int(self.c_shader, self.get_uniform_location(name), value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_41set_uniform_int(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_41set_uniform_int(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_value = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_int (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_int", 1, 2, 2, 1); __PYX_ERR(0, 2791, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_int") < 0)) __PYX_ERR(0, 2791, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_value = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_int", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2791, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2791, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_40set_uniform_int(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_40set_uniform_int(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  CGL_int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_int", 0);

  /* "cgl_wrapper.pyx":2792
 * 
 *     def set_uniform_int(self, name: str, value: int):
 *         CGL_shader_set_uniform_int(self.c_shader, self.get_uniform_location(name), value)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_bool(self, name: str, value: bool):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2792, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_5 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2792, __pyx_L1_error)
  CGL_shader_set_uniform_int(__pyx_v_self->c_shader, __pyx_t_4, __pyx_t_5);

  /* "cgl_wrapper.pyx":2791
 *         CGL_shader_set_uniform_float(self.c_shader, self.get_uniform_location(name), value)
 * 
 *     def set_uniform_int(self, name: str, value: int):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_int(self.c_shader, self.get_uniform_location(name), value)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2794
 *         CGL_shader_set_uniform_int(self.c_shader, self.get_uniform_location(name), value)
 * 
 *     def set_uniform_bool(self, name: str, value: bool):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_bool(self.c_shader, self.get_uniform_location(name), value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_43set_uniform_bool(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_43set_uniform_bool(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  bool __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_bool (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_bool", 1, 2, 2, 1); __PYX_ERR(0, 2794, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_bool") < 0)) __PYX_ERR(0, 2794, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_value = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_value == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2794, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_bool", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2794, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2794, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_42set_uniform_bool(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_42set_uniform_bool(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, bool __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_bool", 0);

  /* "cgl_wrapper.pyx":2795
 * 
 *     def set_uniform_bool(self, name: str, value: bool):
 *         CGL_shader_set_uniform_bool(self.c_shader, self.get_uniform_location(name), value)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_doublt(self, name: str, value: double):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2795, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2795, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CGL_shader_set_uniform_bool(__pyx_v_self->c_shader, __pyx_t_4, __pyx_v_value);

  /* "cgl_wrapper.pyx":2794
 *         CGL_shader_set_uniform_int(self.c_shader, self.get_uniform_location(name), value)
 * 
 *     def set_uniform_bool(self, name: str, value: bool):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_bool(self.c_shader, self.get_uniform_location(name), value)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_bool", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2797
 *         CGL_shader_set_uniform_bool(self.c_shader, self.get_uniform_location(name), value)
 * 
 *     def set_uniform_doublt(self, name: str, value: double):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_double(self.c_shader, self.get_uniform_location(name), value)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_45set_uniform_doublt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_45set_uniform_doublt(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  double __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_doublt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_value,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_doublt", 1, 2, 2, 1); __PYX_ERR(0, 2797, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_doublt") < 0)) __PYX_ERR(0, 2797, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_value = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2797, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_doublt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2797, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_doublt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2797, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_44set_uniform_doublt(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_value);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_44set_uniform_doublt(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, double __pyx_v_value) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_doublt", 0);

  /* "cgl_wrapper.pyx":2798
 * 
 *     def set_uniform_doublt(self, name: str, value: double):
 *         CGL_shader_set_uniform_double(self.c_shader, self.get_uniform_location(name), value)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_vec2v(self, name: str, x: float, y: float):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2798, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2798, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CGL_shader_set_uniform_double(__pyx_v_self->c_shader, __pyx_t_4, __pyx_v_value);

  /* "cgl_wrapper.pyx":2797
 *         CGL_shader_set_uniform_bool(self.c_shader, self.get_uniform_location(name), value)
 * 
 *     def set_uniform_doublt(self, name: str, value: double):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_double(self.c_shader, self.get_uniform_location(name), value)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_doublt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2800
 *         CGL_shader_set_uniform_double(self.c_shader, self.get_uniform_location(name), value)
 * 
 *     def set_uniform_vec2v(self, name: str, x: float, y: float):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec2v(self.c_shader, self.get_uniform_location(name), x, y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_47set_uniform_vec2v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_47set_uniform_vec2v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  double __pyx_v_x;
  double __pyx_v_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_vec2v (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_x,&__pyx_n_s_y,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec2v", 1, 3, 3, 1); __PYX_ERR(0, 2800, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec2v", 1, 3, 3, 2); __PYX_ERR(0, 2800, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_vec2v") < 0)) __PYX_ERR(0, 2800, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2800, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2800, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_vec2v", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2800, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec2v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2800, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_46set_uniform_vec2v(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_46set_uniform_vec2v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, double __pyx_v_x, double __pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_vec2v", 0);

  /* "cgl_wrapper.pyx":2801
 * 
 *     def set_uniform_vec2v(self, name: str, x: float, y: float):
 *         CGL_shader_set_uniform_vec2v(self.c_shader, self.get_uniform_location(name), x, y)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_vec3v(self, name: str, x: float, y: float, z: float):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2801, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CGL_shader_set_uniform_vec2v(__pyx_v_self->c_shader, __pyx_t_4, __pyx_v_x, __pyx_v_y);

  /* "cgl_wrapper.pyx":2800
 *         CGL_shader_set_uniform_double(self.c_shader, self.get_uniform_location(name), value)
 * 
 *     def set_uniform_vec2v(self, name: str, x: float, y: float):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec2v(self.c_shader, self.get_uniform_location(name), x, y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec2v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2803
 *         CGL_shader_set_uniform_vec2v(self.c_shader, self.get_uniform_location(name), x, y)
 * 
 *     def set_uniform_vec3v(self, name: str, x: float, y: float, z: float):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec3v(self.c_shader, self.get_uniform_location(name), x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_49set_uniform_vec3v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_49set_uniform_vec3v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_vec3v (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec3v", 1, 4, 4, 1); __PYX_ERR(0, 2803, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec3v", 1, 4, 4, 2); __PYX_ERR(0, 2803, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec3v", 1, 4, 4, 3); __PYX_ERR(0, 2803, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_vec3v") < 0)) __PYX_ERR(0, 2803, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2803, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2803, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2803, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_vec3v", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2803, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec3v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2803, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_48set_uniform_vec3v(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_48set_uniform_vec3v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_vec3v", 0);

  /* "cgl_wrapper.pyx":2804
 * 
 *     def set_uniform_vec3v(self, name: str, x: float, y: float, z: float):
 *         CGL_shader_set_uniform_vec3v(self.c_shader, self.get_uniform_location(name), x, y, z)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_vec4v(self, name: str, x: float, y: float, z: float, w: float):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2804, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CGL_shader_set_uniform_vec3v(__pyx_v_self->c_shader, __pyx_t_4, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* "cgl_wrapper.pyx":2803
 *         CGL_shader_set_uniform_vec2v(self.c_shader, self.get_uniform_location(name), x, y)
 * 
 *     def set_uniform_vec3v(self, name: str, x: float, y: float, z: float):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec3v(self.c_shader, self.get_uniform_location(name), x, y, z)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec3v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2806
 *         CGL_shader_set_uniform_vec3v(self.c_shader, self.get_uniform_location(name), x, y, z)
 * 
 *     def set_uniform_vec4v(self, name: str, x: float, y: float, z: float, w: float):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec4v(self.c_shader, self.get_uniform_location(name), x, y, z, w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_51set_uniform_vec4v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_51set_uniform_vec4v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  double __pyx_v_w;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_vec4v (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,&__pyx_n_s_w,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec4v", 1, 5, 5, 1); __PYX_ERR(0, 2806, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec4v", 1, 5, 5, 2); __PYX_ERR(0, 2806, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec4v", 1, 5, 5, 3); __PYX_ERR(0, 2806, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_vec4v", 1, 5, 5, 4); __PYX_ERR(0, 2806, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_vec4v") < 0)) __PYX_ERR(0, 2806, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2806, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2806, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2806, __pyx_L3_error)
    __pyx_v_w = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_w == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 2806, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_vec4v", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2806, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec4v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2806, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_50set_uniform_vec4v(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_w);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_50set_uniform_vec4v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, double __pyx_v_w) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_vec4v", 0);

  /* "cgl_wrapper.pyx":2807
 * 
 *     def set_uniform_vec4v(self, name: str, x: float, y: float, z: float, w: float):
 *         CGL_shader_set_uniform_vec4v(self.c_shader, self.get_uniform_location(name), x, y, z, w)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_ivec2v(self, name: str, x: int, y: int):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2807, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2807, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  CGL_shader_set_uniform_vec4v(__pyx_v_self->c_shader, __pyx_t_4, __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_w);

  /* "cgl_wrapper.pyx":2806
 *         CGL_shader_set_uniform_vec3v(self.c_shader, self.get_uniform_location(name), x, y, z)
 * 
 *     def set_uniform_vec4v(self, name: str, x: float, y: float, z: float, w: float):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_vec4v(self.c_shader, self.get_uniform_location(name), x, y, z, w)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_vec4v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2809
 *         CGL_shader_set_uniform_vec4v(self.c_shader, self.get_uniform_location(name), x, y, z, w)
 * 
 *     def set_uniform_ivec2v(self, name: str, x: int, y: int):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_ivec2v(self.c_shader, self.get_uniform_location(name), x, y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_53set_uniform_ivec2v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_53set_uniform_ivec2v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_ivec2v (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_x,&__pyx_n_s_y,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_ivec2v", 1, 3, 3, 1); __PYX_ERR(0, 2809, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_ivec2v", 1, 3, 3, 2); __PYX_ERR(0, 2809, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_ivec2v") < 0)) __PYX_ERR(0, 2809, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_x = values[1];
    __pyx_v_y = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_ivec2v", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2809, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_ivec2v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2809, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_52set_uniform_ivec2v(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_x, __pyx_v_y);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_52set_uniform_ivec2v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_x, PyObject *__pyx_v_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  CGL_int __pyx_t_5;
  CGL_int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_ivec2v", 0);

  /* "cgl_wrapper.pyx":2810
 * 
 *     def set_uniform_ivec2v(self, name: str, x: int, y: int):
 *         CGL_shader_set_uniform_ivec2v(self.c_shader, self.get_uniform_location(name), x, y)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_ivec3v(self, name: str, x: int, y: int, z: int):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2810, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2810, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_CGL_int(__pyx_v_x); if (unlikely((__pyx_t_5 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2810, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyInt_As_CGL_int(__pyx_v_y); if (unlikely((__pyx_t_6 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2810, __pyx_L1_error)
  CGL_shader_set_uniform_ivec2v(__pyx_v_self->c_shader, __pyx_t_4, __pyx_t_5, __pyx_t_6);

  /* "cgl_wrapper.pyx":2809
 *         CGL_shader_set_uniform_vec4v(self.c_shader, self.get_uniform_location(name), x, y, z, w)
 * 
 *     def set_uniform_ivec2v(self, name: str, x: int, y: int):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_ivec2v(self.c_shader, self.get_uniform_location(name), x, y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_ivec2v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2812
 *         CGL_shader_set_uniform_ivec2v(self.c_shader, self.get_uniform_location(name), x, y)
 * 
 *     def set_uniform_ivec3v(self, name: str, x: int, y: int, z: int):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_ivec3v(self.c_shader, self.get_uniform_location(name), x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_55set_uniform_ivec3v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_55set_uniform_ivec3v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_z = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_ivec3v (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_ivec3v", 1, 4, 4, 1); __PYX_ERR(0, 2812, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_ivec3v", 1, 4, 4, 2); __PYX_ERR(0, 2812, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_ivec3v", 1, 4, 4, 3); __PYX_ERR(0, 2812, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_ivec3v") < 0)) __PYX_ERR(0, 2812, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_x = values[1];
    __pyx_v_y = values[2];
    __pyx_v_z = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_ivec3v", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2812, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_ivec3v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2812, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_54set_uniform_ivec3v(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_54set_uniform_ivec3v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  CGL_int __pyx_t_5;
  CGL_int __pyx_t_6;
  CGL_int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_ivec3v", 0);

  /* "cgl_wrapper.pyx":2813
 * 
 *     def set_uniform_ivec3v(self, name: str, x: int, y: int, z: int):
 *         CGL_shader_set_uniform_ivec3v(self.c_shader, self.get_uniform_location(name), x, y, z)             # <<<<<<<<<<<<<<
 * 
 *     def set_uniform_ivec4v(self, name: str, x: int, y: int, z: int, w: int):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2813, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_CGL_int(__pyx_v_x); if (unlikely((__pyx_t_5 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2813, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyInt_As_CGL_int(__pyx_v_y); if (unlikely((__pyx_t_6 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2813, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyInt_As_CGL_int(__pyx_v_z); if (unlikely((__pyx_t_7 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2813, __pyx_L1_error)
  CGL_shader_set_uniform_ivec3v(__pyx_v_self->c_shader, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7);

  /* "cgl_wrapper.pyx":2812
 *         CGL_shader_set_uniform_ivec2v(self.c_shader, self.get_uniform_location(name), x, y)
 * 
 *     def set_uniform_ivec3v(self, name: str, x: int, y: int, z: int):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_ivec3v(self.c_shader, self.get_uniform_location(name), x, y, z)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_ivec3v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2815
 *         CGL_shader_set_uniform_ivec3v(self.c_shader, self.get_uniform_location(name), x, y, z)
 * 
 *     def set_uniform_ivec4v(self, name: str, x: int, y: int, z: int, w: int):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_ivec4v(self.c_shader, self.get_uniform_location(name), x, y, z, w)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_57set_uniform_ivec4v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_57set_uniform_ivec4v(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_z = 0;
  PyObject *__pyx_v_w = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_uniform_ivec4v (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,&__pyx_n_s_w,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_ivec4v", 1, 5, 5, 1); __PYX_ERR(0, 2815, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_ivec4v", 1, 5, 5, 2); __PYX_ERR(0, 2815, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_ivec4v", 1, 5, 5, 3); __PYX_ERR(0, 2815, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_w)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_uniform_ivec4v", 1, 5, 5, 4); __PYX_ERR(0, 2815, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_uniform_ivec4v") < 0)) __PYX_ERR(0, 2815, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_name = ((PyObject*)values[0]);
    __pyx_v_x = values[1];
    __pyx_v_y = values[2];
    __pyx_v_z = values[3];
    __pyx_v_w = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_uniform_ivec4v", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2815, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.set_uniform_ivec4v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2815, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_6shader_56set_uniform_ivec4v(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_name, __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_w);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_56set_uniform_ivec4v(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z, PyObject *__pyx_v_w) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_int __pyx_t_4;
  CGL_int __pyx_t_5;
  CGL_int __pyx_t_6;
  CGL_int __pyx_t_7;
  CGL_int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_uniform_ivec4v", 0);

  /* "cgl_wrapper.pyx":2816
 * 
 *     def set_uniform_ivec4v(self, name: str, x: int, y: int, z: int, w: int):
 *         CGL_shader_set_uniform_ivec4v(self.c_shader, self.get_uniform_location(name), x, y, z, w)             # <<<<<<<<<<<<<<
 * 
 *     def compute_dispatch(self, x: int, y: int, z: int):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_uniform_location); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_name);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2816, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_As_CGL_int(__pyx_t_1); if (unlikely((__pyx_t_4 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2816, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __Pyx_PyInt_As_CGL_int(__pyx_v_x); if (unlikely((__pyx_t_5 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2816, __pyx_L1_error)
  __pyx_t_6 = __Pyx_PyInt_As_CGL_int(__pyx_v_y); if (unlikely((__pyx_t_6 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2816, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyInt_As_CGL_int(__pyx_v_z); if (unlikely((__pyx_t_7 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2816, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyInt_As_CGL_int(__pyx_v_w); if (unlikely((__pyx_t_8 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2816, __pyx_L1_error)
  CGL_shader_set_uniform_ivec4v(__pyx_v_self->c_shader, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_t_7, __pyx_t_8);

  /* "cgl_wrapper.pyx":2815
 *         CGL_shader_set_uniform_ivec3v(self.c_shader, self.get_uniform_location(name), x, y, z)
 * 
 *     def set_uniform_ivec4v(self, name: str, x: int, y: int, z: int, w: int):             # <<<<<<<<<<<<<<
 *         CGL_shader_set_uniform_ivec4v(self.c_shader, self.get_uniform_location(name), x, y, z, w)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.shader.set_uniform_ivec4v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2818
 *         CGL_shader_set_uniform_ivec4v(self.c_shader, self.get_uniform_location(name), x, y, z, w)
 * 
 *     def compute_dispatch(self, x: int, y: int, z: int):             # <<<<<<<<<<<<<<
 *         CGL_shader_compute_dispatch(self.c_shader, x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_59compute_dispatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_59compute_dispatch(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_x = 0;
  PyObject *__pyx_v_y = 0;
  PyObject *__pyx_v_z = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("compute_dispatch (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("compute_dispatch", 1, 3, 3, 1); __PYX_ERR(0, 2818, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("compute_dispatch", 1, 3, 3, 2); __PYX_ERR(0, 2818, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "compute_dispatch") < 0)) __PYX_ERR(0, 2818, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = values[0];
    __pyx_v_y = values[1];
    __pyx_v_z = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("compute_dispatch", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2818, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shader.compute_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_6shader_58compute_dispatch(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_58compute_dispatch(struct __pyx_obj_3cgl_shader *__pyx_v_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  CGL_int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("compute_dispatch", 0);

  /* "cgl_wrapper.pyx":2819
 * 
 *     def compute_dispatch(self, x: int, y: int, z: int):
 *         CGL_shader_compute_dispatch(self.c_shader, x, y, z)             # <<<<<<<<<<<<<<
 * 
 * cdef class ssbo:
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_x); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2819, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_y); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2819, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_z); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2819, __pyx_L1_error)
  CGL_shader_compute_dispatch(__pyx_v_self->c_shader, __pyx_t_1, __pyx_t_2, __pyx_t_3);

  /* "cgl_wrapper.pyx":2818
 *         CGL_shader_set_uniform_ivec4v(self.c_shader, self.get_uniform_location(name), x, y, z, w)
 * 
 *     def compute_dispatch(self, x: int, y: int, z: int):             # <<<<<<<<<<<<<<
 *         CGL_shader_compute_dispatch(self.c_shader, x, y, z)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.shader.compute_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_61__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_60__reduce_cython__(((struct __pyx_obj_3cgl_shader *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_60__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_shader *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__65, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shader.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_6shader_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_6shader_63__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_6shader_62__setstate_cython__(((struct __pyx_obj_3cgl_shader *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_6shader_62__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_shader *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shader.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2826
 * 
 *     @property
 *     def size(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_ssbo_get_size(self.c_ssbo)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_4size___get__(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_4size___get__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2827
 *     @property
 *     def size(self) -> int:
 *         return CGL_ssbo_get_size(self.c_ssbo)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(CGL_ssbo_get_size(__pyx_v_self->c_ssbo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2826
 * 
 *     @property
 *     def size(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_ssbo_get_size(self.c_ssbo)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ssbo.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2829
 *         return CGL_ssbo_get_size(self.c_ssbo)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_ssbo = CGL_ssbo_create(0)
 *         self.has_been_destroyed = False
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4ssbo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_4ssbo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_4ssbo___init__(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4ssbo___init__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":2830
 * 
 *     def __init__(self):
 *         self.c_ssbo = CGL_ssbo_create(0)             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
  __pyx_v_self->c_ssbo = CGL_ssbo_create(0);

  /* "cgl_wrapper.pyx":2831
 *     def __init__(self):
 *         self.c_ssbo = CGL_ssbo_create(0)
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2829
 *         return CGL_ssbo_get_size(self.c_ssbo)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_ssbo = CGL_ssbo_create(0)
 *         self.has_been_destroyed = False
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2833
 *         self.has_been_destroyed = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

/* Python wrapper */
static void __pyx_pw_3cgl_4ssbo_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_4ssbo_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_4ssbo_2__dealloc__(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_4ssbo_2__dealloc__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":2834
 * 
 *     def __dealloc__(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2835
 *     def __dealloc__(self):
 *         if not self.has_been_destroyed:
 *             self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":2834
 * 
 *     def __dealloc__(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             self.destroy()
 * 
 */
  }

  /* "cgl_wrapper.pyx":2833
 *         self.has_been_destroyed = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             self.destroy()
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("cgl.ssbo.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":2837
 *             self.destroy()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"ssbo({self.get_id()})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_4__repr__(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_4__repr__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":2838
 * 
 *     def __repr__(self):
 *         return f"ssbo({self.get_id()})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_ssbo);
  __pyx_t_2 += 5;
  __Pyx_GIVEREF(__pyx_kp_u_ssbo);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ssbo);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2837
 *             self.destroy()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"ssbo({self.get_id()})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.ssbo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2840
 *         return f"ssbo({self.get_id()})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"ssbo({self.get_id()})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_6__str__(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_6__str__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":2841
 * 
 *     def __str__(self):
 *         return f"ssbo({self.get_id()})"             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_ssbo);
  __pyx_t_2 += 5;
  __Pyx_GIVEREF(__pyx_kp_u_ssbo);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ssbo);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2840
 *         return f"ssbo({self.get_id()})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"ssbo({self.get_id()})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.ssbo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2843
 *         return f"ssbo({self.get_id()})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_4ssbo_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_4ssbo_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_8__hash__(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_4ssbo_8__hash__(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":2844
 * 
 *     def __hash__(self):
 *         return self.get_id()             # <<<<<<<<<<<<<<
 * 
 *     def bind(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_AsHash_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_hash_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2843
 *         return f"ssbo({self.get_id()})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.ssbo.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2846
 *         return self.get_id()
 * 
 *     def bind(self):             # <<<<<<<<<<<<<<
 *         CGL_ssbo_bind(self.c_ssbo)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_11bind(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_11bind(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bind (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_10bind(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_10bind(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bind", 0);

  /* "cgl_wrapper.pyx":2847
 * 
 *     def bind(self):
 *         CGL_ssbo_bind(self.c_ssbo)             # <<<<<<<<<<<<<<
 * 
 *     def bind_base(self, index: int):
 */
  CGL_ssbo_bind(__pyx_v_self->c_ssbo);

  /* "cgl_wrapper.pyx":2846
 *         return self.get_id()
 * 
 *     def bind(self):             # <<<<<<<<<<<<<<
 *         CGL_ssbo_bind(self.c_ssbo)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2849
 *         CGL_ssbo_bind(self.c_ssbo)
 * 
 *     def bind_base(self, index: int):             # <<<<<<<<<<<<<<
 *         CGL_ssbo_bind2(self.c_ssbo, index)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_13bind_base(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_13bind_base(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bind_base (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_12bind_base(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_12bind_base(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bind_base", 0);

  /* "cgl_wrapper.pyx":2850
 * 
 *     def bind_base(self, index: int):
 *         CGL_ssbo_bind2(self.c_ssbo, index)             # <<<<<<<<<<<<<<
 * 
 *     def set_data(self, data: bytes, static_draw: bool = True):
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint32_t(__pyx_v_index); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2850, __pyx_L1_error)
  CGL_ssbo_bind2(__pyx_v_self->c_ssbo, __pyx_t_1);

  /* "cgl_wrapper.pyx":2849
 *         CGL_ssbo_bind(self.c_ssbo)
 * 
 *     def bind_base(self, index: int):             # <<<<<<<<<<<<<<
 *         CGL_ssbo_bind2(self.c_ssbo, index)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.ssbo.bind_base", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2852
 *         CGL_ssbo_bind2(self.c_ssbo, index)
 * 
 *     def set_data(self, data: bytes, static_draw: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_ssbo_set_data(self.c_ssbo, len(data), <void*>data,  static_draw)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_15set_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_15set_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  bool __pyx_v_static_draw;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_static_draw,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_static_draw);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_data") < 0)) __PYX_ERR(0, 2852, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_static_draw = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_static_draw == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2852, __pyx_L3_error)
    } else {
      __pyx_v_static_draw = ((bool)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_data", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2852, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ssbo.set_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 2852, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4ssbo_14set_data(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self), __pyx_v_data, __pyx_v_static_draw);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_14set_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_data, bool __pyx_v_static_draw) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_data", 0);

  /* "cgl_wrapper.pyx":2853
 * 
 *     def set_data(self, data: bytes, static_draw: bool = True):
 *         CGL_ssbo_set_data(self.c_ssbo, len(data), <void*>data,  static_draw)             # <<<<<<<<<<<<<<
 * 
 *     def set_sub_data(self, data: bytes, offset: int, static_draw: bool = True):
 */
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 2853, __pyx_L1_error)
  }
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2853, __pyx_L1_error)
  CGL_ssbo_set_data(__pyx_v_self->c_ssbo, __pyx_t_1, ((void *)__pyx_v_data), __pyx_v_static_draw);

  /* "cgl_wrapper.pyx":2852
 *         CGL_ssbo_bind2(self.c_ssbo, index)
 * 
 *     def set_data(self, data: bytes, static_draw: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_ssbo_set_data(self.c_ssbo, len(data), <void*>data,  static_draw)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.ssbo.set_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2855
 *         CGL_ssbo_set_data(self.c_ssbo, len(data), <void*>data,  static_draw)
 * 
 *     def set_sub_data(self, data: bytes, offset: int, static_draw: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_ssbo_set_sub_data(self.c_ssbo, offset, len(data), <void*>data, static_draw)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_17set_sub_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_17set_sub_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  PyObject *__pyx_v_offset = 0;
  bool __pyx_v_static_draw;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_sub_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_offset,&__pyx_n_s_static_draw,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_sub_data", 0, 2, 3, 1); __PYX_ERR(0, 2855, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_static_draw);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_sub_data") < 0)) __PYX_ERR(0, 2855, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = ((PyObject*)values[0]);
    __pyx_v_offset = values[1];
    if (values[2]) {
      __pyx_v_static_draw = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_static_draw == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2855, __pyx_L3_error)
    } else {
      __pyx_v_static_draw = ((bool)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_sub_data", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2855, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ssbo.set_sub_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 2855, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4ssbo_16set_sub_data(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self), __pyx_v_data, __pyx_v_offset, __pyx_v_static_draw);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_16set_sub_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_data, PyObject *__pyx_v_offset, bool __pyx_v_static_draw) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_sub_data", 0);

  /* "cgl_wrapper.pyx":2856
 * 
 *     def set_sub_data(self, data: bytes, offset: int, static_draw: bool = True):
 *         CGL_ssbo_set_sub_data(self.c_ssbo, offset, len(data), <void*>data, static_draw)             # <<<<<<<<<<<<<<
 * 
 *     def get_data(self, max_size = 100000000) -> bytes:
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_offset); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2856, __pyx_L1_error)
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 2856, __pyx_L1_error)
  }
  __pyx_t_2 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2856, __pyx_L1_error)
  CGL_ssbo_set_sub_data(__pyx_v_self->c_ssbo, __pyx_t_1, __pyx_t_2, ((void *)__pyx_v_data), __pyx_v_static_draw);

  /* "cgl_wrapper.pyx":2855
 *         CGL_ssbo_set_data(self.c_ssbo, len(data), <void*>data,  static_draw)
 * 
 *     def set_sub_data(self, data: bytes, offset: int, static_draw: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_ssbo_set_sub_data(self.c_ssbo, offset, len(data), <void*>data, static_draw)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.ssbo.set_sub_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2858
 *         CGL_ssbo_set_sub_data(self.c_ssbo, offset, len(data), <void*>data, static_draw)
 * 
 *     def get_data(self, max_size = 100000000) -> bytes:             # <<<<<<<<<<<<<<
 *         cdef size_t size
 *         cdef void* buff = stdlib.malloc(max_size)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_19get_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_19get_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_max_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_max_size,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_100000000);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_size);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_data") < 0)) __PYX_ERR(0, 2858, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_max_size = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_data", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2858, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ssbo.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_4ssbo_18get_data(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self), __pyx_v_max_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_18get_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_max_size) {
  size_t __pyx_v_size;
  void *__pyx_v_buff;
  PyObject *__pyx_v_byts = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_data", 0);

  /* "cgl_wrapper.pyx":2860
 *     def get_data(self, max_size = 100000000) -> bytes:
 *         cdef size_t size
 *         cdef void* buff = stdlib.malloc(max_size)             # <<<<<<<<<<<<<<
 *         CGL_ssbo_get_data(self.c_ssbo, &size, buff)
 *         byts = <bytes>buff
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_max_size); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2860, __pyx_L1_error)
  __pyx_v_buff = malloc(__pyx_t_1);

  /* "cgl_wrapper.pyx":2861
 *         cdef size_t size
 *         cdef void* buff = stdlib.malloc(max_size)
 *         CGL_ssbo_get_data(self.c_ssbo, &size, buff)             # <<<<<<<<<<<<<<
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)
 */
  CGL_ssbo_get_data(__pyx_v_self->c_ssbo, (&__pyx_v_size), __pyx_v_buff);

  /* "cgl_wrapper.pyx":2862
 *         cdef void* buff = stdlib.malloc(max_size)
 *         CGL_ssbo_get_data(self.c_ssbo, &size, buff)
 *         byts = <bytes>buff             # <<<<<<<<<<<<<<
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_buff);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_byts = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2863
 *         CGL_ssbo_get_data(self.c_ssbo, &size, buff)
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)             # <<<<<<<<<<<<<<
 *         stdlib.free(buff)
 *         return result
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_byts) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_byts);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2864
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free(__pyx_v_buff);

  /* "cgl_wrapper.pyx":2865
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def get_sub_data(self, offset: int, size) -> bytes:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyBytes_CheckExact(__pyx_v_result))||((__pyx_v_result) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_result)->tp_name), 0))) __PYX_ERR(0, 2865, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = ((PyObject*)__pyx_v_result);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2858
 *         CGL_ssbo_set_sub_data(self.c_ssbo, offset, len(data), <void*>data, static_draw)
 * 
 *     def get_data(self, max_size = 100000000) -> bytes:             # <<<<<<<<<<<<<<
 *         cdef size_t size
 *         cdef void* buff = stdlib.malloc(max_size)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.ssbo.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_byts);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2867
 *         return result
 * 
 *     def get_sub_data(self, offset: int, size) -> bytes:             # <<<<<<<<<<<<<<
 *         cdef void* buff = stdlib.malloc(size)
 *         CGL_ssbo_get_sub_data(self.c_ssbo, offset, size, buff)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_21get_sub_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_21get_sub_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_offset = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_sub_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_sub_data", 1, 2, 2, 1); __PYX_ERR(0, 2867, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_sub_data") < 0)) __PYX_ERR(0, 2867, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_offset = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_sub_data", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2867, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ssbo.get_sub_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_4ssbo_20get_sub_data(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self), __pyx_v_offset, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_20get_sub_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_size) {
  void *__pyx_v_buff;
  PyObject *__pyx_v_byts = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_sub_data", 0);

  /* "cgl_wrapper.pyx":2868
 * 
 *     def get_sub_data(self, offset: int, size) -> bytes:
 *         cdef void* buff = stdlib.malloc(size)             # <<<<<<<<<<<<<<
 *         CGL_ssbo_get_sub_data(self.c_ssbo, offset, size, buff)
 *         byts = <bytes>buff
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2868, __pyx_L1_error)
  __pyx_v_buff = malloc(__pyx_t_1);

  /* "cgl_wrapper.pyx":2869
 *     def get_sub_data(self, offset: int, size) -> bytes:
 *         cdef void* buff = stdlib.malloc(size)
 *         CGL_ssbo_get_sub_data(self.c_ssbo, offset, size, buff)             # <<<<<<<<<<<<<<
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_offset); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2869, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2869, __pyx_L1_error)
  CGL_ssbo_get_sub_data(__pyx_v_self->c_ssbo, __pyx_t_1, __pyx_t_2, __pyx_v_buff);

  /* "cgl_wrapper.pyx":2870
 *         cdef void* buff = stdlib.malloc(size)
 *         CGL_ssbo_get_sub_data(self.c_ssbo, offset, size, buff)
 *         byts = <bytes>buff             # <<<<<<<<<<<<<<
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_buff);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_byts = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2871
 *         CGL_ssbo_get_sub_data(self.c_ssbo, offset, size, buff)
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)             # <<<<<<<<<<<<<<
 *         stdlib.free(buff)
 *         return result
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_byts) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_byts);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2872
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free(__pyx_v_buff);

  /* "cgl_wrapper.pyx":2873
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def get_size(self) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyBytes_CheckExact(__pyx_v_result))||((__pyx_v_result) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_result)->tp_name), 0))) __PYX_ERR(0, 2873, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = ((PyObject*)__pyx_v_result);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2867
 *         return result
 * 
 *     def get_sub_data(self, offset: int, size) -> bytes:             # <<<<<<<<<<<<<<
 *         cdef void* buff = stdlib.malloc(size)
 *         CGL_ssbo_get_sub_data(self.c_ssbo, offset, size, buff)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.ssbo.get_sub_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_byts);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2875
 *         return result
 * 
 *     def get_size(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_ssbo_get_size(self.c_ssbo)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_23get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_23get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_size (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_22get_size(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_22get_size(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_size", 0);

  /* "cgl_wrapper.pyx":2876
 * 
 *     def get_size(self) -> int:
 *         return CGL_ssbo_get_size(self.c_ssbo)             # <<<<<<<<<<<<<<
 * 
 *     def set_user_data(self, data):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(CGL_ssbo_get_size(__pyx_v_self->c_ssbo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2875
 *         return result
 * 
 *     def get_size(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_ssbo_get_size(self.c_ssbo)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ssbo.get_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2878
 *         return CGL_ssbo_get_size(self.c_ssbo)
 * 
 *     def set_user_data(self, data):             # <<<<<<<<<<<<<<
 *         CGL_ssbo_set_user_data(self.c_ssbo, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_25set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_25set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_24set_user_data(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_24set_user_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data", 0);

  /* "cgl_wrapper.pyx":2879
 * 
 *     def set_user_data(self, data):
 *         CGL_ssbo_set_user_data(self.c_ssbo, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def get_user_data(self) -> object:
 */
  CGL_ssbo_set_user_data(__pyx_v_self->c_ssbo, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2878
 *         return CGL_ssbo_get_size(self.c_ssbo)
 * 
 *     def set_user_data(self, data):             # <<<<<<<<<<<<<<
 *         CGL_ssbo_set_user_data(self.c_ssbo, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2881
 *         CGL_ssbo_set_user_data(self.c_ssbo, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_ssbo_get_user_data(self.c_ssbo)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_27get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_27get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_26get_user_data(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_26get_user_data(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  __Pyx_RefNannySetupContext("get_user_data", 0);

  /* "cgl_wrapper.pyx":2882
 * 
 *     def get_user_data(self) -> object:
 *         return <object>CGL_ssbo_get_user_data(self.c_ssbo)             # <<<<<<<<<<<<<<
 * 
 *     def get_id(self) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = CGL_ssbo_get_user_data(__pyx_v_self->c_ssbo);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2881
 *         CGL_ssbo_set_user_data(self.c_ssbo, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_ssbo_get_user_data(self.c_ssbo)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2884
 *         return <object>CGL_ssbo_get_user_data(self.c_ssbo)
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(&self.c_ssbo, sizeof(CGL_ssbo*))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_29get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_29get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_id (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_28get_id(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_28get_id(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_id", 0);

  /* "cgl_wrapper.pyx":2885
 * 
 *     def get_id(self) -> int:
 *         return CGL_utils_super_fast_hash(&self.c_ssbo, sizeof(CGL_ssbo*))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(CGL_utils_super_fast_hash((&__pyx_v_self->c_ssbo), (sizeof(struct CGL_ssbo *)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2884
 *         return <object>CGL_ssbo_get_user_data(self.c_ssbo)
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(&self.c_ssbo, sizeof(CGL_ssbo*))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ssbo.get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2888
 * 
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_ssbo_destroy(self.c_ssbo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_31destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_31destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_30destroy(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_30destroy(struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "cgl_wrapper.pyx":2889
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_ssbo_destroy(self.c_ssbo)
 *             self.has_been_destroyed = True
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2890
 *     def destroy(self):
 *         if not self.has_been_destroyed:
 *             CGL_ssbo_destroy(self.c_ssbo)             # <<<<<<<<<<<<<<
 *             self.has_been_destroyed = True
 * 
 */
    CGL_ssbo_destroy(__pyx_v_self->c_ssbo);

    /* "cgl_wrapper.pyx":2891
 *         if not self.has_been_destroyed:
 *             CGL_ssbo_destroy(self.c_ssbo)
 *             self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 * 
 * def ssbo_copy(dst: ssbo, src: ssbo, src_offset: int, dst_offset: int, size: int):
 */
    __pyx_v_self->has_been_destroyed = 1;

    /* "cgl_wrapper.pyx":2889
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_ssbo_destroy(self.c_ssbo)
 *             self.has_been_destroyed = True
 */
  }

  /* "cgl_wrapper.pyx":2888
 * 
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_ssbo_destroy(self.c_ssbo)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_33__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_32__reduce_cython__(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_32__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ssbo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__67, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ssbo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4ssbo_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_4ssbo_35__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4ssbo_34__setstate_cython__(((struct __pyx_obj_3cgl_ssbo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4ssbo_34__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ssbo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__68, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ssbo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2893
 *             self.has_been_destroyed = True
 * 
 * def ssbo_copy(dst: ssbo, src: ssbo, src_offset: int, dst_offset: int, size: int):             # <<<<<<<<<<<<<<
 *     CGL_ssbo_copy(dst.c_ssbo, src.c_ssbo, src_offset, dst_offset, size)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_223ssbo_copy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_223ssbo_copy = {"ssbo_copy", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_223ssbo_copy, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_223ssbo_copy(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_ssbo *__pyx_v_dst = 0;
  struct __pyx_obj_3cgl_ssbo *__pyx_v_src = 0;
  PyObject *__pyx_v_src_offset = 0;
  PyObject *__pyx_v_dst_offset = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ssbo_copy (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_dst,&__pyx_n_s_src,&__pyx_n_s_src_offset,&__pyx_n_s_dst_offset,&__pyx_n_s_size,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dst)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_src)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ssbo_copy", 1, 5, 5, 1); __PYX_ERR(0, 2893, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_src_offset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ssbo_copy", 1, 5, 5, 2); __PYX_ERR(0, 2893, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dst_offset)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ssbo_copy", 1, 5, 5, 3); __PYX_ERR(0, 2893, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("ssbo_copy", 1, 5, 5, 4); __PYX_ERR(0, 2893, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ssbo_copy") < 0)) __PYX_ERR(0, 2893, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_dst = ((struct __pyx_obj_3cgl_ssbo *)values[0]);
    __pyx_v_src = ((struct __pyx_obj_3cgl_ssbo *)values[1]);
    __pyx_v_src_offset = values[2];
    __pyx_v_dst_offset = values[3];
    __pyx_v_size = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("ssbo_copy", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2893, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ssbo_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dst), __pyx_ptype_3cgl_ssbo, 1, "dst", 0))) __PYX_ERR(0, 2893, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_src), __pyx_ptype_3cgl_ssbo, 1, "src", 0))) __PYX_ERR(0, 2893, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_222ssbo_copy(__pyx_self, __pyx_v_dst, __pyx_v_src, __pyx_v_src_offset, __pyx_v_dst_offset, __pyx_v_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_222ssbo_copy(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_ssbo *__pyx_v_dst, struct __pyx_obj_3cgl_ssbo *__pyx_v_src, PyObject *__pyx_v_src_offset, PyObject *__pyx_v_dst_offset, PyObject *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("ssbo_copy", 0);

  /* "cgl_wrapper.pyx":2894
 * 
 * def ssbo_copy(dst: ssbo, src: ssbo, src_offset: int, dst_offset: int, size: int):
 *     CGL_ssbo_copy(dst.c_ssbo, src.c_ssbo, src_offset, dst_offset, size)             # <<<<<<<<<<<<<<
 * 
 * cdef class ubo:
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_src_offset); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2894, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_dst_offset); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2894, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2894, __pyx_L1_error)
  CGL_ssbo_copy(__pyx_v_dst->c_ssbo, __pyx_v_src->c_ssbo, __pyx_t_1, __pyx_t_2, __pyx_t_3);

  /* "cgl_wrapper.pyx":2893
 *             self.has_been_destroyed = True
 * 
 * def ssbo_copy(dst: ssbo, src: ssbo, src_offset: int, dst_offset: int, size: int):             # <<<<<<<<<<<<<<
 *     CGL_ssbo_copy(dst.c_ssbo, src.c_ssbo, src_offset, dst_offset, size)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.ssbo_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2901
 * 
 *     @property
 *     def size(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_ubo_get_size(self.c_ubo)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_4size___get__(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_4size___get__(struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2902
 *     @property
 *     def size(self) -> int:
 *         return CGL_ubo_get_size(self.c_ubo)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(CGL_ubo_get_size(__pyx_v_self->c_ubo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2901
 * 
 *     @property
 *     def size(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_ubo_get_size(self.c_ubo)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ubo.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2904
 *         return CGL_ubo_get_size(self.c_ubo)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_ubo = CGL_ubo_create()
 *         self.has_been_destroyed = False
 */

/* Python wrapper */
static int __pyx_pw_3cgl_3ubo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_3ubo_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_3ubo___init__(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_3ubo___init__(struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":2905
 * 
 *     def __init__(self):
 *         self.c_ubo = CGL_ubo_create()             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
  __pyx_v_self->c_ubo = CGL_ubo_create();

  /* "cgl_wrapper.pyx":2906
 *     def __init__(self):
 *         self.c_ubo = CGL_ubo_create()
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":2904
 *         return CGL_ubo_get_size(self.c_ubo)
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_ubo = CGL_ubo_create()
 *         self.has_been_destroyed = False
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2908
 *         self.has_been_destroyed = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_3ubo_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_3ubo_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_3ubo_2__dealloc__(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_3ubo_2__dealloc__(struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":2909
 * 
 *     def __dealloc__(self):
 *         self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2908
 *         self.has_been_destroyed = False
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("cgl.ubo.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":2911
 *         self.destroy()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"ubo({self.get_id()})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_4__repr__(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_4__repr__(struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":2912
 * 
 *     def __repr__(self):
 *         return f"ubo({self.get_id()})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_ubo);
  __pyx_t_2 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_ubo);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ubo);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2912, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2911
 *         self.destroy()
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"ubo({self.get_id()})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.ubo.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2914
 *         return f"ubo({self.get_id()})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"ubo({self.get_id()})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_6__str__(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_6__str__(struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":2915
 * 
 *     def __str__(self):
 *         return f"ubo({self.get_id()})"             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_ubo);
  __pyx_t_2 += 4;
  __Pyx_GIVEREF(__pyx_kp_u_ubo);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_ubo);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2914
 *         return f"ubo({self.get_id()})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"ubo({self.get_id()})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.ubo.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2917
 *         return f"ubo({self.get_id()})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_3ubo_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_3ubo_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_8__hash__(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_3ubo_8__hash__(struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_hash_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":2918
 * 
 *     def __hash__(self):
 *         return self.get_id()             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyInt_AsHash_t(__pyx_t_1); if (unlikely((__pyx_t_4 == (Py_hash_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2918, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2917
 *         return f"ubo({self.get_id()})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.get_id()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.ubo.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2920
 *         return self.get_id()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_ubo_destroy(self.c_ubo)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_11destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_11destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_10destroy(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_10destroy(struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "cgl_wrapper.pyx":2921
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_ubo_destroy(self.c_ubo)
 *             self.has_been_destroyed = True
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":2922
 *     def destroy(self):
 *         if not self.has_been_destroyed:
 *             CGL_ubo_destroy(self.c_ubo)             # <<<<<<<<<<<<<<
 *             self.has_been_destroyed = True
 * 
 */
    CGL_ubo_destroy(__pyx_v_self->c_ubo);

    /* "cgl_wrapper.pyx":2923
 *         if not self.has_been_destroyed:
 *             CGL_ubo_destroy(self.c_ubo)
 *             self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 * 
 *     def bind(self, shd: shader, name: str, binding: int):
 */
    __pyx_v_self->has_been_destroyed = 1;

    /* "cgl_wrapper.pyx":2921
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_ubo_destroy(self.c_ubo)
 *             self.has_been_destroyed = True
 */
  }

  /* "cgl_wrapper.pyx":2920
 *         return self.get_id()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_ubo_destroy(self.c_ubo)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2925
 *             self.has_been_destroyed = True
 * 
 *     def bind(self, shd: shader, name: str, binding: int):             # <<<<<<<<<<<<<<
 *         CGL_ubo_bind(self.c_ubo, shd.c_shader, name.encode("utf-8"), binding)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_13bind(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_13bind(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_shader *__pyx_v_shd = 0;
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_binding = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bind (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shd,&__pyx_n_s_name,&__pyx_n_s_binding,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shd)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("bind", 1, 3, 3, 1); __PYX_ERR(0, 2925, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_binding)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("bind", 1, 3, 3, 2); __PYX_ERR(0, 2925, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bind") < 0)) __PYX_ERR(0, 2925, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_shd = ((struct __pyx_obj_3cgl_shader *)values[0]);
    __pyx_v_name = ((PyObject*)values[1]);
    __pyx_v_binding = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("bind", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2925, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ubo.bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shd), __pyx_ptype_3cgl_shader, 1, "shd", 0))) __PYX_ERR(0, 2925, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 2925, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_3ubo_12bind(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self), __pyx_v_shd, __pyx_v_name, __pyx_v_binding);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_12bind(struct __pyx_obj_3cgl_ubo *__pyx_v_self, struct __pyx_obj_3cgl_shader *__pyx_v_shd, PyObject *__pyx_v_name, PyObject *__pyx_v_binding) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_byte const *__pyx_t_2;
  uint32_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bind", 0);

  /* "cgl_wrapper.pyx":2926
 * 
 *     def bind(self, shd: shader, name: str, binding: int):
 *         CGL_ubo_bind(self.c_ubo, shd.c_shader, name.encode("utf-8"), binding)             # <<<<<<<<<<<<<<
 * 
 *     def set_data(self, data: bytes, static_draw: bool = True):
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_name, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 2926, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_uint32_t(__pyx_v_binding); if (unlikely((__pyx_t_3 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2926, __pyx_L1_error)
  CGL_ubo_bind(__pyx_v_self->c_ubo, __pyx_v_shd->c_shader, __pyx_t_2, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2925
 *             self.has_been_destroyed = True
 * 
 *     def bind(self, shd: shader, name: str, binding: int):             # <<<<<<<<<<<<<<
 *         CGL_ubo_bind(self.c_ubo, shd.c_shader, name.encode("utf-8"), binding)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ubo.bind", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2928
 *         CGL_ubo_bind(self.c_ubo, shd.c_shader, name.encode("utf-8"), binding)
 * 
 *     def set_data(self, data: bytes, static_draw: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_ubo_set_data(self.c_ubo, len(data), <void*>data, static_draw)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_15set_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_15set_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_data = 0;
  bool __pyx_v_static_draw;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_data,&__pyx_n_s_static_draw,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_static_draw);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_data") < 0)) __PYX_ERR(0, 2928, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_data = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_static_draw = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_static_draw == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2928, __pyx_L3_error)
    } else {
      __pyx_v_static_draw = ((bool)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_data", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2928, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ubo.set_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 2928, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_3ubo_14set_data(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self), __pyx_v_data, __pyx_v_static_draw);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_14set_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self, PyObject *__pyx_v_data, bool __pyx_v_static_draw) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_data", 0);

  /* "cgl_wrapper.pyx":2929
 * 
 *     def set_data(self, data: bytes, static_draw: bool = True):
 *         CGL_ubo_set_data(self.c_ubo, len(data), <void*>data, static_draw)             # <<<<<<<<<<<<<<
 * 
 *     def set_sub_data(self, offset: int, data: bytes, static_draw: bool = True):
 */
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 2929, __pyx_L1_error)
  }
  __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2929, __pyx_L1_error)
  CGL_ubo_set_data(__pyx_v_self->c_ubo, __pyx_t_1, ((void *)__pyx_v_data), __pyx_v_static_draw);

  /* "cgl_wrapper.pyx":2928
 *         CGL_ubo_bind(self.c_ubo, shd.c_shader, name.encode("utf-8"), binding)
 * 
 *     def set_data(self, data: bytes, static_draw: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_ubo_set_data(self.c_ubo, len(data), <void*>data, static_draw)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.ubo.set_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2931
 *         CGL_ubo_set_data(self.c_ubo, len(data), <void*>data, static_draw)
 * 
 *     def set_sub_data(self, offset: int, data: bytes, static_draw: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_ubo_set_sub_data(self.c_ubo, offset, len(data), <void*>data, static_draw)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_17set_sub_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_17set_sub_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_offset = 0;
  PyObject *__pyx_v_data = 0;
  bool __pyx_v_static_draw;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_sub_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_data,&__pyx_n_s_static_draw,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_data)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_sub_data", 0, 2, 3, 1); __PYX_ERR(0, 2931, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_static_draw);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_sub_data") < 0)) __PYX_ERR(0, 2931, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_offset = values[0];
    __pyx_v_data = ((PyObject*)values[1]);
    if (values[2]) {
      __pyx_v_static_draw = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_static_draw == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2931, __pyx_L3_error)
    } else {
      __pyx_v_static_draw = ((bool)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_sub_data", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2931, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ubo.set_sub_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 2931, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_3ubo_16set_sub_data(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self), __pyx_v_offset, __pyx_v_data, __pyx_v_static_draw);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_16set_sub_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_data, bool __pyx_v_static_draw) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_sub_data", 0);

  /* "cgl_wrapper.pyx":2932
 * 
 *     def set_sub_data(self, offset: int, data: bytes, static_draw: bool = True):
 *         CGL_ubo_set_sub_data(self.c_ubo, offset, len(data), <void*>data, static_draw)             # <<<<<<<<<<<<<<
 * 
 *     def get_data(self, max_size: int = 100000000) -> bytes:
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_offset); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2932, __pyx_L1_error)
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 2932, __pyx_L1_error)
  }
  __pyx_t_2 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2932, __pyx_L1_error)
  CGL_ubo_set_sub_data(__pyx_v_self->c_ubo, __pyx_t_1, __pyx_t_2, ((void *)__pyx_v_data), __pyx_v_static_draw);

  /* "cgl_wrapper.pyx":2931
 *         CGL_ubo_set_data(self.c_ubo, len(data), <void*>data, static_draw)
 * 
 *     def set_sub_data(self, offset: int, data: bytes, static_draw: bool = True):             # <<<<<<<<<<<<<<
 *         CGL_ubo_set_sub_data(self.c_ubo, offset, len(data), <void*>data, static_draw)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.ubo.set_sub_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2934
 *         CGL_ubo_set_sub_data(self.c_ubo, offset, len(data), <void*>data, static_draw)
 * 
 *     def get_data(self, max_size: int = 100000000) -> bytes:             # <<<<<<<<<<<<<<
 *         cdef size_t size
 *         cdef void* buff = stdlib.malloc(max_size)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_19get_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_19get_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_max_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_max_size,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)__pyx_int_100000000);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_size);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_data") < 0)) __PYX_ERR(0, 2934, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_max_size = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_data", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2934, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ubo.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_3ubo_18get_data(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self), __pyx_v_max_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_18get_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self, PyObject *__pyx_v_max_size) {
  size_t __pyx_v_size;
  void *__pyx_v_buff;
  PyObject *__pyx_v_byts = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_data", 0);

  /* "cgl_wrapper.pyx":2936
 *     def get_data(self, max_size: int = 100000000) -> bytes:
 *         cdef size_t size
 *         cdef void* buff = stdlib.malloc(max_size)             # <<<<<<<<<<<<<<
 *         CGL_ubo_get_data(self.c_ubo, &size, buff)
 *         byts = <bytes>buff
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_max_size); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2936, __pyx_L1_error)
  __pyx_v_buff = malloc(__pyx_t_1);

  /* "cgl_wrapper.pyx":2937
 *         cdef size_t size
 *         cdef void* buff = stdlib.malloc(max_size)
 *         CGL_ubo_get_data(self.c_ubo, &size, buff)             # <<<<<<<<<<<<<<
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)
 */
  CGL_ubo_get_data(__pyx_v_self->c_ubo, (&__pyx_v_size), __pyx_v_buff);

  /* "cgl_wrapper.pyx":2938
 *         cdef void* buff = stdlib.malloc(max_size)
 *         CGL_ubo_get_data(self.c_ubo, &size, buff)
 *         byts = <bytes>buff             # <<<<<<<<<<<<<<
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_buff);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_byts = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2939
 *         CGL_ubo_get_data(self.c_ubo, &size, buff)
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)             # <<<<<<<<<<<<<<
 *         stdlib.free(buff)
 *         return result
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_copy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
    }
  }
  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_byts) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_byts);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_v_result = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":2940
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free(__pyx_v_buff);

  /* "cgl_wrapper.pyx":2941
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def get_sub_data(self, offset: int, size: int) -> bytes:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyBytes_CheckExact(__pyx_v_result))||((__pyx_v_result) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_result)->tp_name), 0))) __PYX_ERR(0, 2941, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = ((PyObject*)__pyx_v_result);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2934
 *         CGL_ubo_set_sub_data(self.c_ubo, offset, len(data), <void*>data, static_draw)
 * 
 *     def get_data(self, max_size: int = 100000000) -> bytes:             # <<<<<<<<<<<<<<
 *         cdef size_t size
 *         cdef void* buff = stdlib.malloc(max_size)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.ubo.get_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_byts);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2943
 *         return result
 * 
 *     def get_sub_data(self, offset: int, size: int) -> bytes:             # <<<<<<<<<<<<<<
 *         cdef void* buff = stdlib.malloc(size)
 *         CGL_ubo_get_sub_data(self.c_ubo, offset, size, buff)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_21get_sub_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_21get_sub_data(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_offset = 0;
  PyObject *__pyx_v_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_sub_data (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("get_sub_data", 1, 2, 2, 1); __PYX_ERR(0, 2943, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_sub_data") < 0)) __PYX_ERR(0, 2943, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_offset = values[0];
    __pyx_v_size = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get_sub_data", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2943, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.ubo.get_sub_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_3ubo_20get_sub_data(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self), __pyx_v_offset, __pyx_v_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_20get_sub_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self, PyObject *__pyx_v_offset, PyObject *__pyx_v_size) {
  void *__pyx_v_buff;
  PyObject *__pyx_v_byts = NULL;
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_sub_data", 0);

  /* "cgl_wrapper.pyx":2944
 * 
 *     def get_sub_data(self, offset: int, size: int) -> bytes:
 *         cdef void* buff = stdlib.malloc(size)             # <<<<<<<<<<<<<<
 *         CGL_ubo_get_sub_data(self.c_ubo, offset, size, buff)
 *         byts = <bytes>buff
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2944, __pyx_L1_error)
  __pyx_v_buff = malloc(__pyx_t_1);

  /* "cgl_wrapper.pyx":2945
 *     def get_sub_data(self, offset: int, size: int) -> bytes:
 *         cdef void* buff = stdlib.malloc(size)
 *         CGL_ubo_get_sub_data(self.c_ubo, offset, size, buff)             # <<<<<<<<<<<<<<
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_offset); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2945, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_size); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2945, __pyx_L1_error)
  CGL_ubo_get_sub_data(__pyx_v_self->c_ubo, __pyx_t_1, __pyx_t_2, __pyx_v_buff);

  /* "cgl_wrapper.pyx":2946
 *         cdef void* buff = stdlib.malloc(size)
 *         CGL_ubo_get_sub_data(self.c_ubo, offset, size, buff)
 *         byts = <bytes>buff             # <<<<<<<<<<<<<<
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_buff);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_byts = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2947
 *         CGL_ubo_get_sub_data(self.c_ubo, offset, size, buff)
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)             # <<<<<<<<<<<<<<
 *         stdlib.free(buff)
 *         return result
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_copy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_4, __pyx_v_byts) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_byts);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_result = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "cgl_wrapper.pyx":2948
 *         byts = <bytes>buff
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  free(__pyx_v_buff);

  /* "cgl_wrapper.pyx":2949
 *         result = copy.deepcopy(byts)
 *         stdlib.free(buff)
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def get_size(self) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  if (!(likely(PyBytes_CheckExact(__pyx_v_result))||((__pyx_v_result) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_result)->tp_name), 0))) __PYX_ERR(0, 2949, __pyx_L1_error)
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = ((PyObject*)__pyx_v_result);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2943
 *         return result
 * 
 *     def get_sub_data(self, offset: int, size: int) -> bytes:             # <<<<<<<<<<<<<<
 *         cdef void* buff = stdlib.malloc(size)
 *         CGL_ubo_get_sub_data(self.c_ubo, offset, size, buff)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.ubo.get_sub_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_byts);
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2951
 *         return result
 * 
 *     def get_size(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_ubo_get_size(self.c_ubo)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_23get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_23get_size(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_size (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_22get_size(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_22get_size(struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_size", 0);

  /* "cgl_wrapper.pyx":2952
 * 
 *     def get_size(self) -> int:
 *         return CGL_ubo_get_size(self.c_ubo)             # <<<<<<<<<<<<<<
 * 
 *     def set_user_data(self, data: object):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(CGL_ubo_get_size(__pyx_v_self->c_ubo)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2951
 *         return result
 * 
 *     def get_size(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_ubo_get_size(self.c_ubo)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ubo.get_size", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2954
 *         return CGL_ubo_get_size(self.c_ubo)
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_ubo_set_user_data(self.c_ubo, <void*>data)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_25set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_25set_user_data(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_24set_user_data(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self), ((PyObject *)__pyx_v_data));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_24set_user_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_user_data", 0);

  /* "cgl_wrapper.pyx":2955
 * 
 *     def set_user_data(self, data: object):
 *         CGL_ubo_set_user_data(self.c_ubo, <void*>data)             # <<<<<<<<<<<<<<
 * 
 *     def get_user_data(self) -> object:
 */
  CGL_ubo_set_user_data(__pyx_v_self->c_ubo, ((void *)__pyx_v_data));

  /* "cgl_wrapper.pyx":2954
 *         return CGL_ubo_get_size(self.c_ubo)
 * 
 *     def set_user_data(self, data: object):             # <<<<<<<<<<<<<<
 *         CGL_ubo_set_user_data(self.c_ubo, <void*>data)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2957
 *         CGL_ubo_set_user_data(self.c_ubo, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_ubo_get_user_data(self.c_ubo)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_27get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_27get_user_data(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_user_data (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_26get_user_data(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_26get_user_data(struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  void *__pyx_t_1;
  __Pyx_RefNannySetupContext("get_user_data", 0);

  /* "cgl_wrapper.pyx":2958
 * 
 *     def get_user_data(self) -> object:
 *         return <object>CGL_ubo_get_user_data(self.c_ubo)             # <<<<<<<<<<<<<<
 * 
 *     def get_id(self) -> int:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = CGL_ubo_get_user_data(__pyx_v_self->c_ubo);
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2957
 *         CGL_ubo_set_user_data(self.c_ubo, <void*>data)
 * 
 *     def get_user_data(self) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_ubo_get_user_data(self.c_ubo)
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2960
 *         return <object>CGL_ubo_get_user_data(self.c_ubo)
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(&self.c_ubo, sizeof(CGL_ubo*))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_29get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_29get_id(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_id (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_28get_id(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_28get_id(struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_id", 0);

  /* "cgl_wrapper.pyx":2961
 * 
 *     def get_id(self) -> int:
 *         return CGL_utils_super_fast_hash(&self.c_ubo, sizeof(CGL_ubo*))             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t(CGL_utils_super_fast_hash((&__pyx_v_self->c_ubo), (sizeof(struct CGL_ubo *)))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2960
 *         return <object>CGL_ubo_get_user_data(self.c_ubo)
 * 
 *     def get_id(self) -> int:             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(&self.c_ubo, sizeof(CGL_ubo*))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ubo.get_id", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_31__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_31__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_30__reduce_cython__(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_30__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ubo *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__69, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ubo.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_3ubo_33__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_3ubo_33__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_3ubo_32__setstate_cython__(((struct __pyx_obj_3cgl_ubo *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_3ubo_32__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_ubo *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__70, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.ubo.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2968
 * 
 *     @property
 *     def vertices_count(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_shape.vertices_count
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5shape_14vertices_count_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5shape_14vertices_count_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_14vertices_count___get__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5shape_14vertices_count___get__(struct __pyx_obj_3cgl_shape *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2969
 *     @property
 *     def vertices_count(self) -> int:
 *         return self.c_shape.vertices_count             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_self->c_shape.vertices_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2969, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2968
 * 
 *     @property
 *     def vertices_count(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_shape.vertices_count
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shape.vertices_count.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2972
 * 
 *     @property
 *     def vertices(self) -> list:             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range(self.vertices_count):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5shape_8vertices_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5shape_8vertices_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_8vertices___get__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5shape_8vertices___get__(struct __pyx_obj_3cgl_shape *__pyx_v_self) {
  PyObject *__pyx_v_result = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  Py_ssize_t __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2973
 *     @property
 *     def vertices(self) -> list:
 *         result = []             # <<<<<<<<<<<<<<
 *         for i in range(self.vertices_count):
 *             result.append(vec3(self.c_shape.vertices[i].x, self.c_shape.vertices[i].y, self.c_shape.vertices[i].z))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2973, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2974
 *     def vertices(self) -> list:
 *         result = []
 *         for i in range(self.vertices_count):             # <<<<<<<<<<<<<<
 *             result.append(vec3(self.c_shape.vertices[i].x, self.c_shape.vertices[i].y, self.c_shape.vertices[i].z))
 *         return result
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertices_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2974, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2974, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2974, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2974, __pyx_L1_error)
        #else
        __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2974, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2974, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "cgl_wrapper.pyx":2975
 *         result = []
 *         for i in range(self.vertices_count):
 *             result.append(vec3(self.c_shape.vertices[i].x, self.c_shape.vertices[i].y, self.c_shape.vertices[i].z))             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2975, __pyx_L1_error)
    __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->c_shape.vertices[__pyx_t_5]).x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2975, __pyx_L1_error)
    __pyx_t_6 = PyFloat_FromDouble((__pyx_v_self->c_shape.vertices[__pyx_t_5]).y); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2975, __pyx_L1_error)
    __pyx_t_7 = PyFloat_FromDouble((__pyx_v_self->c_shape.vertices[__pyx_t_5]).z); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
    __Pyx_GIVEREF(__pyx_t_7);
    PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
    __pyx_t_2 = 0;
    __pyx_t_6 = 0;
    __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2975, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2975, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "cgl_wrapper.pyx":2974
 *     def vertices(self) -> list:
 *         result = []
 *         for i in range(self.vertices_count):             # <<<<<<<<<<<<<<
 *             result.append(vec3(self.c_shape.vertices[i].x, self.c_shape.vertices[i].y, self.c_shape.vertices[i].z))
 *         return result
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2976
 *         for i in range(self.vertices_count):
 *             result.append(vec3(self.c_shape.vertices[i].x, self.c_shape.vertices[i].y, self.c_shape.vertices[i].z))
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2972
 * 
 *     @property
 *     def vertices(self) -> list:             # <<<<<<<<<<<<<<
 *         result = []
 *         for i in range(self.vertices_count):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cgl.shape.vertices.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2979
 * 
 *     @property
 *     def position(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_shape.position.x, self.c_shape.position.y, self.c_shape.position.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5shape_8position_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5shape_8position_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_8position___get__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5shape_8position___get__(struct __pyx_obj_3cgl_shape *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2980
 *     @property
 *     def position(self) -> vec3:
 *         return vec3(self.c_shape.position.x, self.c_shape.position.y, self.c_shape.position.z)             # <<<<<<<<<<<<<<
 * 
 *     @position.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_shape.position.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_shape.position.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_shape.position.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2980, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2979
 * 
 *     @property
 *     def position(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_shape.position.x, self.c_shape.position.y, self.c_shape.position.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.shape.position.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2983
 * 
 *     @position.setter
 *     def position(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_shape.position.x = value.x
 *         self.c_shape.position.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5shape_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_5shape_8position_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec3, 1, "value", 0))) __PYX_ERR(0, 2983, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_5shape_8position_2__set__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5shape_8position_2__set__(struct __pyx_obj_3cgl_shape *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":2984
 *     @position.setter
 *     def position(self, value: vec3):
 *         self.c_shape.position.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_shape.position.y = value.y
 *         self.c_shape.position.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2984, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2984, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_shape.position.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":2985
 *     def position(self, value: vec3):
 *         self.c_shape.position.x = value.x
 *         self.c_shape.position.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_shape.position.z = value.z
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2985, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_shape.position.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":2986
 *         self.c_shape.position.x = value.x
 *         self.c_shape.position.y = value.y
 *         self.c_shape.position.z = value.z             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2986, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_shape.position.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":2983
 * 
 *     @position.setter
 *     def position(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_shape.position.x = value.x
 *         self.c_shape.position.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shape.position.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2989
 * 
 *     @property
 *     def rotation(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_shape.rotation.x, self.c_shape.rotation.y, self.c_shape.rotation.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5shape_8rotation_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5shape_8rotation_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_8rotation___get__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5shape_8rotation___get__(struct __pyx_obj_3cgl_shape *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":2990
 *     @property
 *     def rotation(self) -> vec3:
 *         return vec3(self.c_shape.rotation.x, self.c_shape.rotation.y, self.c_shape.rotation.z)             # <<<<<<<<<<<<<<
 * 
 *     @rotation.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_shape.rotation.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_shape.rotation.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_shape.rotation.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2990, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2989
 * 
 *     @property
 *     def rotation(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_shape.rotation.x, self.c_shape.rotation.y, self.c_shape.rotation.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.shape.rotation.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2993
 * 
 *     @rotation.setter
 *     def rotation(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_shape.rotation.x = value.x
 *         self.c_shape.rotation.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5shape_8rotation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_5shape_8rotation_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec3, 1, "value", 0))) __PYX_ERR(0, 2993, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_5shape_8rotation_2__set__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5shape_8rotation_2__set__(struct __pyx_obj_3cgl_shape *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":2994
 *     @rotation.setter
 *     def rotation(self, value: vec3):
 *         self.c_shape.rotation.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_shape.rotation.y = value.y
 *         self.c_shape.rotation.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2994, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2994, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_shape.rotation.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":2995
 *     def rotation(self, value: vec3):
 *         self.c_shape.rotation.x = value.x
 *         self.c_shape.rotation.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_shape.rotation.z = value.z
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2995, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2995, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_shape.rotation.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":2996
 *         self.c_shape.rotation.x = value.x
 *         self.c_shape.rotation.y = value.y
 *         self.c_shape.rotation.z = value.z             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2996, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_shape.rotation.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":2993
 * 
 *     @rotation.setter
 *     def rotation(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_shape.rotation.x = value.x
 *         self.c_shape.rotation.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shape.rotation.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":2999
 * 
 *     @property
 *     def scale(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_shape.scale.x, self.c_shape.scale.y, self.c_shape.scale.z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5shape_5scale_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5shape_5scale_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_5scale___get__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5shape_5scale___get__(struct __pyx_obj_3cgl_shape *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3000
 *     @property
 *     def scale(self) -> vec3:
 *         return vec3(self.c_shape.scale.x, self.c_shape.scale.y, self.c_shape.scale.z)             # <<<<<<<<<<<<<<
 * 
 *     @scale.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_shape.scale.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_shape.scale.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_shape.scale.z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3000, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":2999
 * 
 *     @property
 *     def scale(self) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_shape.scale.x, self.c_shape.scale.y, self.c_shape.scale.z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.shape.scale.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3003
 * 
 *     @scale.setter
 *     def scale(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_shape.scale.x = value.x
 *         self.c_shape.scale.y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5shape_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_5shape_5scale_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec3, 1, "value", 0))) __PYX_ERR(0, 3003, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_5shape_5scale_2__set__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5shape_5scale_2__set__(struct __pyx_obj_3cgl_shape *__pyx_v_self, struct __pyx_obj_3cgl_vec3 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3004
 *     @scale.setter
 *     def scale(self, value: vec3):
 *         self.c_shape.scale.x = value.x             # <<<<<<<<<<<<<<
 *         self.c_shape.scale.y = value.y
 *         self.c_shape.scale.z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_shape.scale.x = __pyx_t_2;

  /* "cgl_wrapper.pyx":3005
 *     def scale(self, value: vec3):
 *         self.c_shape.scale.x = value.x
 *         self.c_shape.scale.y = value.y             # <<<<<<<<<<<<<<
 *         self.c_shape.scale.z = value.z
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3005, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3005, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_shape.scale.y = __pyx_t_2;

  /* "cgl_wrapper.pyx":3006
 *         self.c_shape.scale.x = value.x
 *         self.c_shape.scale.y = value.y
 *         self.c_shape.scale.z = value.z             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, vertices_count: int):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3006, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_self->c_shape.scale.z = __pyx_t_2;

  /* "cgl_wrapper.pyx":3003
 * 
 *     @scale.setter
 *     def scale(self, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_shape.scale.x = value.x
 *         self.c_shape.scale.y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shape.scale.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3008
 *         self.c_shape.scale.z = value.z
 * 
 *     def __init__(self, vertices_count: int):             # <<<<<<<<<<<<<<
 *         CGL_shape_init(&self.c_shape, vertices_count)
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5shape_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_5shape_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertices_count = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vertices_count,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertices_count)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3008, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_vertices_count = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3008, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.shape.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_5shape___init__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self), __pyx_v_vertices_count);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5shape___init__(struct __pyx_obj_3cgl_shape *__pyx_v_self, PyObject *__pyx_v_vertices_count) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":3009
 * 
 *     def __init__(self, vertices_count: int):
 *         CGL_shape_init(&self.c_shape, vertices_count)             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_vertices_count); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3009, __pyx_L1_error)
  CGL_shape_init((&__pyx_v_self->c_shape), __pyx_t_1);

  /* "cgl_wrapper.pyx":3008
 *         self.c_shape.scale.z = value.z
 * 
 *     def __init__(self, vertices_count: int):             # <<<<<<<<<<<<<<
 *         CGL_shape_init(&self.c_shape, vertices_count)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.shape.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3011
 *         CGL_shape_init(&self.c_shape, vertices_count)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         CGL_shape_destroy(&self.c_shape)
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_5shape_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_5shape_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_5shape_2__dealloc__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_5shape_2__dealloc__(struct __pyx_obj_3cgl_shape *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":3012
 * 
 *     def __dealloc__(self):
 *         CGL_shape_destroy(&self.c_shape)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  CGL_shape_destroy((&__pyx_v_self->c_shape));

  /* "cgl_wrapper.pyx":3011
 *         CGL_shape_init(&self.c_shape, vertices_count)
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         CGL_shape_destroy(&self.c_shape)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":3014
 *         CGL_shape_destroy(&self.c_shape)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"shape({self.vertices_count}, {self.position}, {self.rotation}, {self.scale})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5shape_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5shape_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_4__repr__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5shape_4__repr__(struct __pyx_obj_3cgl_shape *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":3015
 * 
 *     def __repr__(self):
 *         return f"shape({self.vertices_count}, {self.position}, {self.rotation}, {self.scale})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_shape);
  __pyx_t_2 += 6;
  __Pyx_GIVEREF(__pyx_kp_u_shape);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_shape);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertices_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rotation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3015, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3014
 *         CGL_shape_destroy(&self.c_shape)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"shape({self.vertices_count}, {self.position}, {self.rotation}, {self.scale})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.shape.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3017
 *         return f"shape({self.vertices_count}, {self.position}, {self.rotation}, {self.scale})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"shape({self.vertices_count}, {self.position}, {self.rotation}, {self.scale})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5shape_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5shape_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_6__str__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5shape_6__str__(struct __pyx_obj_3cgl_shape *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":3018
 * 
 *     def __str__(self):
 *         return f"shape({self.vertices_count}, {self.position}, {self.rotation}, {self.scale})"             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, index: int) -> vec3:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_shape);
  __pyx_t_2 += 6;
  __Pyx_GIVEREF(__pyx_kp_u_shape);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_shape);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertices_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_position); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_rotation); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_scale); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3018, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3017
 *         return f"shape({self.vertices_count}, {self.position}, {self.rotation}, {self.scale})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"shape({self.vertices_count}, {self.position}, {self.rotation}, {self.scale})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.shape.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3020
 *         return f"shape({self.vertices_count}, {self.position}, {self.rotation}, {self.scale})"
 * 
 *     def __getitem__(self, index: int) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_shape.vertices[index].x, self.c_shape.vertices[index].y, self.c_shape.vertices[index].z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5shape_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
static PyObject *__pyx_pw_3cgl_5shape_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_8__getitem__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self), ((PyObject *)__pyx_v_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5shape_8__getitem__(struct __pyx_obj_3cgl_shape *__pyx_v_self, PyObject *__pyx_v_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "cgl_wrapper.pyx":3021
 * 
 *     def __getitem__(self, index: int) -> vec3:
 *         return vec3(self.c_shape.vertices[index].x, self.c_shape.vertices[index].y, self.c_shape.vertices[index].z)             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, index: int, value: vec3):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3021, __pyx_L1_error)
  __pyx_t_2 = PyFloat_FromDouble((__pyx_v_self->c_shape.vertices[__pyx_t_1]).x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3021, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->c_shape.vertices[__pyx_t_1]).y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_1 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3021, __pyx_L1_error)
  __pyx_t_4 = PyFloat_FromDouble((__pyx_v_self->c_shape.vertices[__pyx_t_1]).z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
  __pyx_t_2 = 0;
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3020
 *         return f"shape({self.vertices_count}, {self.position}, {self.rotation}, {self.scale})"
 * 
 *     def __getitem__(self, index: int) -> vec3:             # <<<<<<<<<<<<<<
 *         return vec3(self.c_shape.vertices[index].x, self.c_shape.vertices[index].y, self.c_shape.vertices[index].z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.shape.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3023
 *         return vec3(self.c_shape.vertices[index].x, self.c_shape.vertices[index].y, self.c_shape.vertices[index].z)
 * 
 *     def __setitem__(self, index: int, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_shape.vertices[index].x = value.x
 *         self.c_shape.vertices[index].y = value.y
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5shape_11__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_5shape_11__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_3cgl_vec3, 1, "value", 0))) __PYX_ERR(0, 3023, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_5shape_10__setitem__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((struct __pyx_obj_3cgl_vec3 *)__pyx_v_value));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5shape_10__setitem__(struct __pyx_obj_3cgl_shape *__pyx_v_self, PyObject *__pyx_v_index, struct __pyx_obj_3cgl_vec3 *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_float __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "cgl_wrapper.pyx":3024
 * 
 *     def __setitem__(self, index: int, value: vec3):
 *         self.c_shape.vertices[index].x = value.x             # <<<<<<<<<<<<<<
 *         self.c_shape.vertices[index].y = value.y
 *         self.c_shape.vertices[index].z = value.z
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3024, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3024, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3024, __pyx_L1_error)
  (__pyx_v_self->c_shape.vertices[__pyx_t_3]).x = __pyx_t_2;

  /* "cgl_wrapper.pyx":3025
 *     def __setitem__(self, index: int, value: vec3):
 *         self.c_shape.vertices[index].x = value.x
 *         self.c_shape.vertices[index].y = value.y             # <<<<<<<<<<<<<<
 *         self.c_shape.vertices[index].z = value.z
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3025, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3025, __pyx_L1_error)
  (__pyx_v_self->c_shape.vertices[__pyx_t_3]).y = __pyx_t_2;

  /* "cgl_wrapper.pyx":3026
 *         self.c_shape.vertices[index].x = value.x
 *         self.c_shape.vertices[index].y = value.y
 *         self.c_shape.vertices[index].z = value.z             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_value), __pyx_n_s_z); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_2 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_3 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3026, __pyx_L1_error)
  (__pyx_v_self->c_shape.vertices[__pyx_t_3]).z = __pyx_t_2;

  /* "cgl_wrapper.pyx":3023
 *         return vec3(self.c_shape.vertices[index].x, self.c_shape.vertices[index].y, self.c_shape.vertices[index].z)
 * 
 *     def __setitem__(self, index: int, value: vec3):             # <<<<<<<<<<<<<<
 *         self.c_shape.vertices[index].x = value.x
 *         self.c_shape.vertices[index].y = value.y
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shape.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3028
 *         self.c_shape.vertices[index].z = value.z
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.vertices_count
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_3cgl_5shape_13__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_3cgl_5shape_13__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_12__len__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_3cgl_5shape_12__len__(struct __pyx_obj_3cgl_shape *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "cgl_wrapper.pyx":3029
 * 
 *     def __len__(self):
 *         return self.vertices_count             # <<<<<<<<<<<<<<
 * 
 * def sat_collison_overlap_on_axis(a: shape, b: shape, axis: vec2) -> (bool, float):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_vertices_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyIndex_AsSsize_t(__pyx_t_1); if (unlikely((__pyx_t_2 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3028
 *         self.c_shape.vertices[index].z = value.z
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self.vertices_count
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shape.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5shape_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_5shape_15__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_14__reduce_cython__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5shape_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_shape *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__71, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shape.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5shape_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_5shape_17__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5shape_16__setstate_cython__(((struct __pyx_obj_3cgl_shape *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5shape_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_shape *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__72, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.shape.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3031
 *         return self.vertices_count
 * 
 * def sat_collison_overlap_on_axis(a: shape, b: shape, axis: vec2) -> (bool, float):             # <<<<<<<<<<<<<<
 *     cdef float overlap_amount
 *     result = CGL_sat_collision_overlap_on_axis(&a.c_shape, &b.c_shape, axis.c_vec2, &overlap_amount)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_225sat_collison_overlap_on_axis(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_225sat_collison_overlap_on_axis = {"sat_collison_overlap_on_axis", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_225sat_collison_overlap_on_axis, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_225sat_collison_overlap_on_axis(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_shape *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_shape *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_axis = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sat_collison_overlap_on_axis (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_axis,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sat_collison_overlap_on_axis", 1, 3, 3, 1); __PYX_ERR(0, 3031, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_axis)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sat_collison_overlap_on_axis", 1, 3, 3, 2); __PYX_ERR(0, 3031, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sat_collison_overlap_on_axis") < 0)) __PYX_ERR(0, 3031, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_shape *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_shape *)values[1]);
    __pyx_v_axis = ((struct __pyx_obj_3cgl_vec2 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sat_collison_overlap_on_axis", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3031, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.sat_collison_overlap_on_axis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_shape, 1, "a", 0))) __PYX_ERR(0, 3031, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_shape, 1, "b", 0))) __PYX_ERR(0, 3031, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_axis), __pyx_ptype_3cgl_vec2, 1, "axis", 0))) __PYX_ERR(0, 3031, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_224sat_collison_overlap_on_axis(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_axis);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_224sat_collison_overlap_on_axis(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_shape *__pyx_v_b, struct __pyx_obj_3cgl_vec2 *__pyx_v_axis) {
  float __pyx_v_overlap_amount;
  bool __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sat_collison_overlap_on_axis", 0);

  /* "cgl_wrapper.pyx":3033
 * def sat_collison_overlap_on_axis(a: shape, b: shape, axis: vec2) -> (bool, float):
 *     cdef float overlap_amount
 *     result = CGL_sat_collision_overlap_on_axis(&a.c_shape, &b.c_shape, axis.c_vec2, &overlap_amount)             # <<<<<<<<<<<<<<
 *     return (result, overlap_amount)
 * 
 */
  __pyx_v_result = CGL_sat_collision_overlap_on_axis((&__pyx_v_a->c_shape), (&__pyx_v_b->c_shape), __pyx_v_axis->c_vec2, (&__pyx_v_overlap_amount));

  /* "cgl_wrapper.pyx":3034
 *     cdef float overlap_amount
 *     result = CGL_sat_collision_overlap_on_axis(&a.c_shape, &b.c_shape, axis.c_vec2, &overlap_amount)
 *     return (result, overlap_amount)             # <<<<<<<<<<<<<<
 * 
 * def  sat_collision_detect(a: shape, b: shape) -> tuple:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_overlap_amount); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3034, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3031
 *         return self.vertices_count
 * 
 * def sat_collison_overlap_on_axis(a: shape, b: shape, axis: vec2) -> (bool, float):             # <<<<<<<<<<<<<<
 *     cdef float overlap_amount
 *     result = CGL_sat_collision_overlap_on_axis(&a.c_shape, &b.c_shape, axis.c_vec2, &overlap_amount)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.sat_collison_overlap_on_axis", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3036
 *     return (result, overlap_amount)
 * 
 * def  sat_collision_detect(a: shape, b: shape) -> tuple:             # <<<<<<<<<<<<<<
 *     n_vector = vec2(0, 0)
 *     result = CGL_sat_collision_detect(&a.c_shape, &b.c_shape, &n_vector.c_vec2)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_227sat_collision_detect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_227sat_collision_detect = {"sat_collision_detect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_227sat_collision_detect, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_227sat_collision_detect(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_shape *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_shape *__pyx_v_b = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sat_collision_detect (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("sat_collision_detect", 1, 2, 2, 1); __PYX_ERR(0, 3036, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sat_collision_detect") < 0)) __PYX_ERR(0, 3036, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_shape *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_shape *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sat_collision_detect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3036, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.sat_collision_detect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_shape, 1, "a", 0))) __PYX_ERR(0, 3036, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_shape, 1, "b", 0))) __PYX_ERR(0, 3036, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_226sat_collision_detect(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_226sat_collision_detect(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_shape *__pyx_v_b) {
  struct __pyx_obj_3cgl_vec2 *__pyx_v_n_vector = NULL;
  bool __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sat_collision_detect", 0);

  /* "cgl_wrapper.pyx":3037
 * 
 * def  sat_collision_detect(a: shape, b: shape) -> tuple:
 *     n_vector = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     result = CGL_sat_collision_detect(&a.c_shape, &b.c_shape, &n_vector.c_vec2)
 *     return (result, n_vector)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_n_vector = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3038
 * def  sat_collision_detect(a: shape, b: shape) -> tuple:
 *     n_vector = vec2(0, 0)
 *     result = CGL_sat_collision_detect(&a.c_shape, &b.c_shape, &n_vector.c_vec2)             # <<<<<<<<<<<<<<
 *     return (result, n_vector)
 * 
 */
  __pyx_v_result = CGL_sat_collision_detect((&__pyx_v_a->c_shape), (&__pyx_v_b->c_shape), (&__pyx_v_n_vector->c_vec2));

  /* "cgl_wrapper.pyx":3039
 *     n_vector = vec2(0, 0)
 *     result = CGL_sat_collision_detect(&a.c_shape, &b.c_shape, &n_vector.c_vec2)
 *     return (result, n_vector)             # <<<<<<<<<<<<<<
 * 
 * def sat_collision_calculate_axes(a: shape, max_axes: int = 10000) -> list:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3039, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_n_vector));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_n_vector));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_n_vector));
  __pyx_t_1 = 0;
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3036
 *     return (result, overlap_amount)
 * 
 * def  sat_collision_detect(a: shape, b: shape) -> tuple:             # <<<<<<<<<<<<<<
 *     n_vector = vec2(0, 0)
 *     result = CGL_sat_collision_detect(&a.c_shape, &b.c_shape, &n_vector.c_vec2)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.sat_collision_detect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_n_vector);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3041
 *     return (result, n_vector)
 * 
 * def sat_collision_calculate_axes(a: shape, max_axes: int = 10000) -> list:             # <<<<<<<<<<<<<<
 *     cdef int axes_count
 *     cdef CGL_vec2* axes = <CGL_vec2*>stdlib.malloc(max_axes * sizeof(CGL_vec2))
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_229sat_collision_calculate_axes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_229sat_collision_calculate_axes = {"sat_collision_calculate_axes", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_229sat_collision_calculate_axes, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_229sat_collision_calculate_axes(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_shape *__pyx_v_a = 0;
  PyObject *__pyx_v_max_axes = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("sat_collision_calculate_axes (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_max_axes,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)__pyx_int_10000);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_axes);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sat_collision_calculate_axes") < 0)) __PYX_ERR(0, 3041, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_shape *)values[0]);
    __pyx_v_max_axes = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("sat_collision_calculate_axes", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3041, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.sat_collision_calculate_axes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_shape, 1, "a", 0))) __PYX_ERR(0, 3041, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_228sat_collision_calculate_axes(__pyx_self, __pyx_v_a, __pyx_v_max_axes);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_228sat_collision_calculate_axes(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, PyObject *__pyx_v_max_axes) {
  int __pyx_v_axes_count;
  struct CGL_vec2 *__pyx_v_axes;
  PyObject *__pyx_v_result = NULL;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  size_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("sat_collision_calculate_axes", 0);

  /* "cgl_wrapper.pyx":3043
 * def sat_collision_calculate_axes(a: shape, max_axes: int = 10000) -> list:
 *     cdef int axes_count
 *     cdef CGL_vec2* axes = <CGL_vec2*>stdlib.malloc(max_axes * sizeof(CGL_vec2))             # <<<<<<<<<<<<<<
 *     CGL_sat_collision_calculate_axes(&a.c_shape, axes, &axes_count)
 *     result = []
 */
  __pyx_t_1 = __Pyx_PyInt_FromSize_t((sizeof(struct CGL_vec2))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Multiply(__pyx_v_max_axes, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_t_2); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3043, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_axes = ((struct CGL_vec2 *)malloc(__pyx_t_3));

  /* "cgl_wrapper.pyx":3044
 *     cdef int axes_count
 *     cdef CGL_vec2* axes = <CGL_vec2*>stdlib.malloc(max_axes * sizeof(CGL_vec2))
 *     CGL_sat_collision_calculate_axes(&a.c_shape, axes, &axes_count)             # <<<<<<<<<<<<<<
 *     result = []
 *     for i in range(axes_count):
 */
  CGL_sat_collision_calculate_axes((&__pyx_v_a->c_shape), __pyx_v_axes, (&__pyx_v_axes_count));

  /* "cgl_wrapper.pyx":3045
 *     cdef CGL_vec2* axes = <CGL_vec2*>stdlib.malloc(max_axes * sizeof(CGL_vec2))
 *     CGL_sat_collision_calculate_axes(&a.c_shape, axes, &axes_count)
 *     result = []             # <<<<<<<<<<<<<<
 *     for i in range(axes_count):
 *         result.append(vec2(axes[i].x, axes[i].y))
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_result = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3046
 *     CGL_sat_collision_calculate_axes(&a.c_shape, axes, &axes_count)
 *     result = []
 *     for i in range(axes_count):             # <<<<<<<<<<<<<<
 *         result.append(vec2(axes[i].x, axes[i].y))
 *     stdlib.free(axes)
 */
  __pyx_t_4 = __pyx_v_axes_count;
  __pyx_t_5 = __pyx_t_4;
  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
    __pyx_v_i = __pyx_t_6;

    /* "cgl_wrapper.pyx":3047
 *     result = []
 *     for i in range(axes_count):
 *         result.append(vec2(axes[i].x, axes[i].y))             # <<<<<<<<<<<<<<
 *     stdlib.free(axes)
 *     return result
 */
    __pyx_t_2 = PyFloat_FromDouble((__pyx_v_axes[__pyx_v_i]).x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyFloat_FromDouble((__pyx_v_axes[__pyx_v_i]).y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1);
    __pyx_t_2 = 0;
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3047, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 3047, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "cgl_wrapper.pyx":3048
 *     for i in range(axes_count):
 *         result.append(vec2(axes[i].x, axes[i].y))
 *     stdlib.free(axes)             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  free(__pyx_v_axes);

  /* "cgl_wrapper.pyx":3049
 *         result.append(vec2(axes[i].x, axes[i].y))
 *     stdlib.free(axes)
 *     return result             # <<<<<<<<<<<<<<
 * 
 * def is_point_in_circle(point: vec2, circle_radius: float) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3041
 *     return (result, n_vector)
 * 
 * def sat_collision_calculate_axes(a: shape, max_axes: int = 10000) -> list:             # <<<<<<<<<<<<<<
 *     cdef int axes_count
 *     cdef CGL_vec2* axes = <CGL_vec2*>stdlib.malloc(max_axes * sizeof(CGL_vec2))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("cgl.sat_collision_calculate_axes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3051
 *     return result
 * 
 * def is_point_in_circle(point: vec2, circle_radius: float) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_point_in_circle(point.c_vec2, circle_radius)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_231is_point_in_circle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_231is_point_in_circle = {"is_point_in_circle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_231is_point_in_circle, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_231is_point_in_circle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec2 *__pyx_v_point = 0;
  double __pyx_v_circle_radius;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_point_in_circle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_point,&__pyx_n_s_circle_radius,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_point)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_circle_radius)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("is_point_in_circle", 1, 2, 2, 1); __PYX_ERR(0, 3051, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "is_point_in_circle") < 0)) __PYX_ERR(0, 3051, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_point = ((struct __pyx_obj_3cgl_vec2 *)values[0]);
    __pyx_v_circle_radius = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_circle_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3051, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_point_in_circle", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3051, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.is_point_in_circle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_point), __pyx_ptype_3cgl_vec2, 1, "point", 0))) __PYX_ERR(0, 3051, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_230is_point_in_circle(__pyx_self, __pyx_v_point, __pyx_v_circle_radius);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_230is_point_in_circle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_point, double __pyx_v_circle_radius) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_point_in_circle", 0);

  /* "cgl_wrapper.pyx":3052
 * 
 * def is_point_in_circle(point: vec2, circle_radius: float) -> bool:
 *     return CGL_utils_is_point_in_circle(point.c_vec2, circle_radius)             # <<<<<<<<<<<<<<
 * 
 * def is_point_in_triangle(point: vec2, a: vec2, b: vec2, c: vec2) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_utils_is_point_in_circle(__pyx_v_point->c_vec2, __pyx_v_circle_radius)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3051
 *     return result
 * 
 * def is_point_in_circle(point: vec2, circle_radius: float) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_point_in_circle(point.c_vec2, circle_radius)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.is_point_in_circle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3054
 *     return CGL_utils_is_point_in_circle(point.c_vec2, circle_radius)
 * 
 * def is_point_in_triangle(point: vec2, a: vec2, b: vec2, c: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_point_in_triangle(point.c_vec2, a.c_vec2, b.c_vec2, c.c_vec2)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_233is_point_in_triangle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_233is_point_in_triangle = {"is_point_in_triangle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_233is_point_in_triangle, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_233is_point_in_triangle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec2 *__pyx_v_point = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_c = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("is_point_in_triangle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_point,&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_point)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("is_point_in_triangle", 1, 4, 4, 1); __PYX_ERR(0, 3054, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("is_point_in_triangle", 1, 4, 4, 2); __PYX_ERR(0, 3054, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("is_point_in_triangle", 1, 4, 4, 3); __PYX_ERR(0, 3054, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "is_point_in_triangle") < 0)) __PYX_ERR(0, 3054, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_point = ((struct __pyx_obj_3cgl_vec2 *)values[0]);
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec2 *)values[2]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec2 *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("is_point_in_triangle", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3054, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.is_point_in_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_point), __pyx_ptype_3cgl_vec2, 1, "point", 0))) __PYX_ERR(0, 3054, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec2, 1, "a", 0))) __PYX_ERR(0, 3054, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec2, 1, "b", 0))) __PYX_ERR(0, 3054, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec2, 1, "c", 0))) __PYX_ERR(0, 3054, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_232is_point_in_triangle(__pyx_self, __pyx_v_point, __pyx_v_a, __pyx_v_b, __pyx_v_c);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_232is_point_in_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_point, struct __pyx_obj_3cgl_vec2 *__pyx_v_a, struct __pyx_obj_3cgl_vec2 *__pyx_v_b, struct __pyx_obj_3cgl_vec2 *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_point_in_triangle", 0);

  /* "cgl_wrapper.pyx":3055
 * 
 * def is_point_in_triangle(point: vec2, a: vec2, b: vec2, c: vec2) -> bool:
 *     return CGL_utils_is_point_in_triangle(point.c_vec2, a.c_vec2, b.c_vec2, c.c_vec2)             # <<<<<<<<<<<<<<
 * 
 * def calculate_circumcircle(a: vec2, b: vec2, c: vec2) -> tuple:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_utils_is_point_in_triangle(__pyx_v_point->c_vec2, __pyx_v_a->c_vec2, __pyx_v_b->c_vec2, __pyx_v_c->c_vec2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3054
 *     return CGL_utils_is_point_in_circle(point.c_vec2, circle_radius)
 * 
 * def is_point_in_triangle(point: vec2, a: vec2, b: vec2, c: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_point_in_triangle(point.c_vec2, a.c_vec2, b.c_vec2, c.c_vec2)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.is_point_in_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3057
 *     return CGL_utils_is_point_in_triangle(point.c_vec2, a.c_vec2, b.c_vec2, c.c_vec2)
 * 
 * def calculate_circumcircle(a: vec2, b: vec2, c: vec2) -> tuple:             # <<<<<<<<<<<<<<
 *     center = vec2(0, 0)
 *     cdef float f_radius = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_235calculate_circumcircle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_235calculate_circumcircle = {"calculate_circumcircle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_235calculate_circumcircle, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_235calculate_circumcircle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec2 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_c = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calculate_circumcircle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("calculate_circumcircle", 1, 3, 3, 1); __PYX_ERR(0, 3057, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("calculate_circumcircle", 1, 3, 3, 2); __PYX_ERR(0, 3057, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculate_circumcircle") < 0)) __PYX_ERR(0, 3057, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec2 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec2 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calculate_circumcircle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3057, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.calculate_circumcircle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec2, 1, "a", 0))) __PYX_ERR(0, 3057, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec2, 1, "b", 0))) __PYX_ERR(0, 3057, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec2, 1, "c", 0))) __PYX_ERR(0, 3057, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_234calculate_circumcircle(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_c);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_234calculate_circumcircle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_a, struct __pyx_obj_3cgl_vec2 *__pyx_v_b, struct __pyx_obj_3cgl_vec2 *__pyx_v_c) {
  struct __pyx_obj_3cgl_vec2 *__pyx_v_center = NULL;
  float __pyx_v_f_radius;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calculate_circumcircle", 0);

  /* "cgl_wrapper.pyx":3058
 * 
 * def calculate_circumcircle(a: vec2, b: vec2, c: vec2) -> tuple:
 *     center = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     cdef float f_radius = 0
 *     CGL_utils_calculate_circumcircle(a.c_vec2, b.c_vec2, c.c_vec2, &center.c_vec2, &f_radius)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_center = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3059
 * def calculate_circumcircle(a: vec2, b: vec2, c: vec2) -> tuple:
 *     center = vec2(0, 0)
 *     cdef float f_radius = 0             # <<<<<<<<<<<<<<
 *     CGL_utils_calculate_circumcircle(a.c_vec2, b.c_vec2, c.c_vec2, &center.c_vec2, &f_radius)
 *     return (center, f_radius)
 */
  __pyx_v_f_radius = 0.0;

  /* "cgl_wrapper.pyx":3060
 *     center = vec2(0, 0)
 *     cdef float f_radius = 0
 *     CGL_utils_calculate_circumcircle(a.c_vec2, b.c_vec2, c.c_vec2, &center.c_vec2, &f_radius)             # <<<<<<<<<<<<<<
 *     return (center, f_radius)
 * 
 */
  (void)(CGL_utils_calculate_circumcircle(__pyx_v_a->c_vec2, __pyx_v_b->c_vec2, __pyx_v_c->c_vec2, (&__pyx_v_center->c_vec2), (&__pyx_v_f_radius)));

  /* "cgl_wrapper.pyx":3061
 *     cdef float f_radius = 0
 *     CGL_utils_calculate_circumcircle(a.c_vec2, b.c_vec2, c.c_vec2, &center.c_vec2, &f_radius)
 *     return (center, f_radius)             # <<<<<<<<<<<<<<
 * 
 * def calculate_super_triangle(vertices: list, padding: float) -> tuple:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_f_radius); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_v_center));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_center));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_center));
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_r = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3057
 *     return CGL_utils_is_point_in_triangle(point.c_vec2, a.c_vec2, b.c_vec2, c.c_vec2)
 * 
 * def calculate_circumcircle(a: vec2, b: vec2, c: vec2) -> tuple:             # <<<<<<<<<<<<<<
 *     center = vec2(0, 0)
 *     cdef float f_radius = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("cgl.calculate_circumcircle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_center);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3063
 *     return (center, f_radius)
 * 
 * def calculate_super_triangle(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_237calculate_super_triangle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_237calculate_super_triangle = {"calculate_super_triangle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_237calculate_super_triangle, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_237calculate_super_triangle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertices = 0;
  double __pyx_v_padding;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calculate_super_triangle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vertices,&__pyx_n_s_padding,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertices)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_padding)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("calculate_super_triangle", 1, 2, 2, 1); __PYX_ERR(0, 3063, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculate_super_triangle") < 0)) __PYX_ERR(0, 3063, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vertices = ((PyObject*)values[0]);
    __pyx_v_padding = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_padding == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3063, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calculate_super_triangle", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3063, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.calculate_super_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vertices), (&PyList_Type), 1, "vertices", 1))) __PYX_ERR(0, 3063, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_236calculate_super_triangle(__pyx_self, __pyx_v_vertices, __pyx_v_padding);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_236calculate_super_triangle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vertices, double __pyx_v_padding) {
  struct CGL_vec2 *__pyx_v_c_vertices;
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_a = NULL;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_b = NULL;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_c = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  CGL_float __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calculate_super_triangle", 0);

  /* "cgl_wrapper.pyx":3064
 * 
 * def calculate_super_triangle(vertices: list, padding: float) -> tuple:
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))             # <<<<<<<<<<<<<<
 *     for i in range(len(vertices)):
 *         c_vertices[i].x = vertices[i].x
 */
  if (unlikely(__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3064, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_vertices); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3064, __pyx_L1_error)
  __pyx_v_c_vertices = ((struct CGL_vec2 *)malloc((__pyx_t_1 * (sizeof(struct CGL_vec2)))));

  /* "cgl_wrapper.pyx":3065
 * def calculate_super_triangle(vertices: list, padding: float) -> tuple:
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):             # <<<<<<<<<<<<<<
 *         c_vertices[i].x = vertices[i].x
 *         c_vertices[i].y = vertices[i].y
 */
  if (unlikely(__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3065, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_vertices); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3065, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "cgl_wrapper.pyx":3066
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 *         c_vertices[i].x = vertices[i].x             # <<<<<<<<<<<<<<
 *         c_vertices[i].y = vertices[i].y
 *     r_a = vec2(0, 0)
 */
    if (unlikely(__pyx_v_vertices == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3066, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vertices, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_6 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3066, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    (__pyx_v_c_vertices[__pyx_v_i]).x = __pyx_t_6;

    /* "cgl_wrapper.pyx":3067
 *     for i in range(len(vertices)):
 *         c_vertices[i].x = vertices[i].x
 *         c_vertices[i].y = vertices[i].y             # <<<<<<<<<<<<<<
 *     r_a = vec2(0, 0)
 *     r_b = vec2(0, 0)
 */
    if (unlikely(__pyx_v_vertices == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3067, __pyx_L1_error)
    }
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vertices, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3067, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_6 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3067, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_c_vertices[__pyx_v_i]).y = __pyx_t_6;
  }

  /* "cgl_wrapper.pyx":3068
 *         c_vertices[i].x = vertices[i].x
 *         c_vertices[i].y = vertices[i].y
 *     r_a = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     r_b = vec2(0, 0)
 *     r_c = vec2(0, 0)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_a = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3069
 *         c_vertices[i].y = vertices[i].y
 *     r_a = vec2(0, 0)
 *     r_b = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     r_c = vec2(0, 0)
 *     CGL_utils_calculate_super_triangle(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, padding)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_b = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3070
 *     r_a = vec2(0, 0)
 *     r_b = vec2(0, 0)
 *     r_c = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     CGL_utils_calculate_super_triangle(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, padding)
 *     stdlib.free(c_vertices)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3070, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_c = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3071
 *     r_b = vec2(0, 0)
 *     r_c = vec2(0, 0)
 *     CGL_utils_calculate_super_triangle(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, padding)             # <<<<<<<<<<<<<<
 *     stdlib.free(c_vertices)
 *     return (r_a, r_b, r_c)
 */
  if (unlikely(__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3071, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_vertices); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3071, __pyx_L1_error)
  (void)(CGL_utils_calculate_super_triangle(__pyx_v_c_vertices, __pyx_t_1, (&__pyx_v_r_a->c_vec2), (&__pyx_v_r_b->c_vec2), (&__pyx_v_r_c->c_vec2), __pyx_v_padding));

  /* "cgl_wrapper.pyx":3072
 *     r_c = vec2(0, 0)
 *     CGL_utils_calculate_super_triangle(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, padding)
 *     stdlib.free(c_vertices)             # <<<<<<<<<<<<<<
 *     return (r_a, r_b, r_c)
 * 
 */
  free(__pyx_v_c_vertices);

  /* "cgl_wrapper.pyx":3073
 *     CGL_utils_calculate_super_triangle(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, padding)
 *     stdlib.free(c_vertices)
 *     return (r_a, r_b, r_c)             # <<<<<<<<<<<<<<
 * 
 * def calculate_bounding_square(vertices: list, padding: float) -> tuple:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3073, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_r_a));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_a));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_r_a));
  __Pyx_INCREF(((PyObject *)__pyx_v_r_b));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_b));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_r_b));
  __Pyx_INCREF(((PyObject *)__pyx_v_r_c));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_c));
  PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_r_c));
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3063
 *     return (center, f_radius)
 * 
 * def calculate_super_triangle(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.calculate_super_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_r_a);
  __Pyx_XDECREF((PyObject *)__pyx_v_r_b);
  __Pyx_XDECREF((PyObject *)__pyx_v_r_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3075
 *     return (r_a, r_b, r_c)
 * 
 * def calculate_bounding_square(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_239calculate_bounding_square(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_239calculate_bounding_square = {"calculate_bounding_square", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_239calculate_bounding_square, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_239calculate_bounding_square(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertices = 0;
  double __pyx_v_padding;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calculate_bounding_square (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vertices,&__pyx_n_s_padding,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertices)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_padding)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("calculate_bounding_square", 1, 2, 2, 1); __PYX_ERR(0, 3075, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculate_bounding_square") < 0)) __PYX_ERR(0, 3075, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vertices = ((PyObject*)values[0]);
    __pyx_v_padding = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_padding == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3075, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calculate_bounding_square", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3075, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.calculate_bounding_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vertices), (&PyList_Type), 1, "vertices", 1))) __PYX_ERR(0, 3075, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_238calculate_bounding_square(__pyx_self, __pyx_v_vertices, __pyx_v_padding);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_238calculate_bounding_square(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vertices, double __pyx_v_padding) {
  struct CGL_vec2 *__pyx_v_c_vertices;
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_a = NULL;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_b = NULL;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_c = NULL;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  CGL_float __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calculate_bounding_square", 0);

  /* "cgl_wrapper.pyx":3076
 * 
 * def calculate_bounding_square(vertices: list, padding: float) -> tuple:
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))             # <<<<<<<<<<<<<<
 *     for i in range(len(vertices)):
 *         c_vertices[i].x = vertices[i].x
 */
  if (unlikely(__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3076, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_vertices); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3076, __pyx_L1_error)
  __pyx_v_c_vertices = ((struct CGL_vec2 *)malloc((__pyx_t_1 * (sizeof(struct CGL_vec2)))));

  /* "cgl_wrapper.pyx":3077
 * def calculate_bounding_square(vertices: list, padding: float) -> tuple:
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):             # <<<<<<<<<<<<<<
 *         c_vertices[i].x = vertices[i].x
 *         c_vertices[i].y = vertices[i].y
 */
  if (unlikely(__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3077, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_vertices); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3077, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "cgl_wrapper.pyx":3078
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 *         c_vertices[i].x = vertices[i].x             # <<<<<<<<<<<<<<
 *         c_vertices[i].y = vertices[i].y
 *     r_a = vec2(0, 0)
 */
    if (unlikely(__pyx_v_vertices == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3078, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vertices, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3078, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_6 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3078, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    (__pyx_v_c_vertices[__pyx_v_i]).x = __pyx_t_6;

    /* "cgl_wrapper.pyx":3079
 *     for i in range(len(vertices)):
 *         c_vertices[i].x = vertices[i].x
 *         c_vertices[i].y = vertices[i].y             # <<<<<<<<<<<<<<
 *     r_a = vec2(0, 0)
 *     r_b = vec2(0, 0)
 */
    if (unlikely(__pyx_v_vertices == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3079, __pyx_L1_error)
    }
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vertices, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3079, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_6 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3079, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_c_vertices[__pyx_v_i]).y = __pyx_t_6;
  }

  /* "cgl_wrapper.pyx":3080
 *         c_vertices[i].x = vertices[i].x
 *         c_vertices[i].y = vertices[i].y
 *     r_a = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     r_b = vec2(0, 0)
 *     r_c = vec2(0, 0)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_a = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3081
 *         c_vertices[i].y = vertices[i].y
 *     r_a = vec2(0, 0)
 *     r_b = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     r_c = vec2(0, 0)
 *     r_d = vec2(0, 0)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3081, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_b = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3082
 *     r_a = vec2(0, 0)
 *     r_b = vec2(0, 0)
 *     r_c = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     r_d = vec2(0, 0)
 *     CGL_utils_calculate_bounding_square(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, &r_d.c_vec2, padding)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_c = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3083
 *     r_b = vec2(0, 0)
 *     r_c = vec2(0, 0)
 *     r_d = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     CGL_utils_calculate_bounding_square(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, &r_d.c_vec2, padding)
 *     stdlib.free(c_vertices)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_d = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3084
 *     r_c = vec2(0, 0)
 *     r_d = vec2(0, 0)
 *     CGL_utils_calculate_bounding_square(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, &r_d.c_vec2, padding)             # <<<<<<<<<<<<<<
 *     stdlib.free(c_vertices)
 *     return (r_a, r_b, r_c, r_d)
 */
  if (unlikely(__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3084, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_vertices); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3084, __pyx_L1_error)
  (void)(CGL_utils_calculate_bounding_square(__pyx_v_c_vertices, __pyx_t_1, (&__pyx_v_r_a->c_vec2), (&__pyx_v_r_b->c_vec2), (&__pyx_v_r_c->c_vec2), (&__pyx_v_r_d->c_vec2), __pyx_v_padding));

  /* "cgl_wrapper.pyx":3085
 *     r_d = vec2(0, 0)
 *     CGL_utils_calculate_bounding_square(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, &r_d.c_vec2, padding)
 *     stdlib.free(c_vertices)             # <<<<<<<<<<<<<<
 *     return (r_a, r_b, r_c, r_d)
 * 
 */
  free(__pyx_v_c_vertices);

  /* "cgl_wrapper.pyx":3086
 *     CGL_utils_calculate_bounding_square(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, &r_d.c_vec2, padding)
 *     stdlib.free(c_vertices)
 *     return (r_a, r_b, r_c, r_d)             # <<<<<<<<<<<<<<
 * 
 * def calculate_bounding_box(vertices: list, padding: float) -> tuple:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3086, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_r_a));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_a));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_r_a));
  __Pyx_INCREF(((PyObject *)__pyx_v_r_b));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_b));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_r_b));
  __Pyx_INCREF(((PyObject *)__pyx_v_r_c));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_c));
  PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_r_c));
  __Pyx_INCREF(((PyObject *)__pyx_v_r_d));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_d));
  PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_v_r_d));
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3075
 *     return (r_a, r_b, r_c)
 * 
 * def calculate_bounding_square(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.calculate_bounding_square", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_r_a);
  __Pyx_XDECREF((PyObject *)__pyx_v_r_b);
  __Pyx_XDECREF((PyObject *)__pyx_v_r_c);
  __Pyx_XDECREF((PyObject *)__pyx_v_r_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3088
 *     return (r_a, r_b, r_c, r_d)
 * 
 * def calculate_bounding_box(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_241calculate_bounding_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_241calculate_bounding_box = {"calculate_bounding_box", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_241calculate_bounding_box, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_241calculate_bounding_box(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_vertices = 0;
  double __pyx_v_padding;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calculate_bounding_box (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_vertices,&__pyx_n_s_padding,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_vertices)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_padding)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("calculate_bounding_box", 1, 2, 2, 1); __PYX_ERR(0, 3088, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculate_bounding_box") < 0)) __PYX_ERR(0, 3088, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_vertices = ((PyObject*)values[0]);
    __pyx_v_padding = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_padding == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3088, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("calculate_bounding_box", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3088, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.calculate_bounding_box", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_vertices), (&PyList_Type), 1, "vertices", 1))) __PYX_ERR(0, 3088, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_240calculate_bounding_box(__pyx_self, __pyx_v_vertices, __pyx_v_padding);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_240calculate_bounding_box(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_vertices, double __pyx_v_padding) {
  struct CGL_vec2 *__pyx_v_c_vertices;
  Py_ssize_t __pyx_v_i;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_a = NULL;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_b = NULL;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_c = NULL;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_r_d = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  CGL_float __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("calculate_bounding_box", 0);

  /* "cgl_wrapper.pyx":3089
 * 
 * def calculate_bounding_box(vertices: list, padding: float) -> tuple:
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))             # <<<<<<<<<<<<<<
 *     for i in range(len(vertices)):
 *         c_vertices[i].x = vertices[i].x
 */
  if (unlikely(__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3089, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_vertices); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3089, __pyx_L1_error)
  __pyx_v_c_vertices = ((struct CGL_vec2 *)malloc((__pyx_t_1 * (sizeof(struct CGL_vec2)))));

  /* "cgl_wrapper.pyx":3090
 * def calculate_bounding_box(vertices: list, padding: float) -> tuple:
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):             # <<<<<<<<<<<<<<
 *         c_vertices[i].x = vertices[i].x
 *         c_vertices[i].y = vertices[i].y
 */
  if (unlikely(__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3090, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_vertices); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3090, __pyx_L1_error)
  __pyx_t_2 = __pyx_t_1;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "cgl_wrapper.pyx":3091
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 *         c_vertices[i].x = vertices[i].x             # <<<<<<<<<<<<<<
 *         c_vertices[i].y = vertices[i].y
 *     r_a = vec2(0, 0)
 */
    if (unlikely(__pyx_v_vertices == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3091, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_vertices, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3091, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_6 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3091, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    (__pyx_v_c_vertices[__pyx_v_i]).x = __pyx_t_6;

    /* "cgl_wrapper.pyx":3092
 *     for i in range(len(vertices)):
 *         c_vertices[i].x = vertices[i].x
 *         c_vertices[i].y = vertices[i].y             # <<<<<<<<<<<<<<
 *     r_a = vec2(0, 0)
 *     r_b = vec2(0, 0)
 */
    if (unlikely(__pyx_v_vertices == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3092, __pyx_L1_error)
    }
    __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_vertices, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3092, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_4); if (unlikely((__pyx_t_6 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3092, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    (__pyx_v_c_vertices[__pyx_v_i]).y = __pyx_t_6;
  }

  /* "cgl_wrapper.pyx":3093
 *         c_vertices[i].x = vertices[i].x
 *         c_vertices[i].y = vertices[i].y
 *     r_a = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     r_b = vec2(0, 0)
 *     r_c = vec2(0, 0)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3093, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_a = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3094
 *         c_vertices[i].y = vertices[i].y
 *     r_a = vec2(0, 0)
 *     r_b = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     r_c = vec2(0, 0)
 *     r_d = vec2(0, 0)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_b = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3095
 *     r_a = vec2(0, 0)
 *     r_b = vec2(0, 0)
 *     r_c = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     r_d = vec2(0, 0)
 *     CGL_utils_calculate_bounding_box(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, &r_d.c_vec2, padding)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3095, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_c = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3096
 *     r_b = vec2(0, 0)
 *     r_c = vec2(0, 0)
 *     r_d = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     CGL_utils_calculate_bounding_box(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, &r_d.c_vec2, padding)
 *     stdlib.free(c_vertices)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_tuple__73, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3096, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_v_r_d = ((struct __pyx_obj_3cgl_vec2 *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3097
 *     r_c = vec2(0, 0)
 *     r_d = vec2(0, 0)
 *     CGL_utils_calculate_bounding_box(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, &r_d.c_vec2, padding)             # <<<<<<<<<<<<<<
 *     stdlib.free(c_vertices)
 *     return (r_a, r_b, r_c, r_d)
 */
  if (unlikely(__pyx_v_vertices == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3097, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_vertices); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3097, __pyx_L1_error)
  (void)(CGL_utils_calculate_bounding_box(__pyx_v_c_vertices, __pyx_t_1, (&__pyx_v_r_a->c_vec2), (&__pyx_v_r_b->c_vec2), (&__pyx_v_r_c->c_vec2), (&__pyx_v_r_d->c_vec2), __pyx_v_padding));

  /* "cgl_wrapper.pyx":3098
 *     r_d = vec2(0, 0)
 *     CGL_utils_calculate_bounding_box(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, &r_d.c_vec2, padding)
 *     stdlib.free(c_vertices)             # <<<<<<<<<<<<<<
 *     return (r_a, r_b, r_c, r_d)
 * 
 */
  free(__pyx_v_c_vertices);

  /* "cgl_wrapper.pyx":3099
 *     CGL_utils_calculate_bounding_box(c_vertices, len(vertices), &r_a.c_vec2, &r_b.c_vec2, &r_c.c_vec2, &r_d.c_vec2, padding)
 *     stdlib.free(c_vertices)
 *     return (r_a, r_b, r_c, r_d)             # <<<<<<<<<<<<<<
 * 
 * def random_gaussian(mean: float, std_dev: float) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(((PyObject *)__pyx_v_r_a));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_a));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_r_a));
  __Pyx_INCREF(((PyObject *)__pyx_v_r_b));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_b));
  PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)__pyx_v_r_b));
  __Pyx_INCREF(((PyObject *)__pyx_v_r_c));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_c));
  PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)__pyx_v_r_c));
  __Pyx_INCREF(((PyObject *)__pyx_v_r_d));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_r_d));
  PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)__pyx_v_r_d));
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3088
 *     return (r_a, r_b, r_c, r_d)
 * 
 * def calculate_bounding_box(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.calculate_bounding_box", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_r_a);
  __Pyx_XDECREF((PyObject *)__pyx_v_r_b);
  __Pyx_XDECREF((PyObject *)__pyx_v_r_c);
  __Pyx_XDECREF((PyObject *)__pyx_v_r_d);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3101
 *     return (r_a, r_b, r_c, r_d)
 * 
 * def random_gaussian(mean: float, std_dev: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_utils_random_gaussian(mean, std_dev)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_243random_gaussian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_243random_gaussian = {"random_gaussian", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_243random_gaussian, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_243random_gaussian(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_mean;
  double __pyx_v_std_dev;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("random_gaussian (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mean,&__pyx_n_s_std_dev,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mean)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_std_dev)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("random_gaussian", 1, 2, 2, 1); __PYX_ERR(0, 3101, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "random_gaussian") < 0)) __PYX_ERR(0, 3101, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_mean = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_mean == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3101, __pyx_L3_error)
    __pyx_v_std_dev = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_std_dev == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3101, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("random_gaussian", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3101, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.random_gaussian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_242random_gaussian(__pyx_self, __pyx_v_mean, __pyx_v_std_dev);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_242random_gaussian(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_mean, double __pyx_v_std_dev) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("random_gaussian", 0);

  /* "cgl_wrapper.pyx":3102
 * 
 * def random_gaussian(mean: float, std_dev: float) -> float:
 *     return CGL_utils_random_gaussian(mean, std_dev)             # <<<<<<<<<<<<<<
 * 
 * def gjk_shape_default_support(a: shape, d: vec3) -> vec3:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_utils_random_gaussian(__pyx_v_mean, __pyx_v_std_dev)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3101
 *     return (r_a, r_b, r_c, r_d)
 * 
 * def random_gaussian(mean: float, std_dev: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_utils_random_gaussian(mean, std_dev)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.random_gaussian", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3104
 *     return CGL_utils_random_gaussian(mean, std_dev)
 * 
 * def gjk_shape_default_support(a: shape, d: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     return CGL_gjk_shape_default_support(&a.c_shape, d.c_vec3)
 * 
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_245gjk_shape_default_support(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_245gjk_shape_default_support = {"gjk_shape_default_support", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_245gjk_shape_default_support, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_245gjk_shape_default_support(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_shape *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_d = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gjk_shape_default_support (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_d,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("gjk_shape_default_support", 1, 2, 2, 1); __PYX_ERR(0, 3104, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gjk_shape_default_support") < 0)) __PYX_ERR(0, 3104, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_shape *)values[0]);
    __pyx_v_d = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gjk_shape_default_support", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3104, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.gjk_shape_default_support", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_shape, 1, "a", 0))) __PYX_ERR(0, 3104, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_d), __pyx_ptype_3cgl_vec3, 1, "d", 0))) __PYX_ERR(0, 3104, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_244gjk_shape_default_support(__pyx_self, __pyx_v_a, __pyx_v_d);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_244gjk_shape_default_support(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_d) {
  struct __pyx_obj_3cgl_vec3 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gjk_shape_default_support", 0);

  /* "cgl_wrapper.pyx":3105
 * 
 * def gjk_shape_default_support(a: shape, d: vec3) -> vec3:
 *     return CGL_gjk_shape_default_support(&a.c_shape, d.c_vec3)             # <<<<<<<<<<<<<<
 * 
 * def gjk_default_support(a: shape, b: shape, d: vec3) -> vec3:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_vec3(CGL_gjk_shape_default_support((&__pyx_v_a->c_shape), __pyx_v_d->c_vec3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3105, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3cgl_vec3)))) __PYX_ERR(0, 3105, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_3cgl_vec3 *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3104
 *     return CGL_utils_random_gaussian(mean, std_dev)
 * 
 * def gjk_shape_default_support(a: shape, d: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     return CGL_gjk_shape_default_support(&a.c_shape, d.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.gjk_shape_default_support", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3107
 *     return CGL_gjk_shape_default_support(&a.c_shape, d.c_vec3)
 * 
 * def gjk_default_support(a: shape, b: shape, d: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     return CGL_gjk_default_support(&a.c_shape, &b.c_shape, d.c_vec3)
 * 
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_247gjk_default_support(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_247gjk_default_support = {"gjk_default_support", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_247gjk_default_support, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_247gjk_default_support(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_shape *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_shape *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_d = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gjk_default_support (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_d,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("gjk_default_support", 1, 3, 3, 1); __PYX_ERR(0, 3107, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("gjk_default_support", 1, 3, 3, 2); __PYX_ERR(0, 3107, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gjk_default_support") < 0)) __PYX_ERR(0, 3107, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_shape *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_shape *)values[1]);
    __pyx_v_d = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gjk_default_support", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3107, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.gjk_default_support", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_shape, 1, "a", 0))) __PYX_ERR(0, 3107, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_shape, 1, "b", 0))) __PYX_ERR(0, 3107, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_d), __pyx_ptype_3cgl_vec3, 1, "d", 0))) __PYX_ERR(0, 3107, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_246gjk_default_support(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_d);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_246gjk_default_support(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_shape *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_d) {
  struct __pyx_obj_3cgl_vec3 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gjk_default_support", 0);

  /* "cgl_wrapper.pyx":3108
 * 
 * def gjk_default_support(a: shape, b: shape, d: vec3) -> vec3:
 *     return CGL_gjk_default_support(&a.c_shape, &b.c_shape, d.c_vec3)             # <<<<<<<<<<<<<<
 * 
 * def gjk_check_collision_2d(a: shape, b: shape) -> tuple:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_1 = __pyx_convert__to_py_struct__CGL_vec3(CGL_gjk_default_support((&__pyx_v_a->c_shape), (&__pyx_v_b->c_shape), __pyx_v_d->c_vec3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3108, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (!(likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_3cgl_vec3)))) __PYX_ERR(0, 3108, __pyx_L1_error)
  __pyx_r = ((struct __pyx_obj_3cgl_vec3 *)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3107
 *     return CGL_gjk_shape_default_support(&a.c_shape, d.c_vec3)
 * 
 * def gjk_default_support(a: shape, b: shape, d: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     return CGL_gjk_default_support(&a.c_shape, &b.c_shape, d.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.gjk_default_support", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3110
 *     return CGL_gjk_default_support(&a.c_shape, &b.c_shape, d.c_vec3)
 * 
 * def gjk_check_collision_2d(a: shape, b: shape) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3* simplex_out_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     result = CGL_gjk_check_collision_2d(&a.c_shape, &b.c_shape, simplex_out_ptr)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_249gjk_check_collision_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_249gjk_check_collision_2d = {"gjk_check_collision_2d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_249gjk_check_collision_2d, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_249gjk_check_collision_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_shape *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_shape *__pyx_v_b = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gjk_check_collision_2d (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("gjk_check_collision_2d", 1, 2, 2, 1); __PYX_ERR(0, 3110, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gjk_check_collision_2d") < 0)) __PYX_ERR(0, 3110, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_shape *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_shape *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gjk_check_collision_2d", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3110, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.gjk_check_collision_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_shape, 1, "a", 0))) __PYX_ERR(0, 3110, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_shape, 1, "b", 0))) __PYX_ERR(0, 3110, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_248gjk_check_collision_2d(__pyx_self, __pyx_v_a, __pyx_v_b);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_248gjk_check_collision_2d(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_shape *__pyx_v_b) {
  struct CGL_vec3 *__pyx_v_simplex_out_ptr;
  CGL_bool __pyx_v_result;
  PyObject *__pyx_v_simplex_out = NULL;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gjk_check_collision_2d", 0);

  /* "cgl_wrapper.pyx":3111
 * 
 * def gjk_check_collision_2d(a: shape, b: shape) -> tuple:
 *     cdef CGL_vec3* simplex_out_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)             # <<<<<<<<<<<<<<
 *     result = CGL_gjk_check_collision_2d(&a.c_shape, &b.c_shape, simplex_out_ptr)
 *     simplex_out = []
 */
  __pyx_v_simplex_out_ptr = ((struct CGL_vec3 *)malloc(((sizeof(struct CGL_vec3)) * 3)));

  /* "cgl_wrapper.pyx":3112
 * def gjk_check_collision_2d(a: shape, b: shape) -> tuple:
 *     cdef CGL_vec3* simplex_out_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     result = CGL_gjk_check_collision_2d(&a.c_shape, &b.c_shape, simplex_out_ptr)             # <<<<<<<<<<<<<<
 *     simplex_out = []
 *     for i in range(3):
 */
  __pyx_v_result = CGL_gjk_check_collision_2d((&__pyx_v_a->c_shape), (&__pyx_v_b->c_shape), __pyx_v_simplex_out_ptr);

  /* "cgl_wrapper.pyx":3113
 *     cdef CGL_vec3* simplex_out_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     result = CGL_gjk_check_collision_2d(&a.c_shape, &b.c_shape, simplex_out_ptr)
 *     simplex_out = []             # <<<<<<<<<<<<<<
 *     for i in range(3):
 *         simplex_out.append(vec3(simplex_out_ptr[i].x, simplex_out_ptr[i].y, simplex_out_ptr[i].z))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_simplex_out = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3114
 *     result = CGL_gjk_check_collision_2d(&a.c_shape, &b.c_shape, simplex_out_ptr)
 *     simplex_out = []
 *     for i in range(3):             # <<<<<<<<<<<<<<
 *         simplex_out.append(vec3(simplex_out_ptr[i].x, simplex_out_ptr[i].y, simplex_out_ptr[i].z))
 *     stdlib.free(simplex_out_ptr)
 */
  for (__pyx_t_2 = 0; __pyx_t_2 < 3; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "cgl_wrapper.pyx":3115
 *     simplex_out = []
 *     for i in range(3):
 *         simplex_out.append(vec3(simplex_out_ptr[i].x, simplex_out_ptr[i].y, simplex_out_ptr[i].z))             # <<<<<<<<<<<<<<
 *     stdlib.free(simplex_out_ptr)
 *     return (result, simplex_out)
 */
    __pyx_t_1 = PyFloat_FromDouble((__pyx_v_simplex_out_ptr[__pyx_v_i]).x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyFloat_FromDouble((__pyx_v_simplex_out_ptr[__pyx_v_i]).y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = PyFloat_FromDouble((__pyx_v_simplex_out_ptr[__pyx_v_i]).z); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4);
    __pyx_t_1 = 0;
    __pyx_t_3 = 0;
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_simplex_out, __pyx_t_4); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 3115, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }

  /* "cgl_wrapper.pyx":3116
 *     for i in range(3):
 *         simplex_out.append(vec3(simplex_out_ptr[i].x, simplex_out_ptr[i].y, simplex_out_ptr[i].z))
 *     stdlib.free(simplex_out_ptr)             # <<<<<<<<<<<<<<
 *     return (result, simplex_out)
 * 
 */
  free(__pyx_v_simplex_out_ptr);

  /* "cgl_wrapper.pyx":3117
 *         simplex_out.append(vec3(simplex_out_ptr[i].x, simplex_out_ptr[i].y, simplex_out_ptr[i].z))
 *     stdlib.free(simplex_out_ptr)
 *     return (result, simplex_out)             # <<<<<<<<<<<<<<
 * 
 * def gjk_epa_2d(a: shape, b: shape, simplex: list) ->  vec3:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
  __Pyx_INCREF(__pyx_v_simplex_out);
  __Pyx_GIVEREF(__pyx_v_simplex_out);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_simplex_out);
  __pyx_t_4 = 0;
  __pyx_r = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3110
 *     return CGL_gjk_default_support(&a.c_shape, &b.c_shape, d.c_vec3)
 * 
 * def gjk_check_collision_2d(a: shape, b: shape) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3* simplex_out_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     result = CGL_gjk_check_collision_2d(&a.c_shape, &b.c_shape, simplex_out_ptr)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.gjk_check_collision_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_simplex_out);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3119
 *     return (result, simplex_out)
 * 
 * def gjk_epa_2d(a: shape, b: shape, simplex: list) ->  vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3* simplex_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     for i in range(3):
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_251gjk_epa_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_251gjk_epa_2d = {"gjk_epa_2d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_251gjk_epa_2d, METH_VARARGS|METH_KEYWORDS, 0};
static struct __pyx_obj_3cgl_vec3 *__pyx_pw_3cgl_251gjk_epa_2d(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_shape *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_shape *__pyx_v_b = 0;
  PyObject *__pyx_v_simplex = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("gjk_epa_2d (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_simplex,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("gjk_epa_2d", 1, 3, 3, 1); __PYX_ERR(0, 3119, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_simplex)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("gjk_epa_2d", 1, 3, 3, 2); __PYX_ERR(0, 3119, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "gjk_epa_2d") < 0)) __PYX_ERR(0, 3119, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_shape *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_shape *)values[1]);
    __pyx_v_simplex = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("gjk_epa_2d", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3119, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.gjk_epa_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_shape, 1, "a", 0))) __PYX_ERR(0, 3119, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_shape, 1, "b", 0))) __PYX_ERR(0, 3119, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_simplex), (&PyList_Type), 1, "simplex", 1))) __PYX_ERR(0, 3119, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_250gjk_epa_2d(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_simplex);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_vec3 *__pyx_pf_3cgl_250gjk_epa_2d(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_shape *__pyx_v_a, struct __pyx_obj_3cgl_shape *__pyx_v_b, PyObject *__pyx_v_simplex) {
  struct CGL_vec3 *__pyx_v_simplex_ptr;
  long __pyx_v_i;
  struct CGL_vec3 __pyx_v_result;
  struct __pyx_obj_3cgl_vec3 *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  long __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  CGL_float __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("gjk_epa_2d", 0);

  /* "cgl_wrapper.pyx":3120
 * 
 * def gjk_epa_2d(a: shape, b: shape, simplex: list) ->  vec3:
 *     cdef CGL_vec3* simplex_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)             # <<<<<<<<<<<<<<
 *     for i in range(3):
 *         simplex_ptr[i].x = simplex[i].x
 */
  __pyx_v_simplex_ptr = ((struct CGL_vec3 *)malloc(((sizeof(struct CGL_vec3)) * 3)));

  /* "cgl_wrapper.pyx":3121
 * def gjk_epa_2d(a: shape, b: shape, simplex: list) ->  vec3:
 *     cdef CGL_vec3* simplex_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     for i in range(3):             # <<<<<<<<<<<<<<
 *         simplex_ptr[i].x = simplex[i].x
 *         simplex_ptr[i].y = simplex[i].y
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "cgl_wrapper.pyx":3122
 *     cdef CGL_vec3* simplex_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     for i in range(3):
 *         simplex_ptr[i].x = simplex[i].x             # <<<<<<<<<<<<<<
 *         simplex_ptr[i].y = simplex[i].y
 *         simplex_ptr[i].z = simplex[i].z
 */
    if (unlikely(__pyx_v_simplex == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3122, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_simplex, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3122, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3122, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_simplex_ptr[__pyx_v_i]).x = __pyx_t_4;

    /* "cgl_wrapper.pyx":3123
 *     for i in range(3):
 *         simplex_ptr[i].x = simplex[i].x
 *         simplex_ptr[i].y = simplex[i].y             # <<<<<<<<<<<<<<
 *         simplex_ptr[i].z = simplex[i].z
 *     result = CGL_gjk_epa_2d(&a.c_shape, &b.c_shape, simplex_ptr)
 */
    if (unlikely(__pyx_v_simplex == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3123, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_simplex, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_2); if (unlikely((__pyx_t_4 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3123, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    (__pyx_v_simplex_ptr[__pyx_v_i]).y = __pyx_t_4;

    /* "cgl_wrapper.pyx":3124
 *         simplex_ptr[i].x = simplex[i].x
 *         simplex_ptr[i].y = simplex[i].y
 *         simplex_ptr[i].z = simplex[i].z             # <<<<<<<<<<<<<<
 *     result = CGL_gjk_epa_2d(&a.c_shape, &b.c_shape, simplex_ptr)
 *     stdlib.free(simplex_ptr)
 */
    if (unlikely(__pyx_v_simplex == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3124, __pyx_L1_error)
    }
    __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_simplex, __pyx_v_i, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_z); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3124, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_4 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3124, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    (__pyx_v_simplex_ptr[__pyx_v_i]).z = __pyx_t_4;
  }

  /* "cgl_wrapper.pyx":3125
 *         simplex_ptr[i].y = simplex[i].y
 *         simplex_ptr[i].z = simplex[i].z
 *     result = CGL_gjk_epa_2d(&a.c_shape, &b.c_shape, simplex_ptr)             # <<<<<<<<<<<<<<
 *     stdlib.free(simplex_ptr)
 *     return vec3(result.x, result.y, result.z)
 */
  __pyx_v_result = CGL_gjk_epa_2d((&__pyx_v_a->c_shape), (&__pyx_v_b->c_shape), __pyx_v_simplex_ptr);

  /* "cgl_wrapper.pyx":3126
 *         simplex_ptr[i].z = simplex[i].z
 *     result = CGL_gjk_epa_2d(&a.c_shape, &b.c_shape, simplex_ptr)
 *     stdlib.free(simplex_ptr)             # <<<<<<<<<<<<<<
 *     return vec3(result.x, result.y, result.z)
 * 
 */
  free(__pyx_v_simplex_ptr);

  /* "cgl_wrapper.pyx":3127
 *     result = CGL_gjk_epa_2d(&a.c_shape, &b.c_shape, simplex_ptr)
 *     stdlib.free(simplex_ptr)
 *     return vec3(result.x, result.y, result.z)             # <<<<<<<<<<<<<<
 * 
 * def aabb_contains_point(aabb_min: vec2, aabb_max: vec2, point: vec2) -> bool:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_result.x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_result.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_result.z); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec3), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_r = ((struct __pyx_obj_3cgl_vec3 *)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3119
 *     return (result, simplex_out)
 * 
 * def gjk_epa_2d(a: shape, b: shape, simplex: list) ->  vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3* simplex_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     for i in range(3):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.gjk_epa_2d", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3129
 *     return vec3(result.x, result.y, result.z)
 * 
 * def aabb_contains_point(aabb_min: vec2, aabb_max: vec2, point: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_aabb_contains_point(aabb_min.c_vec2, aabb_max.c_vec2, point.c_vec2)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_253aabb_contains_point(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_253aabb_contains_point = {"aabb_contains_point", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_253aabb_contains_point, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_253aabb_contains_point(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_min = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_max = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_point = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("aabb_contains_point (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_aabb_min,&__pyx_n_s_aabb_max,&__pyx_n_s_point,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aabb_min)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aabb_max)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("aabb_contains_point", 1, 3, 3, 1); __PYX_ERR(0, 3129, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_point)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("aabb_contains_point", 1, 3, 3, 2); __PYX_ERR(0, 3129, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "aabb_contains_point") < 0)) __PYX_ERR(0, 3129, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_aabb_min = ((struct __pyx_obj_3cgl_vec2 *)values[0]);
    __pyx_v_aabb_max = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
    __pyx_v_point = ((struct __pyx_obj_3cgl_vec2 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("aabb_contains_point", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3129, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.aabb_contains_point", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aabb_min), __pyx_ptype_3cgl_vec2, 1, "aabb_min", 0))) __PYX_ERR(0, 3129, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aabb_max), __pyx_ptype_3cgl_vec2, 1, "aabb_max", 0))) __PYX_ERR(0, 3129, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_point), __pyx_ptype_3cgl_vec2, 1, "point", 0))) __PYX_ERR(0, 3129, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_252aabb_contains_point(__pyx_self, __pyx_v_aabb_min, __pyx_v_aabb_max, __pyx_v_point);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_252aabb_contains_point(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_min, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_max, struct __pyx_obj_3cgl_vec2 *__pyx_v_point) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("aabb_contains_point", 0);

  /* "cgl_wrapper.pyx":3130
 * 
 * def aabb_contains_point(aabb_min: vec2, aabb_max: vec2, point: vec2) -> bool:
 *     return CGL_aabb_contains_point(aabb_min.c_vec2, aabb_max.c_vec2, point.c_vec2)             # <<<<<<<<<<<<<<
 * 
 * def aabb_intersects_aabb(aabb_min_a: vec2, aabb_max_a: vec2, aabb_min_b: vec2, aabb_max_b: vec2) -> bool:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_aabb_contains_point(__pyx_v_aabb_min->c_vec2, __pyx_v_aabb_max->c_vec2, __pyx_v_point->c_vec2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3129
 *     return vec3(result.x, result.y, result.z)
 * 
 * def aabb_contains_point(aabb_min: vec2, aabb_max: vec2, point: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_aabb_contains_point(aabb_min.c_vec2, aabb_max.c_vec2, point.c_vec2)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.aabb_contains_point", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3132
 *     return CGL_aabb_contains_point(aabb_min.c_vec2, aabb_max.c_vec2, point.c_vec2)
 * 
 * def aabb_intersects_aabb(aabb_min_a: vec2, aabb_max_a: vec2, aabb_min_b: vec2, aabb_max_b: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_aabb_intersects_aabb(aabb_min_a.c_vec2, aabb_max_a.c_vec2, aabb_min_b.c_vec2, aabb_max_b.c_vec2)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_255aabb_intersects_aabb(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_255aabb_intersects_aabb = {"aabb_intersects_aabb", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_255aabb_intersects_aabb, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_255aabb_intersects_aabb(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_min_a = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_max_a = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_min_b = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_max_b = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("aabb_intersects_aabb (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_aabb_min_a,&__pyx_n_s_aabb_max_a,&__pyx_n_s_aabb_min_b,&__pyx_n_s_aabb_max_b,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aabb_min_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aabb_max_a)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("aabb_intersects_aabb", 1, 4, 4, 1); __PYX_ERR(0, 3132, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aabb_min_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("aabb_intersects_aabb", 1, 4, 4, 2); __PYX_ERR(0, 3132, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_aabb_max_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("aabb_intersects_aabb", 1, 4, 4, 3); __PYX_ERR(0, 3132, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "aabb_intersects_aabb") < 0)) __PYX_ERR(0, 3132, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_aabb_min_a = ((struct __pyx_obj_3cgl_vec2 *)values[0]);
    __pyx_v_aabb_max_a = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
    __pyx_v_aabb_min_b = ((struct __pyx_obj_3cgl_vec2 *)values[2]);
    __pyx_v_aabb_max_b = ((struct __pyx_obj_3cgl_vec2 *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("aabb_intersects_aabb", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3132, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.aabb_intersects_aabb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aabb_min_a), __pyx_ptype_3cgl_vec2, 1, "aabb_min_a", 0))) __PYX_ERR(0, 3132, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aabb_max_a), __pyx_ptype_3cgl_vec2, 1, "aabb_max_a", 0))) __PYX_ERR(0, 3132, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aabb_min_b), __pyx_ptype_3cgl_vec2, 1, "aabb_min_b", 0))) __PYX_ERR(0, 3132, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_aabb_max_b), __pyx_ptype_3cgl_vec2, 1, "aabb_max_b", 0))) __PYX_ERR(0, 3132, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_254aabb_intersects_aabb(__pyx_self, __pyx_v_aabb_min_a, __pyx_v_aabb_max_a, __pyx_v_aabb_min_b, __pyx_v_aabb_max_b);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_254aabb_intersects_aabb(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_min_a, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_max_a, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_min_b, struct __pyx_obj_3cgl_vec2 *__pyx_v_aabb_max_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("aabb_intersects_aabb", 0);

  /* "cgl_wrapper.pyx":3133
 * 
 * def aabb_intersects_aabb(aabb_min_a: vec2, aabb_max_a: vec2, aabb_min_b: vec2, aabb_max_b: vec2) -> bool:
 *     return CGL_aabb_intersects_aabb(aabb_min_a.c_vec2, aabb_max_a.c_vec2, aabb_min_b.c_vec2, aabb_max_b.c_vec2)             # <<<<<<<<<<<<<<
 * 
 * def triangulate_points_incremental(points: list) -> list:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_aabb_intersects_aabb(__pyx_v_aabb_min_a->c_vec2, __pyx_v_aabb_max_a->c_vec2, __pyx_v_aabb_min_b->c_vec2, __pyx_v_aabb_max_b->c_vec2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3132
 *     return CGL_aabb_contains_point(aabb_min.c_vec2, aabb_max.c_vec2, point.c_vec2)
 * 
 * def aabb_intersects_aabb(aabb_min_a: vec2, aabb_max_a: vec2, aabb_min_b: vec2, aabb_max_b: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_aabb_intersects_aabb(aabb_min_a.c_vec2, aabb_max_a.c_vec2, aabb_min_b.c_vec2, aabb_max_b.c_vec2)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.aabb_intersects_aabb", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3135
 *     return CGL_aabb_intersects_aabb(aabb_min_a.c_vec2, aabb_max_a.c_vec2, aabb_min_b.c_vec2, aabb_max_b.c_vec2)
 * 
 * def triangulate_points_incremental(points: list) -> list:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_points = <CGL_vec2*>stdlib.malloc(len(points) * sizeof(CGL_vec2))
 *     for i in range(len(points)):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_257triangulate_points_incremental(PyObject *__pyx_self, PyObject *__pyx_v_points); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_257triangulate_points_incremental = {"triangulate_points_incremental", (PyCFunction)__pyx_pw_3cgl_257triangulate_points_incremental, METH_O, 0};
static PyObject *__pyx_pw_3cgl_257triangulate_points_incremental(PyObject *__pyx_self, PyObject *__pyx_v_points) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("triangulate_points_incremental (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_points), (&PyList_Type), 1, "points", 1))) __PYX_ERR(0, 3135, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_256triangulate_points_incremental(__pyx_self, ((PyObject*)__pyx_v_points));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_256triangulate_points_incremental(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_points) {
  struct CGL_vec2 *__pyx_v_c_points;
  PyObject *__pyx_v_i = NULL;
  int *__pyx_v_c_indices;
  int __pyx_v_c_num_indices;
  PyObject *__pyx_v_indices = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  Py_ssize_t __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  CGL_float __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("triangulate_points_incremental", 0);

  /* "cgl_wrapper.pyx":3136
 * 
 * def triangulate_points_incremental(points: list) -> list:
 *     cdef CGL_vec2* c_points = <CGL_vec2*>stdlib.malloc(len(points) * sizeof(CGL_vec2))             # <<<<<<<<<<<<<<
 *     for i in range(len(points)):
 *         c_points[i].x = points[i].x
 */
  if (unlikely(__pyx_v_points == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3136, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_points); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3136, __pyx_L1_error)
  __pyx_v_c_points = ((struct CGL_vec2 *)malloc((__pyx_t_1 * (sizeof(struct CGL_vec2)))));

  /* "cgl_wrapper.pyx":3137
 * def triangulate_points_incremental(points: list) -> list:
 *     cdef CGL_vec2* c_points = <CGL_vec2*>stdlib.malloc(len(points) * sizeof(CGL_vec2))
 *     for i in range(len(points)):             # <<<<<<<<<<<<<<
 *         c_points[i].x = points[i].x
 *         c_points[i].y = points[i].y
 */
  if (unlikely(__pyx_v_points == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3137, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_points); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3137, __pyx_L1_error)
  __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3137, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 3137, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 3137, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3137, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3137, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cgl_wrapper.pyx":3138
 *     cdef CGL_vec2* c_points = <CGL_vec2*>stdlib.malloc(len(points) * sizeof(CGL_vec2))
 *     for i in range(len(points)):
 *         c_points[i].x = points[i].x             # <<<<<<<<<<<<<<
 *         c_points[i].y = points[i].y
 *     cdef int* c_indices = <int*>stdlib.malloc(len(points) * sizeof(int) * 3)
 */
    if (unlikely(__pyx_v_points == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3138, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_points, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_5); if (unlikely((__pyx_t_6 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3138, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3138, __pyx_L1_error)
    (__pyx_v_c_points[__pyx_t_7]).x = __pyx_t_6;

    /* "cgl_wrapper.pyx":3139
 *     for i in range(len(points)):
 *         c_points[i].x = points[i].x
 *         c_points[i].y = points[i].y             # <<<<<<<<<<<<<<
 *     cdef int* c_indices = <int*>stdlib.malloc(len(points) * sizeof(int) * 3)
 *     cdef int c_num_indices = 0
 */
    if (unlikely(__pyx_v_points == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 3139, __pyx_L1_error)
    }
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_points, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_y); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_3); if (unlikely((__pyx_t_6 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3139, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3139, __pyx_L1_error)
    (__pyx_v_c_points[__pyx_t_7]).y = __pyx_t_6;

    /* "cgl_wrapper.pyx":3137
 * def triangulate_points_incremental(points: list) -> list:
 *     cdef CGL_vec2* c_points = <CGL_vec2*>stdlib.malloc(len(points) * sizeof(CGL_vec2))
 *     for i in range(len(points)):             # <<<<<<<<<<<<<<
 *         c_points[i].x = points[i].x
 *         c_points[i].y = points[i].y
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3140
 *         c_points[i].x = points[i].x
 *         c_points[i].y = points[i].y
 *     cdef int* c_indices = <int*>stdlib.malloc(len(points) * sizeof(int) * 3)             # <<<<<<<<<<<<<<
 *     cdef int c_num_indices = 0
 *     CGL_triangulate_points_incremental(c_points, len(points), c_indices, &c_num_indices)
 */
  if (unlikely(__pyx_v_points == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3140, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_points); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3140, __pyx_L1_error)
  __pyx_v_c_indices = ((int *)malloc(((__pyx_t_1 * (sizeof(int))) * 3)));

  /* "cgl_wrapper.pyx":3141
 *         c_points[i].y = points[i].y
 *     cdef int* c_indices = <int*>stdlib.malloc(len(points) * sizeof(int) * 3)
 *     cdef int c_num_indices = 0             # <<<<<<<<<<<<<<
 *     CGL_triangulate_points_incremental(c_points, len(points), c_indices, &c_num_indices)
 *     indices = []
 */
  __pyx_v_c_num_indices = 0;

  /* "cgl_wrapper.pyx":3142
 *     cdef int* c_indices = <int*>stdlib.malloc(len(points) * sizeof(int) * 3)
 *     cdef int c_num_indices = 0
 *     CGL_triangulate_points_incremental(c_points, len(points), c_indices, &c_num_indices)             # <<<<<<<<<<<<<<
 *     indices = []
 *     for i in range(c_num_indices / 3):
 */
  if (unlikely(__pyx_v_points == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3142, __pyx_L1_error)
  }
  __pyx_t_1 = PyList_GET_SIZE(__pyx_v_points); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3142, __pyx_L1_error)
  (void)(CGL_triangulate_points_incremental(__pyx_v_c_points, __pyx_t_1, __pyx_v_c_indices, (&__pyx_v_c_num_indices)));

  /* "cgl_wrapper.pyx":3143
 *     cdef int c_num_indices = 0
 *     CGL_triangulate_points_incremental(c_points, len(points), c_indices, &c_num_indices)
 *     indices = []             # <<<<<<<<<<<<<<
 *     for i in range(c_num_indices / 3):
 *         indices.append((c_indices[i * 3], c_indices[i * 3 + 1], c_indices[i * 3 + 2]))
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_indices = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3144
 *     CGL_triangulate_points_incremental(c_points, len(points), c_indices, &c_num_indices)
 *     indices = []
 *     for i in range(c_num_indices / 3):             # <<<<<<<<<<<<<<
 *         indices.append((c_indices[i * 3], c_indices[i * 3 + 1], c_indices[i * 3 + 2]))
 *     stdlib.free(c_points)
 */
  __pyx_t_2 = __Pyx_PyInt_From_long(__Pyx_div_long(__pyx_v_c_num_indices, 3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_1 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3144, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3144, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 3144, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3144, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      } else {
        if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_3); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 3144, __pyx_L1_error)
        #else
        __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3144, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
      }
    } else {
      __pyx_t_3 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 3144, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "cgl_wrapper.pyx":3145
 *     indices = []
 *     for i in range(c_num_indices / 3):
 *         indices.append((c_indices[i * 3], c_indices[i * 3 + 1], c_indices[i * 3 + 2]))             # <<<<<<<<<<<<<<
 *     stdlib.free(c_points)
 *     stdlib.free(c_indices)
 */
    __pyx_t_3 = PyNumber_Multiply(__pyx_v_i, __pyx_int_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_c_indices[__pyx_t_7])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = PyNumber_Multiply(__pyx_v_i, __pyx_int_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyInt_From_int((__pyx_v_c_indices[__pyx_t_7])); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_5 = PyNumber_Multiply(__pyx_v_i, __pyx_int_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_2, 2, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_7 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_v_c_indices[__pyx_t_7])); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8);
    __Pyx_GIVEREF(__pyx_t_9);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_9);
    __pyx_t_3 = 0;
    __pyx_t_8 = 0;
    __pyx_t_9 = 0;
    __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_indices, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3145, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "cgl_wrapper.pyx":3144
 *     CGL_triangulate_points_incremental(c_points, len(points), c_indices, &c_num_indices)
 *     indices = []
 *     for i in range(c_num_indices / 3):             # <<<<<<<<<<<<<<
 *         indices.append((c_indices[i * 3], c_indices[i * 3 + 1], c_indices[i * 3 + 2]))
 *     stdlib.free(c_points)
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3146
 *     for i in range(c_num_indices / 3):
 *         indices.append((c_indices[i * 3], c_indices[i * 3 + 1], c_indices[i * 3 + 2]))
 *     stdlib.free(c_points)             # <<<<<<<<<<<<<<
 *     stdlib.free(c_indices)
 *     return indices
 */
  free(__pyx_v_c_points);

  /* "cgl_wrapper.pyx":3147
 *         indices.append((c_indices[i * 3], c_indices[i * 3 + 1], c_indices[i * 3 + 2]))
 *     stdlib.free(c_points)
 *     stdlib.free(c_indices)             # <<<<<<<<<<<<<<
 *     return indices
 * 
 */
  free(__pyx_v_c_indices);

  /* "cgl_wrapper.pyx":3148
 *     stdlib.free(c_points)
 *     stdlib.free(c_indices)
 *     return indices             # <<<<<<<<<<<<<<
 * 
 * BLOOM_SHADER_MODE_PREFILTER    = 0
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_indices);
  __pyx_r = __pyx_v_indices;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3135
 *     return CGL_aabb_intersects_aabb(aabb_min_a.c_vec2, aabb_max_a.c_vec2, aabb_min_b.c_vec2, aabb_max_b.c_vec2)
 * 
 * def triangulate_points_incremental(points: list) -> list:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_points = <CGL_vec2*>stdlib.malloc(len(points) * sizeof(CGL_vec2))
 *     for i in range(len(points)):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("cgl.triangulate_points_incremental", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_indices);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3162
 * 
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self.width
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_5width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_5width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_5width___get__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_5width___get__(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3163
 *     @property
 *     def width(self):
 *         return self.width             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->width); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3162
 * 
 *     @property
 *     def width(self):             # <<<<<<<<<<<<<<
 *         return self.width
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3166
 * 
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self.height
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_6height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_6height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_6height___get__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_6height___get__(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3167
 *     @property
 *     def height(self):
 *         return self.height             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3166
 * 
 *     @property
 *     def height(self):             # <<<<<<<<<<<<<<
 *         return self.height
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3170
 * 
 *     @property
 *     def iterations(self):             # <<<<<<<<<<<<<<
 *         return self.iterations
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_10iterations_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_10iterations_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_10iterations___get__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_10iterations___get__(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3171
 *     @property
 *     def iterations(self):
 *         return self.iterations             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->iterations); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3170
 * 
 *     @property
 *     def iterations(self):             # <<<<<<<<<<<<<<
 *         return self.iterations
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.iterations.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3175
 * 
 *     @property
 *     def threshold(self):             # <<<<<<<<<<<<<<
 *         return CGL_bloom_get_threshold(self.c_bloom)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_9threshold_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_9threshold_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_9threshold___get__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_9threshold___get__(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3176
 *     @property
 *     def threshold(self):
 *         return CGL_bloom_get_threshold(self.c_bloom)             # <<<<<<<<<<<<<<
 * 
 *     @threshold.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_bloom_get_threshold(__pyx_v_self->c_bloom)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3176, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3175
 * 
 *     @property
 *     def threshold(self):             # <<<<<<<<<<<<<<
 *         return CGL_bloom_get_threshold(self.c_bloom)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.threshold.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3179
 * 
 *     @threshold.setter
 *     def threshold(self, threshold: float):             # <<<<<<<<<<<<<<
 *         CGL_bloom_set_threshold(self.c_bloom, threshold)
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5bloom_9threshold_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_threshold); /*proto*/
static int __pyx_pw_3cgl_5bloom_9threshold_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_threshold) {
  double __pyx_v_threshold;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_threshold); {
    __pyx_v_threshold = __pyx_PyFloat_AsDouble(__pyx_arg_threshold); if (unlikely((__pyx_v_threshold == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3179, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.bloom.threshold.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_5bloom_9threshold_2__set__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self), ((double)__pyx_v_threshold));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5bloom_9threshold_2__set__(struct __pyx_obj_3cgl_bloom *__pyx_v_self, double __pyx_v_threshold) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3180
 *     @threshold.setter
 *     def threshold(self, threshold: float):
 *         CGL_bloom_set_threshold(self.c_bloom, threshold)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  CGL_bloom_set_threshold(__pyx_v_self->c_bloom, __pyx_v_threshold);

  /* "cgl_wrapper.pyx":3179
 * 
 *     @threshold.setter
 *     def threshold(self, threshold: float):             # <<<<<<<<<<<<<<
 *         CGL_bloom_set_threshold(self.c_bloom, threshold)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3183
 * 
 *     @property
 *     def knee(self):             # <<<<<<<<<<<<<<
 *         return CGL_bloom_get_knee(self.c_bloom)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_4knee_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_4knee_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_4knee___get__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_4knee___get__(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3184
 *     @property
 *     def knee(self):
 *         return CGL_bloom_get_knee(self.c_bloom)             # <<<<<<<<<<<<<<
 * 
 *     @knee.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_bloom_get_knee(__pyx_v_self->c_bloom)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3183
 * 
 *     @property
 *     def knee(self):             # <<<<<<<<<<<<<<
 *         return CGL_bloom_get_knee(self.c_bloom)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.knee.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3187
 * 
 *     @knee.setter
 *     def knee(self, knee: float):             # <<<<<<<<<<<<<<
 *         CGL_bloom_set_knee(self.c_bloom, knee)
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5bloom_4knee_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_knee); /*proto*/
static int __pyx_pw_3cgl_5bloom_4knee_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_knee) {
  double __pyx_v_knee;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_knee); {
    __pyx_v_knee = __pyx_PyFloat_AsDouble(__pyx_arg_knee); if (unlikely((__pyx_v_knee == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3187, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.bloom.knee.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_5bloom_4knee_2__set__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self), ((double)__pyx_v_knee));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5bloom_4knee_2__set__(struct __pyx_obj_3cgl_bloom *__pyx_v_self, double __pyx_v_knee) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3188
 *     @knee.setter
 *     def knee(self, knee: float):
 *         CGL_bloom_set_knee(self.c_bloom, knee)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, width: int, height: int, iterations: int):
 */
  CGL_bloom_set_knee(__pyx_v_self->c_bloom, __pyx_v_knee);

  /* "cgl_wrapper.pyx":3187
 * 
 *     @knee.setter
 *     def knee(self, knee: float):             # <<<<<<<<<<<<<<
 *         CGL_bloom_set_knee(self.c_bloom, knee)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3190
 *         CGL_bloom_set_knee(self.c_bloom, knee)
 * 
 *     def __init__(self, width: int, height: int, iterations: int):             # <<<<<<<<<<<<<<
 *         self.c_bloom = CGL_bloom_create(width, height, iterations)
 *         self.width = width
 */

/* Python wrapper */
static int __pyx_pw_3cgl_5bloom_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_5bloom_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  PyObject *__pyx_v_iterations = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_iterations,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 3190, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iterations)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 3190, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3190, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_width = values[0];
    __pyx_v_height = values[1];
    __pyx_v_iterations = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3190, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.bloom.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_5bloom___init__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self), __pyx_v_width, __pyx_v_height, __pyx_v_iterations);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_5bloom___init__(struct __pyx_obj_3cgl_bloom *__pyx_v_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_iterations) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  CGL_int __pyx_t_2;
  CGL_int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":3191
 * 
 *     def __init__(self, width: int, height: int, iterations: int):
 *         self.c_bloom = CGL_bloom_create(width, height, iterations)             # <<<<<<<<<<<<<<
 *         self.width = width
 *         self.height = height
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_width); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3191, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_height); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3191, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_CGL_int(__pyx_v_iterations); if (unlikely((__pyx_t_3 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3191, __pyx_L1_error)
  __pyx_v_self->c_bloom = CGL_bloom_create(__pyx_t_1, __pyx_t_2, __pyx_t_3);

  /* "cgl_wrapper.pyx":3192
 *     def __init__(self, width: int, height: int, iterations: int):
 *         self.c_bloom = CGL_bloom_create(width, height, iterations)
 *         self.width = width             # <<<<<<<<<<<<<<
 *         self.height = height
 *         self.iterations = iterations
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_width); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3192, __pyx_L1_error)
  __pyx_v_self->width = __pyx_t_4;

  /* "cgl_wrapper.pyx":3193
 *         self.c_bloom = CGL_bloom_create(width, height, iterations)
 *         self.width = width
 *         self.height = height             # <<<<<<<<<<<<<<
 *         self.iterations = iterations
 * 
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_height); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3193, __pyx_L1_error)
  __pyx_v_self->height = __pyx_t_4;

  /* "cgl_wrapper.pyx":3194
 *         self.width = width
 *         self.height = height
 *         self.iterations = iterations             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_iterations); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3194, __pyx_L1_error)
  __pyx_v_self->iterations = __pyx_t_4;

  /* "cgl_wrapper.pyx":3190
 *         CGL_bloom_set_knee(self.c_bloom, knee)
 * 
 *     def __init__(self, width: int, height: int, iterations: int):             # <<<<<<<<<<<<<<
 *         self.c_bloom = CGL_bloom_create(width, height, iterations)
 *         self.width = width
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.bloom.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3196
 *         self.iterations = iterations
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         CGL_bloom_destroy(self.c_bloom)
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_5bloom_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_5bloom_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_5bloom_2__dealloc__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_5bloom_2__dealloc__(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":3197
 * 
 *     def __dealloc__(self):
 *         CGL_bloom_destroy(self.c_bloom)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  CGL_bloom_destroy(__pyx_v_self->c_bloom);

  /* "cgl_wrapper.pyx":3196
 *         self.iterations = iterations
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         CGL_bloom_destroy(self.c_bloom)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":3199
 *         CGL_bloom_destroy(self.c_bloom)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"bloom({self.width}, {self.height}, {self.iterations})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_4__repr__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_4__repr__(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":3200
 * 
 *     def __repr__(self):
 *         return f"bloom({self.width}, {self.height}, {self.iterations})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_bloom);
  __pyx_t_2 += 6;
  __Pyx_GIVEREF(__pyx_kp_u_bloom);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_bloom);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->width, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->height, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->iterations, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3200, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3199
 *         CGL_bloom_destroy(self.c_bloom)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"bloom({self.width}, {self.height}, {self.iterations})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.bloom.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3202
 *         return f"bloom({self.width}, {self.height}, {self.iterations})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"bloom({self.width}, {self.height}, {self.iterations})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_6__str__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_6__str__(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":3203
 * 
 *     def __str__(self):
 *         return f"bloom({self.width}, {self.height}, {self.iterations})"             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_bloom);
  __pyx_t_2 += 6;
  __Pyx_GIVEREF(__pyx_kp_u_bloom);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_bloom);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->width, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->height, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->iterations, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3203, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3202
 *         return f"bloom({self.width}, {self.height}, {self.iterations})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"bloom({self.width}, {self.height}, {self.iterations})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.bloom.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3205
 *         return f"bloom({self.width}, {self.height}, {self.iterations})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(<void*>self.c_bloom, sizeof(CGL_bloom*))
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_5bloom_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_5bloom_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_8__hash__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_5bloom_8__hash__(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":3206
 * 
 *     def __hash__(self):
 *         return CGL_utils_super_fast_hash(<void*>self.c_bloom, sizeof(CGL_bloom*))             # <<<<<<<<<<<<<<
 * 
 *     def set_threshold(self, threshold: float):
 */
  __pyx_r = CGL_utils_super_fast_hash(((void *)__pyx_v_self->c_bloom), (sizeof(struct CGL_bloom *)));
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3205
 *         return f"bloom({self.width}, {self.height}, {self.iterations})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(<void*>self.c_bloom, sizeof(CGL_bloom*))
 * 
 */

  /* function exit code */
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3208
 *         return CGL_utils_super_fast_hash(<void*>self.c_bloom, sizeof(CGL_bloom*))
 * 
 *     def set_threshold(self, threshold: float):             # <<<<<<<<<<<<<<
 *         CGL_bloom_set_threshold(self.c_bloom, threshold)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_11set_threshold(PyObject *__pyx_v_self, PyObject *__pyx_arg_threshold); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_11set_threshold(PyObject *__pyx_v_self, PyObject *__pyx_arg_threshold) {
  double __pyx_v_threshold;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_threshold (wrapper)", 0);
  assert(__pyx_arg_threshold); {
    __pyx_v_threshold = __pyx_PyFloat_AsDouble(__pyx_arg_threshold); if (unlikely((__pyx_v_threshold == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3208, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.bloom.set_threshold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_5bloom_10set_threshold(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self), ((double)__pyx_v_threshold));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_10set_threshold(struct __pyx_obj_3cgl_bloom *__pyx_v_self, double __pyx_v_threshold) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_threshold", 0);

  /* "cgl_wrapper.pyx":3209
 * 
 *     def set_threshold(self, threshold: float):
 *         CGL_bloom_set_threshold(self.c_bloom, threshold)             # <<<<<<<<<<<<<<
 * 
 *     def get_threshold(self) -> float:
 */
  CGL_bloom_set_threshold(__pyx_v_self->c_bloom, __pyx_v_threshold);

  /* "cgl_wrapper.pyx":3208
 *         return CGL_utils_super_fast_hash(<void*>self.c_bloom, sizeof(CGL_bloom*))
 * 
 *     def set_threshold(self, threshold: float):             # <<<<<<<<<<<<<<
 *         CGL_bloom_set_threshold(self.c_bloom, threshold)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3211
 *         CGL_bloom_set_threshold(self.c_bloom, threshold)
 * 
 *     def get_threshold(self) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_bloom_get_threshold(self.c_bloom)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_13get_threshold(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_13get_threshold(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_threshold (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_12get_threshold(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_12get_threshold(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_threshold", 0);

  /* "cgl_wrapper.pyx":3212
 * 
 *     def get_threshold(self) -> float:
 *         return CGL_bloom_get_threshold(self.c_bloom)             # <<<<<<<<<<<<<<
 * 
 *     def set_knee(self, knee: float):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_bloom_get_threshold(__pyx_v_self->c_bloom)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3212, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3211
 *         CGL_bloom_set_threshold(self.c_bloom, threshold)
 * 
 *     def get_threshold(self) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_bloom_get_threshold(self.c_bloom)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.get_threshold", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3214
 *         return CGL_bloom_get_threshold(self.c_bloom)
 * 
 *     def set_knee(self, knee: float):             # <<<<<<<<<<<<<<
 *         CGL_bloom_set_knee(self.c_bloom, knee)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_15set_knee(PyObject *__pyx_v_self, PyObject *__pyx_arg_knee); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_15set_knee(PyObject *__pyx_v_self, PyObject *__pyx_arg_knee) {
  double __pyx_v_knee;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_knee (wrapper)", 0);
  assert(__pyx_arg_knee); {
    __pyx_v_knee = __pyx_PyFloat_AsDouble(__pyx_arg_knee); if (unlikely((__pyx_v_knee == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3214, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.bloom.set_knee", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_5bloom_14set_knee(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self), ((double)__pyx_v_knee));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_14set_knee(struct __pyx_obj_3cgl_bloom *__pyx_v_self, double __pyx_v_knee) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_knee", 0);

  /* "cgl_wrapper.pyx":3215
 * 
 *     def set_knee(self, knee: float):
 *         CGL_bloom_set_knee(self.c_bloom, knee)             # <<<<<<<<<<<<<<
 * 
 *     def get_knee(self) -> float:
 */
  CGL_bloom_set_knee(__pyx_v_self->c_bloom, __pyx_v_knee);

  /* "cgl_wrapper.pyx":3214
 *         return CGL_bloom_get_threshold(self.c_bloom)
 * 
 *     def set_knee(self, knee: float):             # <<<<<<<<<<<<<<
 *         CGL_bloom_set_knee(self.c_bloom, knee)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3217
 *         CGL_bloom_set_knee(self.c_bloom, knee)
 * 
 *     def get_knee(self) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_bloom_get_knee(self.c_bloom)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_17get_knee(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_17get_knee(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_knee (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_16get_knee(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_16get_knee(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_knee", 0);

  /* "cgl_wrapper.pyx":3218
 * 
 *     def get_knee(self) -> float:
 *         return CGL_bloom_get_knee(self.c_bloom)             # <<<<<<<<<<<<<<
 * 
 *     def set_offset(self, offset_x: float, offset_y: float):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_bloom_get_knee(__pyx_v_self->c_bloom)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3217
 *         CGL_bloom_set_knee(self.c_bloom, knee)
 * 
 *     def get_knee(self) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_bloom_get_knee(self.c_bloom)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.get_knee", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3220
 *         return CGL_bloom_get_knee(self.c_bloom)
 * 
 *     def set_offset(self, offset_x: float, offset_y: float):             # <<<<<<<<<<<<<<
 *         CGL_bloom_set_offset(self.c_bloom, offset_x, offset_y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_19set_offset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_19set_offset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_offset_x;
  double __pyx_v_offset_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_offset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset_x,&__pyx_n_s_offset_y,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_offset", 1, 2, 2, 1); __PYX_ERR(0, 3220, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_offset") < 0)) __PYX_ERR(0, 3220, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_offset_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_offset_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3220, __pyx_L3_error)
    __pyx_v_offset_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_offset_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3220, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_offset", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3220, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.bloom.set_offset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_5bloom_18set_offset(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self), __pyx_v_offset_x, __pyx_v_offset_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_18set_offset(struct __pyx_obj_3cgl_bloom *__pyx_v_self, double __pyx_v_offset_x, double __pyx_v_offset_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_offset", 0);

  /* "cgl_wrapper.pyx":3221
 * 
 *     def set_offset(self, offset_x: float, offset_y: float):
 *         CGL_bloom_set_offset(self.c_bloom, offset_x, offset_y)             # <<<<<<<<<<<<<<
 * 
 *     def apply(self, tex: texture):
 */
  CGL_bloom_set_offset(__pyx_v_self->c_bloom, __pyx_v_offset_x, __pyx_v_offset_y);

  /* "cgl_wrapper.pyx":3220
 *         return CGL_bloom_get_knee(self.c_bloom)
 * 
 *     def set_offset(self, offset_x: float, offset_y: float):             # <<<<<<<<<<<<<<
 *         CGL_bloom_set_offset(self.c_bloom, offset_x, offset_y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3223
 *         CGL_bloom_set_offset(self.c_bloom, offset_x, offset_y)
 * 
 *     def apply(self, tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_bloom_apply(self.c_bloom, tex.c_texture)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_21apply(PyObject *__pyx_v_self, PyObject *__pyx_v_tex); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_21apply(PyObject *__pyx_v_self, PyObject *__pyx_v_tex) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tex), __pyx_ptype_3cgl_texture, 1, "tex", 0))) __PYX_ERR(0, 3223, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_5bloom_20apply(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self), ((struct __pyx_obj_3cgl_texture *)__pyx_v_tex));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_20apply(struct __pyx_obj_3cgl_bloom *__pyx_v_self, struct __pyx_obj_3cgl_texture *__pyx_v_tex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply", 0);

  /* "cgl_wrapper.pyx":3224
 * 
 *     def apply(self, tex: texture):
 *         CGL_bloom_apply(self.c_bloom, tex.c_texture)             # <<<<<<<<<<<<<<
 * 
 *     def apply2(self, texture_src: texture, texture_dst: texture):
 */
  CGL_bloom_apply(__pyx_v_self->c_bloom, __pyx_v_tex->c_texture);

  /* "cgl_wrapper.pyx":3223
 *         CGL_bloom_set_offset(self.c_bloom, offset_x, offset_y)
 * 
 *     def apply(self, tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_bloom_apply(self.c_bloom, tex.c_texture)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3226
 *         CGL_bloom_apply(self.c_bloom, tex.c_texture)
 * 
 *     def apply2(self, texture_src: texture, texture_dst: texture):             # <<<<<<<<<<<<<<
 *         CGL_bloom_apply2(self.c_bloom, texture_src.c_texture, texture_dst.c_texture)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_23apply2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_23apply2(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_texture *__pyx_v_texture_src = 0;
  struct __pyx_obj_3cgl_texture *__pyx_v_texture_dst = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply2 (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_texture_src,&__pyx_n_s_texture_dst,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_src)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_dst)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("apply2", 1, 2, 2, 1); __PYX_ERR(0, 3226, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "apply2") < 0)) __PYX_ERR(0, 3226, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_texture_src = ((struct __pyx_obj_3cgl_texture *)values[0]);
    __pyx_v_texture_dst = ((struct __pyx_obj_3cgl_texture *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("apply2", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3226, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.bloom.apply2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_texture_src), __pyx_ptype_3cgl_texture, 1, "texture_src", 0))) __PYX_ERR(0, 3226, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_texture_dst), __pyx_ptype_3cgl_texture, 1, "texture_dst", 0))) __PYX_ERR(0, 3226, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_5bloom_22apply2(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self), __pyx_v_texture_src, __pyx_v_texture_dst);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_22apply2(struct __pyx_obj_3cgl_bloom *__pyx_v_self, struct __pyx_obj_3cgl_texture *__pyx_v_texture_src, struct __pyx_obj_3cgl_texture *__pyx_v_texture_dst) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply2", 0);

  /* "cgl_wrapper.pyx":3227
 * 
 *     def apply2(self, texture_src: texture, texture_dst: texture):
 *         CGL_bloom_apply2(self.c_bloom, texture_src.c_texture, texture_dst.c_texture)             # <<<<<<<<<<<<<<
 * 
 *     def get_lod_texture(self, lod: int) -> texture:
 */
  CGL_bloom_apply2(__pyx_v_self->c_bloom, __pyx_v_texture_src->c_texture, __pyx_v_texture_dst->c_texture);

  /* "cgl_wrapper.pyx":3226
 *         CGL_bloom_apply(self.c_bloom, tex.c_texture)
 * 
 *     def apply2(self, texture_src: texture, texture_dst: texture):             # <<<<<<<<<<<<<<
 *         CGL_bloom_apply2(self.c_bloom, texture_src.c_texture, texture_dst.c_texture)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3229
 *         CGL_bloom_apply2(self.c_bloom, texture_src.c_texture, texture_dst.c_texture)
 * 
 *     def get_lod_texture(self, lod: int) -> texture:             # <<<<<<<<<<<<<<
 *         result = texture()
 *         result.set_c_texture(CGL_bloom_get_lod_texture(self.c_bloom, lod))
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_5bloom_25get_lod_texture(PyObject *__pyx_v_self, PyObject *__pyx_v_lod); /*proto*/
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_5bloom_25get_lod_texture(PyObject *__pyx_v_self, PyObject *__pyx_v_lod) {
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_lod_texture (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_24get_lod_texture(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self), ((PyObject *)__pyx_v_lod));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_5bloom_24get_lod_texture(struct __pyx_obj_3cgl_bloom *__pyx_v_self, PyObject *__pyx_v_lod) {
  struct __pyx_obj_3cgl_texture *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  CGL_int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_lod_texture", 0);

  /* "cgl_wrapper.pyx":3230
 * 
 *     def get_lod_texture(self, lod: int) -> texture:
 *         result = texture()             # <<<<<<<<<<<<<<
 *         result.set_c_texture(CGL_bloom_get_lod_texture(self.c_bloom, lod))
 *         # this is a hack to prevent the texture from
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_texture *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3231
 *     def get_lod_texture(self, lod: int) -> texture:
 *         result = texture()
 *         result.set_c_texture(CGL_bloom_get_lod_texture(self.c_bloom, lod))             # <<<<<<<<<<<<<<
 *         # this is a hack to prevent the texture from
 *         # being destroyed when the result goes out of scope
 */
  __pyx_t_2 = __Pyx_PyInt_As_CGL_int(__pyx_v_lod); if (unlikely((__pyx_t_2 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3231, __pyx_L1_error)
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_result->__pyx_vtab)->set_c_texture(__pyx_v_result, CGL_bloom_get_lod_texture(__pyx_v_self->c_bloom, __pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3235
 *         # being destroyed when the result goes out of scope
 *         # as this texture object is managed by the bloom object
 *         result.has_been_destroyed = True             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_v_result->has_been_destroyed = 1;

  /* "cgl_wrapper.pyx":3236
 *         # as this texture object is managed by the bloom object
 *         result.has_been_destroyed = True
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def get_prefiltered_texture(self) -> texture:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3229
 *         CGL_bloom_apply2(self.c_bloom, texture_src.c_texture, texture_dst.c_texture)
 * 
 *     def get_lod_texture(self, lod: int) -> texture:             # <<<<<<<<<<<<<<
 *         result = texture()
 *         result.set_c_texture(CGL_bloom_get_lod_texture(self.c_bloom, lod))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.get_lod_texture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3238
 *         return result
 * 
 *     def get_prefiltered_texture(self) -> texture:             # <<<<<<<<<<<<<<
 *         result = texture()
 *         result.set_c_texture(CGL_bloom_get_prefiltered_texture(self.c_bloom))
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_5bloom_27get_prefiltered_texture(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_5bloom_27get_prefiltered_texture(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_prefiltered_texture (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_26get_prefiltered_texture(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_5bloom_26get_prefiltered_texture(struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  struct __pyx_obj_3cgl_texture *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_prefiltered_texture", 0);

  /* "cgl_wrapper.pyx":3239
 * 
 *     def get_prefiltered_texture(self) -> texture:
 *         result = texture()             # <<<<<<<<<<<<<<
 *         result.set_c_texture(CGL_bloom_get_prefiltered_texture(self.c_bloom))
 *         # this is a hack to prevent the texture from
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3239, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_texture *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3240
 *     def get_prefiltered_texture(self) -> texture:
 *         result = texture()
 *         result.set_c_texture(CGL_bloom_get_prefiltered_texture(self.c_bloom))             # <<<<<<<<<<<<<<
 *         # this is a hack to prevent the texture from
 *         # being destroyed when the result goes out of scope
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_result->__pyx_vtab)->set_c_texture(__pyx_v_result, CGL_bloom_get_prefiltered_texture(__pyx_v_self->c_bloom)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3244
 *         # being destroyed when the result goes out of scope
 *         # as this texture object is managed by the bloom object
 *         result.has_been_destroyed = True             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_v_result->has_been_destroyed = 1;

  /* "cgl_wrapper.pyx":3245
 *         # as this texture object is managed by the bloom object
 *         result.has_been_destroyed = True
 *         return result             # <<<<<<<<<<<<<<
 * 
 * cdef class tilemap:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3238
 *         return result
 * 
 *     def get_prefiltered_texture(self) -> texture:             # <<<<<<<<<<<<<<
 *         result = texture()
 *         result.set_c_texture(CGL_bloom_get_prefiltered_texture(self.c_bloom))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.get_prefiltered_texture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_29__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_28__reduce_cython__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_28__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_bloom *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__74, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_5bloom_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_5bloom_31__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_5bloom_30__setstate_cython__(((struct __pyx_obj_3cgl_bloom *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_5bloom_30__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_bloom *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.bloom.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3256
 * 
 *     @property
 *     def tile_count_x(self):             # <<<<<<<<<<<<<<
 *         return self.tile_count_x
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_12tile_count_x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_12tile_count_x_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_12tile_count_x___get__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_12tile_count_x___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3257
 *     @property
 *     def tile_count_x(self):
 *         return self.tile_count_x             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tile_count_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3256
 * 
 *     @property
 *     def tile_count_x(self):             # <<<<<<<<<<<<<<
 *         return self.tile_count_x
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.tilemap.tile_count_x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3260
 * 
 *     @property
 *     def tile_count_y(self):             # <<<<<<<<<<<<<<
 *         return self.tile_count_y
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_12tile_count_y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_12tile_count_y_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_12tile_count_y___get__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_12tile_count_y___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3261
 *     @property
 *     def tile_count_y(self):
 *         return self.tile_count_y             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tile_count_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3260
 * 
 *     @property
 *     def tile_count_y(self):             # <<<<<<<<<<<<<<
 *         return self.tile_count_y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.tilemap.tile_count_y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3264
 * 
 *     @property
 *     def tile_size_x(self):             # <<<<<<<<<<<<<<
 *         return self.tile_size_x
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_11tile_size_x_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_11tile_size_x_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_11tile_size_x___get__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_11tile_size_x___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3265
 *     @property
 *     def tile_size_x(self):
 *         return self.tile_size_x             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tile_size_x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3265, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3264
 * 
 *     @property
 *     def tile_size_x(self):             # <<<<<<<<<<<<<<
 *         return self.tile_size_x
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.tilemap.tile_size_x.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3268
 * 
 *     @property
 *     def tile_size_y(self):             # <<<<<<<<<<<<<<
 *         return self.tile_size_y
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_11tile_size_y_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_11tile_size_y_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_11tile_size_y___get__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_11tile_size_y___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3269
 *     @property
 *     def tile_size_y(self):
 *         return self.tile_size_y             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->tile_size_y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3268
 * 
 *     @property
 *     def tile_size_y(self):             # <<<<<<<<<<<<<<
 *         return self.tile_size_y
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.tilemap.tile_size_y.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3272
 * 
 *     @property
 *     def ssbo_binding(self):             # <<<<<<<<<<<<<<
 *         return self.ssbo_binding
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_12ssbo_binding_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_12ssbo_binding_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_12ssbo_binding___get__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_12ssbo_binding___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3273
 *     @property
 *     def ssbo_binding(self):
 *         return self.ssbo_binding             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ssbo_binding); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3272
 * 
 *     @property
 *     def ssbo_binding(self):             # <<<<<<<<<<<<<<
 *         return self.ssbo_binding
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.tilemap.ssbo_binding.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3276
 * 
 *     @property
 *     def auto_upload(self):             # <<<<<<<<<<<<<<
 *         return self.get_auto_upload()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_11auto_upload_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_11auto_upload_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_11auto_upload___get__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_11auto_upload___get__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3277
 *     @property
 *     def auto_upload(self):
 *         return self.get_auto_upload()             # <<<<<<<<<<<<<<
 * 
 *     @auto_upload.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_auto_upload); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3276
 * 
 *     @property
 *     def auto_upload(self):             # <<<<<<<<<<<<<<
 *         return self.get_auto_upload()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.tilemap.auto_upload.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3280
 * 
 *     @auto_upload.setter
 *     def auto_upload(self, auto_upload: bool):             # <<<<<<<<<<<<<<
 *         self.set_auto_upload(auto_upload)
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_7tilemap_11auto_upload_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_auto_upload); /*proto*/
static int __pyx_pw_3cgl_7tilemap_11auto_upload_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_auto_upload) {
  bool __pyx_v_auto_upload;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_auto_upload); {
    __pyx_v_auto_upload = __Pyx_PyObject_IsTrue(__pyx_arg_auto_upload); if (unlikely((__pyx_v_auto_upload == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3280, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.tilemap.auto_upload.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7tilemap_11auto_upload_2__set__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), ((bool)__pyx_v_auto_upload));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_7tilemap_11auto_upload_2__set__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, bool __pyx_v_auto_upload) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3281
 *     @auto_upload.setter
 *     def auto_upload(self, auto_upload: bool):
 *         self.set_auto_upload(auto_upload)             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, tile_count_x: int, tile_count_y: int, tile_size_x: int, tile_size_y: int, ssbo_binding: int):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_set_auto_upload); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_auto_upload); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3281, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3280
 * 
 *     @auto_upload.setter
 *     def auto_upload(self, auto_upload: bool):             # <<<<<<<<<<<<<<
 *         self.set_auto_upload(auto_upload)
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.tilemap.auto_upload.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3283
 *         self.set_auto_upload(auto_upload)
 * 
 *     def __init__(self, tile_count_x: int, tile_count_y: int, tile_size_x: int, tile_size_y: int, ssbo_binding: int):             # <<<<<<<<<<<<<<
 *         self.c_tilemap = CGL_tilemap_create(tile_count_x, tile_count_y, tile_size_x, tile_size_y, ssbo_binding)
 *         self.tile_count_x = tile_count_x
 */

/* Python wrapper */
static int __pyx_pw_3cgl_7tilemap_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_7tilemap_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tile_count_x = 0;
  PyObject *__pyx_v_tile_count_y = 0;
  PyObject *__pyx_v_tile_size_x = 0;
  PyObject *__pyx_v_tile_size_y = 0;
  PyObject *__pyx_v_ssbo_binding = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tile_count_x,&__pyx_n_s_tile_count_y,&__pyx_n_s_tile_size_x,&__pyx_n_s_tile_size_y,&__pyx_n_s_ssbo_binding,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_count_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_count_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 1); __PYX_ERR(0, 3283, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_size_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 2); __PYX_ERR(0, 3283, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_size_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 3); __PYX_ERR(0, 3283, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ssbo_binding)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, 4); __PYX_ERR(0, 3283, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3283, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_tile_count_x = values[0];
    __pyx_v_tile_count_y = values[1];
    __pyx_v_tile_size_x = values[2];
    __pyx_v_tile_size_y = values[3];
    __pyx_v_ssbo_binding = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3283, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.tilemap.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7tilemap___init__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), __pyx_v_tile_count_x, __pyx_v_tile_count_y, __pyx_v_tile_size_x, __pyx_v_tile_size_y, __pyx_v_ssbo_binding);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_7tilemap___init__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_tile_count_x, PyObject *__pyx_v_tile_count_y, PyObject *__pyx_v_tile_size_x, PyObject *__pyx_v_tile_size_y, PyObject *__pyx_v_ssbo_binding) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  uint32_t __pyx_t_2;
  uint32_t __pyx_t_3;
  uint32_t __pyx_t_4;
  uint32_t __pyx_t_5;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":3284
 * 
 *     def __init__(self, tile_count_x: int, tile_count_y: int, tile_size_x: int, tile_size_y: int, ssbo_binding: int):
 *         self.c_tilemap = CGL_tilemap_create(tile_count_x, tile_count_y, tile_size_x, tile_size_y, ssbo_binding)             # <<<<<<<<<<<<<<
 *         self.tile_count_x = tile_count_x
 *         self.tile_count_y = tile_count_y
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_count_x); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_count_y); if (unlikely((__pyx_t_2 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_size_x); if (unlikely((__pyx_t_3 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_size_y); if (unlikely((__pyx_t_4 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L1_error)
  __pyx_t_5 = __Pyx_PyInt_As_uint32_t(__pyx_v_ssbo_binding); if (unlikely((__pyx_t_5 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3284, __pyx_L1_error)
  __pyx_v_self->c_tilemap = CGL_tilemap_create(__pyx_t_1, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5);

  /* "cgl_wrapper.pyx":3285
 *     def __init__(self, tile_count_x: int, tile_count_y: int, tile_size_x: int, tile_size_y: int, ssbo_binding: int):
 *         self.c_tilemap = CGL_tilemap_create(tile_count_x, tile_count_y, tile_size_x, tile_size_y, ssbo_binding)
 *         self.tile_count_x = tile_count_x             # <<<<<<<<<<<<<<
 *         self.tile_count_y = tile_count_y
 *         self.tile_size_x = tile_size_x
 */
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_tile_count_x); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3285, __pyx_L1_error)
  __pyx_v_self->tile_count_x = __pyx_t_6;

  /* "cgl_wrapper.pyx":3286
 *         self.c_tilemap = CGL_tilemap_create(tile_count_x, tile_count_y, tile_size_x, tile_size_y, ssbo_binding)
 *         self.tile_count_x = tile_count_x
 *         self.tile_count_y = tile_count_y             # <<<<<<<<<<<<<<
 *         self.tile_size_x = tile_size_x
 *         self.tile_size_y = tile_size_y
 */
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_tile_count_y); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3286, __pyx_L1_error)
  __pyx_v_self->tile_count_y = __pyx_t_6;

  /* "cgl_wrapper.pyx":3287
 *         self.tile_count_x = tile_count_x
 *         self.tile_count_y = tile_count_y
 *         self.tile_size_x = tile_size_x             # <<<<<<<<<<<<<<
 *         self.tile_size_y = tile_size_y
 *         self.ssbo_binding = ssbo_binding
 */
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_tile_size_x); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3287, __pyx_L1_error)
  __pyx_v_self->tile_size_x = __pyx_t_6;

  /* "cgl_wrapper.pyx":3288
 *         self.tile_count_y = tile_count_y
 *         self.tile_size_x = tile_size_x
 *         self.tile_size_y = tile_size_y             # <<<<<<<<<<<<<<
 *         self.ssbo_binding = ssbo_binding
 * 
 */
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_tile_size_y); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3288, __pyx_L1_error)
  __pyx_v_self->tile_size_y = __pyx_t_6;

  /* "cgl_wrapper.pyx":3289
 *         self.tile_size_x = tile_size_x
 *         self.tile_size_y = tile_size_y
 *         self.ssbo_binding = ssbo_binding             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_v_ssbo_binding); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3289, __pyx_L1_error)
  __pyx_v_self->ssbo_binding = __pyx_t_6;

  /* "cgl_wrapper.pyx":3283
 *         self.set_auto_upload(auto_upload)
 * 
 *     def __init__(self, tile_count_x: int, tile_count_y: int, tile_size_x: int, tile_size_y: int, ssbo_binding: int):             # <<<<<<<<<<<<<<
 *         self.c_tilemap = CGL_tilemap_create(tile_count_x, tile_count_y, tile_size_x, tile_size_y, ssbo_binding)
 *         self.tile_count_x = tile_count_x
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.tilemap.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3291
 *         self.ssbo_binding = ssbo_binding
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_destroy(self.c_tilemap)
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_7tilemap_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_7tilemap_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_7tilemap_2__dealloc__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_7tilemap_2__dealloc__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":3292
 * 
 *     def __dealloc__(self):
 *         CGL_tilemap_destroy(self.c_tilemap)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  CGL_tilemap_destroy(__pyx_v_self->c_tilemap);

  /* "cgl_wrapper.pyx":3291
 *         self.ssbo_binding = ssbo_binding
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_destroy(self.c_tilemap)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":3294
 *         CGL_tilemap_destroy(self.c_tilemap)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"tilemap({self.tile_count_x}, {self.tile_count_y}, {self.tile_size_x}, {self.tile_size_y}, {self.ssbo_binding})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_5__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_5__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_4__repr__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_4__repr__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":3295
 * 
 *     def __repr__(self):
 *         return f"tilemap({self.tile_count_x}, {self.tile_count_y}, {self.tile_size_x}, {self.tile_size_y}, {self.ssbo_binding})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_tilemap);
  __pyx_t_2 += 8;
  __Pyx_GIVEREF(__pyx_kp_u_tilemap);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_tilemap);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->tile_count_x, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->tile_count_y, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->tile_size_x, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->tile_size_y, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->ssbo_binding, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3295, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3294
 *         CGL_tilemap_destroy(self.c_tilemap)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"tilemap({self.tile_count_x}, {self.tile_count_y}, {self.tile_size_x}, {self.tile_size_y}, {self.ssbo_binding})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.tilemap.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3297
 *         return f"tilemap({self.tile_count_x}, {self.tile_count_y}, {self.tile_size_x}, {self.tile_size_y}, {self.ssbo_binding})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"tilemap({self.tile_count_x}, {self.tile_count_y}, {self.tile_size_x}, {self.tile_size_y}, {self.ssbo_binding})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_7__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_7__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_6__str__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_6__str__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":3298
 * 
 *     def __str__(self):
 *         return f"tilemap({self.tile_count_x}, {self.tile_count_y}, {self.tile_size_x}, {self.tile_size_y}, {self.ssbo_binding})"             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_tilemap);
  __pyx_t_2 += 8;
  __Pyx_GIVEREF(__pyx_kp_u_tilemap);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_tilemap);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->tile_count_x, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->tile_count_y, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->tile_size_x, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->tile_size_y, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__3);
  __pyx_t_2 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__3);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__3);
  __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->ssbo_binding, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 11, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3298, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3297
 *         return f"tilemap({self.tile_count_x}, {self.tile_count_y}, {self.tile_size_x}, {self.tile_size_y}, {self.ssbo_binding})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"tilemap({self.tile_count_x}, {self.tile_count_y}, {self.tile_size_x}, {self.tile_size_y}, {self.ssbo_binding})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.tilemap.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3300
 *         return f"tilemap({self.tile_count_x}, {self.tile_count_y}, {self.tile_size_x}, {self.tile_size_y}, {self.ssbo_binding})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(<void*>self.c_tilemap, sizeof(CGL_tilemap*))
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_7tilemap_9__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_7tilemap_9__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_8__hash__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_7tilemap_8__hash__(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":3301
 * 
 *     def __hash__(self):
 *         return CGL_utils_super_fast_hash(<void*>self.c_tilemap, sizeof(CGL_tilemap*))             # <<<<<<<<<<<<<<
 * 
 *     def set_auto_upload(self, auto_upload: bool):
 */
  __pyx_r = CGL_utils_super_fast_hash(((void *)__pyx_v_self->c_tilemap), (sizeof(struct CGL_tilemap *)));
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3300
 *         return f"tilemap({self.tile_count_x}, {self.tile_count_y}, {self.tile_size_x}, {self.tile_size_y}, {self.ssbo_binding})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return CGL_utils_super_fast_hash(<void*>self.c_tilemap, sizeof(CGL_tilemap*))
 * 
 */

  /* function exit code */
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3303
 *         return CGL_utils_super_fast_hash(<void*>self.c_tilemap, sizeof(CGL_tilemap*))
 * 
 *     def set_auto_upload(self, auto_upload: bool):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_auto_upload(self.c_tilemap, auto_upload)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_11set_auto_upload(PyObject *__pyx_v_self, PyObject *__pyx_arg_auto_upload); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_11set_auto_upload(PyObject *__pyx_v_self, PyObject *__pyx_arg_auto_upload) {
  bool __pyx_v_auto_upload;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_auto_upload (wrapper)", 0);
  assert(__pyx_arg_auto_upload); {
    __pyx_v_auto_upload = __Pyx_PyObject_IsTrue(__pyx_arg_auto_upload); if (unlikely((__pyx_v_auto_upload == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3303, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.tilemap.set_auto_upload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7tilemap_10set_auto_upload(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), ((bool)__pyx_v_auto_upload));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_10set_auto_upload(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, bool __pyx_v_auto_upload) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_auto_upload", 0);

  /* "cgl_wrapper.pyx":3304
 * 
 *     def set_auto_upload(self, auto_upload: bool):
 *         CGL_tilemap_set_auto_upload(self.c_tilemap, auto_upload)             # <<<<<<<<<<<<<<
 * 
 *     def get_auto_upload(self) -> bool:
 */
  CGL_tilemap_set_auto_upload(__pyx_v_self->c_tilemap, __pyx_v_auto_upload);

  /* "cgl_wrapper.pyx":3303
 *         return CGL_utils_super_fast_hash(<void*>self.c_tilemap, sizeof(CGL_tilemap*))
 * 
 *     def set_auto_upload(self, auto_upload: bool):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_auto_upload(self.c_tilemap, auto_upload)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3306
 *         CGL_tilemap_set_auto_upload(self.c_tilemap, auto_upload)
 * 
 *     def get_auto_upload(self) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_tilemap_get_auto_upload(self.c_tilemap)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_13get_auto_upload(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_13get_auto_upload(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_auto_upload (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_12get_auto_upload(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_12get_auto_upload(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_auto_upload", 0);

  /* "cgl_wrapper.pyx":3307
 * 
 *     def get_auto_upload(self) -> bool:
 *         return CGL_tilemap_get_auto_upload(self.c_tilemap)             # <<<<<<<<<<<<<<
 * 
 *     def upload(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_tilemap_get_auto_upload(__pyx_v_self->c_tilemap)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3306
 *         CGL_tilemap_set_auto_upload(self.c_tilemap, auto_upload)
 * 
 *     def get_auto_upload(self) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_tilemap_get_auto_upload(self.c_tilemap)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.tilemap.get_auto_upload", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3309
 *         return CGL_tilemap_get_auto_upload(self.c_tilemap)
 * 
 *     def upload(self):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_upload(self.c_tilemap)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_15upload(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_15upload(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upload (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_14upload(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_14upload(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("upload", 0);

  /* "cgl_wrapper.pyx":3310
 * 
 *     def upload(self):
 *         CGL_tilemap_upload(self.c_tilemap)             # <<<<<<<<<<<<<<
 * 
 *     def set_tile_color(self, tile_x: int, tile_y: int, r: float, g: float, b: float):
 */
  (void)(CGL_tilemap_upload(__pyx_v_self->c_tilemap));

  /* "cgl_wrapper.pyx":3309
 *         return CGL_tilemap_get_auto_upload(self.c_tilemap)
 * 
 *     def upload(self):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_upload(self.c_tilemap)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3312
 *         CGL_tilemap_upload(self.c_tilemap)
 * 
 *     def set_tile_color(self, tile_x: int, tile_y: int, r: float, g: float, b: float):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_tile_color(self.c_tilemap, tile_x, tile_y, r, g, b)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_17set_tile_color(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_17set_tile_color(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tile_x = 0;
  PyObject *__pyx_v_tile_y = 0;
  double __pyx_v_r;
  double __pyx_v_g;
  double __pyx_v_b;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_tile_color (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tile_x,&__pyx_n_s_tile_y,&__pyx_n_s_r,&__pyx_n_s_g,&__pyx_n_s_b,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_color", 1, 5, 5, 1); __PYX_ERR(0, 3312, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_color", 1, 5, 5, 2); __PYX_ERR(0, 3312, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_color", 1, 5, 5, 3); __PYX_ERR(0, 3312, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_color", 1, 5, 5, 4); __PYX_ERR(0, 3312, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_tile_color") < 0)) __PYX_ERR(0, 3312, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_tile_x = values[0];
    __pyx_v_tile_y = values[1];
    __pyx_v_r = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3312, __pyx_L3_error)
    __pyx_v_g = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_g == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3312, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3312, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_tile_color", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3312, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.tilemap.set_tile_color", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7tilemap_16set_tile_color(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), __pyx_v_tile_x, __pyx_v_tile_y, __pyx_v_r, __pyx_v_g, __pyx_v_b);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_16set_tile_color(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_tile_x, PyObject *__pyx_v_tile_y, double __pyx_v_r, double __pyx_v_g, double __pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  uint32_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_tile_color", 0);

  /* "cgl_wrapper.pyx":3313
 * 
 *     def set_tile_color(self, tile_x: int, tile_y: int, r: float, g: float, b: float):
 *         CGL_tilemap_set_tile_color(self.c_tilemap, tile_x, tile_y, r, g, b)             # <<<<<<<<<<<<<<
 * 
 *     def set_tile_texture_from_array(self, tile_x: int, tile_y: int, texture_index: int):
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_x); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3313, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_y); if (unlikely((__pyx_t_2 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3313, __pyx_L1_error)
  CGL_tilemap_set_tile_color(__pyx_v_self->c_tilemap, __pyx_t_1, __pyx_t_2, __pyx_v_r, __pyx_v_g, __pyx_v_b);

  /* "cgl_wrapper.pyx":3312
 *         CGL_tilemap_upload(self.c_tilemap)
 * 
 *     def set_tile_color(self, tile_x: int, tile_y: int, r: float, g: float, b: float):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_tile_color(self.c_tilemap, tile_x, tile_y, r, g, b)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.tilemap.set_tile_color", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3315
 *         CGL_tilemap_set_tile_color(self.c_tilemap, tile_x, tile_y, r, g, b)
 * 
 *     def set_tile_texture_from_array(self, tile_x: int, tile_y: int, texture_index: int):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_tile_texture_from_array(self.c_tilemap, tile_x, tile_y, texture_index)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_19set_tile_texture_from_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_19set_tile_texture_from_array(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tile_x = 0;
  PyObject *__pyx_v_tile_y = 0;
  PyObject *__pyx_v_texture_index = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_tile_texture_from_array (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tile_x,&__pyx_n_s_tile_y,&__pyx_n_s_texture_index,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_texture_from_array", 1, 3, 3, 1); __PYX_ERR(0, 3315, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_index)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_texture_from_array", 1, 3, 3, 2); __PYX_ERR(0, 3315, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_tile_texture_from_array") < 0)) __PYX_ERR(0, 3315, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_tile_x = values[0];
    __pyx_v_tile_y = values[1];
    __pyx_v_texture_index = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_tile_texture_from_array", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3315, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.tilemap.set_tile_texture_from_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7tilemap_18set_tile_texture_from_array(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), __pyx_v_tile_x, __pyx_v_tile_y, __pyx_v_texture_index);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_18set_tile_texture_from_array(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_tile_x, PyObject *__pyx_v_tile_y, PyObject *__pyx_v_texture_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  uint32_t __pyx_t_2;
  uint32_t __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_tile_texture_from_array", 0);

  /* "cgl_wrapper.pyx":3316
 * 
 *     def set_tile_texture_from_array(self, tile_x: int, tile_y: int, texture_index: int):
 *         CGL_tilemap_set_tile_texture_from_array(self.c_tilemap, tile_x, tile_y, texture_index)             # <<<<<<<<<<<<<<
 * 
 *     def set_tile_texture_from_tileset(self, tile_x: int, tile_y: int, texture_x_min: float, texture_y_min: float, texture_x_max: float, texture_y_max: float):
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_x); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3316, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_y); if (unlikely((__pyx_t_2 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3316, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_uint32_t(__pyx_v_texture_index); if (unlikely((__pyx_t_3 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3316, __pyx_L1_error)
  CGL_tilemap_set_tile_texture_from_array(__pyx_v_self->c_tilemap, __pyx_t_1, __pyx_t_2, __pyx_t_3);

  /* "cgl_wrapper.pyx":3315
 *         CGL_tilemap_set_tile_color(self.c_tilemap, tile_x, tile_y, r, g, b)
 * 
 *     def set_tile_texture_from_array(self, tile_x: int, tile_y: int, texture_index: int):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_tile_texture_from_array(self.c_tilemap, tile_x, tile_y, texture_index)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.tilemap.set_tile_texture_from_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3318
 *         CGL_tilemap_set_tile_texture_from_array(self.c_tilemap, tile_x, tile_y, texture_index)
 * 
 *     def set_tile_texture_from_tileset(self, tile_x: int, tile_y: int, texture_x_min: float, texture_y_min: float, texture_x_max: float, texture_y_max: float):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_tile_texture_from_tileset(self.c_tilemap, tile_x, tile_y, texture_x_min, texture_y_min, texture_x_max, texture_y_max)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_21set_tile_texture_from_tileset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_21set_tile_texture_from_tileset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tile_x = 0;
  PyObject *__pyx_v_tile_y = 0;
  double __pyx_v_texture_x_min;
  double __pyx_v_texture_y_min;
  double __pyx_v_texture_x_max;
  double __pyx_v_texture_y_max;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_tile_texture_from_tileset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tile_x,&__pyx_n_s_tile_y,&__pyx_n_s_texture_x_min,&__pyx_n_s_texture_y_min,&__pyx_n_s_texture_x_max,&__pyx_n_s_texture_y_max,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_texture_from_tileset", 1, 6, 6, 1); __PYX_ERR(0, 3318, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_x_min)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_texture_from_tileset", 1, 6, 6, 2); __PYX_ERR(0, 3318, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_y_min)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_texture_from_tileset", 1, 6, 6, 3); __PYX_ERR(0, 3318, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_x_max)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_texture_from_tileset", 1, 6, 6, 4); __PYX_ERR(0, 3318, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_y_max)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_tile_texture_from_tileset", 1, 6, 6, 5); __PYX_ERR(0, 3318, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_tile_texture_from_tileset") < 0)) __PYX_ERR(0, 3318, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_tile_x = values[0];
    __pyx_v_tile_y = values[1];
    __pyx_v_texture_x_min = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_texture_x_min == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3318, __pyx_L3_error)
    __pyx_v_texture_y_min = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_texture_y_min == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3318, __pyx_L3_error)
    __pyx_v_texture_x_max = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_texture_x_max == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3318, __pyx_L3_error)
    __pyx_v_texture_y_max = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_texture_y_max == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3318, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_tile_texture_from_tileset", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3318, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.tilemap.set_tile_texture_from_tileset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7tilemap_20set_tile_texture_from_tileset(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), __pyx_v_tile_x, __pyx_v_tile_y, __pyx_v_texture_x_min, __pyx_v_texture_y_min, __pyx_v_texture_x_max, __pyx_v_texture_y_max);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_20set_tile_texture_from_tileset(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_tile_x, PyObject *__pyx_v_tile_y, double __pyx_v_texture_x_min, double __pyx_v_texture_y_min, double __pyx_v_texture_x_max, double __pyx_v_texture_y_max) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  uint32_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_tile_texture_from_tileset", 0);

  /* "cgl_wrapper.pyx":3319
 * 
 *     def set_tile_texture_from_tileset(self, tile_x: int, tile_y: int, texture_x_min: float, texture_y_min: float, texture_x_max: float, texture_y_max: float):
 *         CGL_tilemap_set_tile_texture_from_tileset(self.c_tilemap, tile_x, tile_y, texture_x_min, texture_y_min, texture_x_max, texture_y_max)             # <<<<<<<<<<<<<<
 * 
 *     def set_all_tile_color(self, r: float, g: float, b: float):
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_x); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3319, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_y); if (unlikely((__pyx_t_2 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3319, __pyx_L1_error)
  CGL_tilemap_set_tile_texture_from_tileset(__pyx_v_self->c_tilemap, __pyx_t_1, __pyx_t_2, __pyx_v_texture_x_min, __pyx_v_texture_y_min, __pyx_v_texture_x_max, __pyx_v_texture_y_max);

  /* "cgl_wrapper.pyx":3318
 *         CGL_tilemap_set_tile_texture_from_array(self.c_tilemap, tile_x, tile_y, texture_index)
 * 
 *     def set_tile_texture_from_tileset(self, tile_x: int, tile_y: int, texture_x_min: float, texture_y_min: float, texture_x_max: float, texture_y_max: float):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_tile_texture_from_tileset(self.c_tilemap, tile_x, tile_y, texture_x_min, texture_y_min, texture_x_max, texture_y_max)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.tilemap.set_tile_texture_from_tileset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3321
 *         CGL_tilemap_set_tile_texture_from_tileset(self.c_tilemap, tile_x, tile_y, texture_x_min, texture_y_min, texture_x_max, texture_y_max)
 * 
 *     def set_all_tile_color(self, r: float, g: float, b: float):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_all_tile_color(self.c_tilemap, r, g, b)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_23set_all_tile_color(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_23set_all_tile_color(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_r;
  double __pyx_v_g;
  double __pyx_v_b;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_all_tile_color (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_r,&__pyx_n_s_g,&__pyx_n_s_b,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_all_tile_color", 1, 3, 3, 1); __PYX_ERR(0, 3321, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_all_tile_color", 1, 3, 3, 2); __PYX_ERR(0, 3321, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_all_tile_color") < 0)) __PYX_ERR(0, 3321, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_r = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3321, __pyx_L3_error)
    __pyx_v_g = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_g == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3321, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3321, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_all_tile_color", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3321, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.tilemap.set_all_tile_color", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7tilemap_22set_all_tile_color(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), __pyx_v_r, __pyx_v_g, __pyx_v_b);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_22set_all_tile_color(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, double __pyx_v_r, double __pyx_v_g, double __pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_all_tile_color", 0);

  /* "cgl_wrapper.pyx":3322
 * 
 *     def set_all_tile_color(self, r: float, g: float, b: float):
 *         CGL_tilemap_set_all_tile_color(self.c_tilemap, r, g, b)             # <<<<<<<<<<<<<<
 * 
 *     def set_all_tile_texture_from_array(self, texture_index: int):
 */
  CGL_tilemap_set_all_tile_color(__pyx_v_self->c_tilemap, __pyx_v_r, __pyx_v_g, __pyx_v_b);

  /* "cgl_wrapper.pyx":3321
 *         CGL_tilemap_set_tile_texture_from_tileset(self.c_tilemap, tile_x, tile_y, texture_x_min, texture_y_min, texture_x_max, texture_y_max)
 * 
 *     def set_all_tile_color(self, r: float, g: float, b: float):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_all_tile_color(self.c_tilemap, r, g, b)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3324
 *         CGL_tilemap_set_all_tile_color(self.c_tilemap, r, g, b)
 * 
 *     def set_all_tile_texture_from_array(self, texture_index: int):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_all_tile_texture_from_array(self.c_tilemap, texture_index)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_25set_all_tile_texture_from_array(PyObject *__pyx_v_self, PyObject *__pyx_v_texture_index); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_25set_all_tile_texture_from_array(PyObject *__pyx_v_self, PyObject *__pyx_v_texture_index) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_all_tile_texture_from_array (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_24set_all_tile_texture_from_array(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), ((PyObject *)__pyx_v_texture_index));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_24set_all_tile_texture_from_array(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_texture_index) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_all_tile_texture_from_array", 0);

  /* "cgl_wrapper.pyx":3325
 * 
 *     def set_all_tile_texture_from_array(self, texture_index: int):
 *         CGL_tilemap_set_all_tile_texture_from_array(self.c_tilemap, texture_index)             # <<<<<<<<<<<<<<
 * 
 *     def set_all_tile_texture_from_tileset(self, texture_x_min: float, texture_y_min: float, texture_x_max: float, texture_y_max: float):
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint32_t(__pyx_v_texture_index); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3325, __pyx_L1_error)
  CGL_tilemap_set_all_tile_texture_from_array(__pyx_v_self->c_tilemap, __pyx_t_1);

  /* "cgl_wrapper.pyx":3324
 *         CGL_tilemap_set_all_tile_color(self.c_tilemap, r, g, b)
 * 
 *     def set_all_tile_texture_from_array(self, texture_index: int):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_all_tile_texture_from_array(self.c_tilemap, texture_index)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.tilemap.set_all_tile_texture_from_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3327
 *         CGL_tilemap_set_all_tile_texture_from_array(self.c_tilemap, texture_index)
 * 
 *     def set_all_tile_texture_from_tileset(self, texture_x_min: float, texture_y_min: float, texture_x_max: float, texture_y_max: float):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_all_tile_texture_from_tileset(self.c_tilemap, texture_x_min, texture_y_min, texture_x_max, texture_y_max)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_27set_all_tile_texture_from_tileset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_27set_all_tile_texture_from_tileset(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_texture_x_min;
  double __pyx_v_texture_y_min;
  double __pyx_v_texture_x_max;
  double __pyx_v_texture_y_max;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_all_tile_texture_from_tileset (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_texture_x_min,&__pyx_n_s_texture_y_min,&__pyx_n_s_texture_x_max,&__pyx_n_s_texture_y_max,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_x_min)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_y_min)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_all_tile_texture_from_tileset", 1, 4, 4, 1); __PYX_ERR(0, 3327, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_x_max)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_all_tile_texture_from_tileset", 1, 4, 4, 2); __PYX_ERR(0, 3327, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_texture_y_max)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_all_tile_texture_from_tileset", 1, 4, 4, 3); __PYX_ERR(0, 3327, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_all_tile_texture_from_tileset") < 0)) __PYX_ERR(0, 3327, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_texture_x_min = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_texture_x_min == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3327, __pyx_L3_error)
    __pyx_v_texture_y_min = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_texture_y_min == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3327, __pyx_L3_error)
    __pyx_v_texture_x_max = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_texture_x_max == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3327, __pyx_L3_error)
    __pyx_v_texture_y_max = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_texture_y_max == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3327, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_all_tile_texture_from_tileset", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3327, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.tilemap.set_all_tile_texture_from_tileset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7tilemap_26set_all_tile_texture_from_tileset(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), __pyx_v_texture_x_min, __pyx_v_texture_y_min, __pyx_v_texture_x_max, __pyx_v_texture_y_max);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_26set_all_tile_texture_from_tileset(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, double __pyx_v_texture_x_min, double __pyx_v_texture_y_min, double __pyx_v_texture_x_max, double __pyx_v_texture_y_max) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_all_tile_texture_from_tileset", 0);

  /* "cgl_wrapper.pyx":3328
 * 
 *     def set_all_tile_texture_from_tileset(self, texture_x_min: float, texture_y_min: float, texture_x_max: float, texture_y_max: float):
 *         CGL_tilemap_set_all_tile_texture_from_tileset(self.c_tilemap, texture_x_min, texture_y_min, texture_x_max, texture_y_max)             # <<<<<<<<<<<<<<
 * 
 *     def clear_tile(self, tile_x: int, tile_y: int):
 */
  CGL_tilemap_set_all_tile_texture_from_tileset(__pyx_v_self->c_tilemap, __pyx_v_texture_x_min, __pyx_v_texture_y_min, __pyx_v_texture_x_max, __pyx_v_texture_y_max);

  /* "cgl_wrapper.pyx":3327
 *         CGL_tilemap_set_all_tile_texture_from_array(self.c_tilemap, texture_index)
 * 
 *     def set_all_tile_texture_from_tileset(self, texture_x_min: float, texture_y_min: float, texture_x_max: float, texture_y_max: float):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_set_all_tile_texture_from_tileset(self.c_tilemap, texture_x_min, texture_y_min, texture_x_max, texture_y_max)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3330
 *         CGL_tilemap_set_all_tile_texture_from_tileset(self.c_tilemap, texture_x_min, texture_y_min, texture_x_max, texture_y_max)
 * 
 *     def clear_tile(self, tile_x: int, tile_y: int):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_clear_tile(self.c_tilemap, tile_x, tile_y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_29clear_tile(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_29clear_tile(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_tile_x = 0;
  PyObject *__pyx_v_tile_y = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear_tile (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tile_x,&__pyx_n_s_tile_y,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tile_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("clear_tile", 1, 2, 2, 1); __PYX_ERR(0, 3330, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clear_tile") < 0)) __PYX_ERR(0, 3330, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_tile_x = values[0];
    __pyx_v_tile_y = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("clear_tile", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3330, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.tilemap.clear_tile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7tilemap_28clear_tile(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), __pyx_v_tile_x, __pyx_v_tile_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_28clear_tile(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, PyObject *__pyx_v_tile_x, PyObject *__pyx_v_tile_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  uint32_t __pyx_t_1;
  uint32_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clear_tile", 0);

  /* "cgl_wrapper.pyx":3331
 * 
 *     def clear_tile(self, tile_x: int, tile_y: int):
 *         CGL_tilemap_clear_tile(self.c_tilemap, tile_x, tile_y)             # <<<<<<<<<<<<<<
 * 
 *     def clear_all_tile(self):
 */
  __pyx_t_1 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_x); if (unlikely((__pyx_t_1 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3331, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_uint32_t(__pyx_v_tile_y); if (unlikely((__pyx_t_2 == ((uint32_t)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3331, __pyx_L1_error)
  CGL_tilemap_clear_tile(__pyx_v_self->c_tilemap, __pyx_t_1, __pyx_t_2);

  /* "cgl_wrapper.pyx":3330
 *         CGL_tilemap_set_all_tile_texture_from_tileset(self.c_tilemap, texture_x_min, texture_y_min, texture_x_max, texture_y_max)
 * 
 *     def clear_tile(self, tile_x: int, tile_y: int):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_clear_tile(self.c_tilemap, tile_x, tile_y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.tilemap.clear_tile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3333
 *         CGL_tilemap_clear_tile(self.c_tilemap, tile_x, tile_y)
 * 
 *     def clear_all_tile(self):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_clear_all_tile(self.c_tilemap)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_31clear_all_tile(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_31clear_all_tile(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear_all_tile (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_30clear_all_tile(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_30clear_all_tile(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("clear_all_tile", 0);

  /* "cgl_wrapper.pyx":3334
 * 
 *     def clear_all_tile(self):
 *         CGL_tilemap_clear_all_tile(self.c_tilemap)             # <<<<<<<<<<<<<<
 * 
 *     def render(self, scale_x: float, scale_y: float, offset_x: float, offset_y: float, tex: texture = None):
 */
  CGL_tilemap_clear_all_tile(__pyx_v_self->c_tilemap);

  /* "cgl_wrapper.pyx":3333
 *         CGL_tilemap_clear_tile(self.c_tilemap, tile_x, tile_y)
 * 
 *     def clear_all_tile(self):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_clear_all_tile(self.c_tilemap)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3336
 *         CGL_tilemap_clear_all_tile(self.c_tilemap)
 * 
 *     def render(self, scale_x: float, scale_y: float, offset_x: float, offset_y: float, tex: texture = None):             # <<<<<<<<<<<<<<
 *         cdef CGL_texture* c_tex = NULL
 *         if tex is not None:
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_33render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_33render(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_scale_x;
  double __pyx_v_scale_y;
  double __pyx_v_offset_x;
  double __pyx_v_offset_y;
  struct __pyx_obj_3cgl_texture *__pyx_v_tex = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("render (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_scale_x,&__pyx_n_s_scale_y,&__pyx_n_s_offset_x,&__pyx_n_s_offset_y,&__pyx_n_s_tex,0};
    PyObject* values[5] = {0,0,0,0,0};
    values[4] = (PyObject *)((struct __pyx_obj_3cgl_texture *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("render", 0, 4, 5, 1); __PYX_ERR(0, 3336, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("render", 0, 4, 5, 2); __PYX_ERR(0, 3336, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("render", 0, 4, 5, 3); __PYX_ERR(0, 3336, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tex);
          if (value) { values[4] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "render") < 0)) __PYX_ERR(0, 3336, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_scale_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_scale_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3336, __pyx_L3_error)
    __pyx_v_scale_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_scale_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3336, __pyx_L3_error)
    __pyx_v_offset_x = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_offset_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3336, __pyx_L3_error)
    __pyx_v_offset_y = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_offset_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3336, __pyx_L3_error)
    __pyx_v_tex = ((struct __pyx_obj_3cgl_texture *)values[4]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("render", 0, 4, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3336, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.tilemap.render", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tex), __pyx_ptype_3cgl_texture, 1, "tex", 0))) __PYX_ERR(0, 3336, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7tilemap_32render(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), __pyx_v_scale_x, __pyx_v_scale_y, __pyx_v_offset_x, __pyx_v_offset_y, __pyx_v_tex);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_32render(struct __pyx_obj_3cgl_tilemap *__pyx_v_self, double __pyx_v_scale_x, double __pyx_v_scale_y, double __pyx_v_offset_x, double __pyx_v_offset_y, struct __pyx_obj_3cgl_texture *__pyx_v_tex) {
  struct CGL_texture *__pyx_v_c_tex;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  struct CGL_texture *__pyx_t_3;
  __Pyx_RefNannySetupContext("render", 0);

  /* "cgl_wrapper.pyx":3337
 * 
 *     def render(self, scale_x: float, scale_y: float, offset_x: float, offset_y: float, tex: texture = None):
 *         cdef CGL_texture* c_tex = NULL             # <<<<<<<<<<<<<<
 *         if tex is not None:
 *             c_tex = tex.c_texture
 */
  __pyx_v_c_tex = NULL;

  /* "cgl_wrapper.pyx":3338
 *     def render(self, scale_x: float, scale_y: float, offset_x: float, offset_y: float, tex: texture = None):
 *         cdef CGL_texture* c_tex = NULL
 *         if tex is not None:             # <<<<<<<<<<<<<<
 *             c_tex = tex.c_texture
 *         CGL_tilemap_render(self.c_tilemap, scale_x, scale_y, offset_x, offset_y, c_tex)
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_tex) != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "cgl_wrapper.pyx":3339
 *         cdef CGL_texture* c_tex = NULL
 *         if tex is not None:
 *             c_tex = tex.c_texture             # <<<<<<<<<<<<<<
 *         CGL_tilemap_render(self.c_tilemap, scale_x, scale_y, offset_x, offset_y, c_tex)
 * 
 */
    __pyx_t_3 = __pyx_v_tex->c_texture;
    __pyx_v_c_tex = __pyx_t_3;

    /* "cgl_wrapper.pyx":3338
 *     def render(self, scale_x: float, scale_y: float, offset_x: float, offset_y: float, tex: texture = None):
 *         cdef CGL_texture* c_tex = NULL
 *         if tex is not None:             # <<<<<<<<<<<<<<
 *             c_tex = tex.c_texture
 *         CGL_tilemap_render(self.c_tilemap, scale_x, scale_y, offset_x, offset_y, c_tex)
 */
  }

  /* "cgl_wrapper.pyx":3340
 *         if tex is not None:
 *             c_tex = tex.c_texture
 *         CGL_tilemap_render(self.c_tilemap, scale_x, scale_y, offset_x, offset_y, c_tex)             # <<<<<<<<<<<<<<
 * 
 *     def reset(self):
 */
  CGL_tilemap_render(__pyx_v_self->c_tilemap, __pyx_v_scale_x, __pyx_v_scale_y, __pyx_v_offset_x, __pyx_v_offset_y, __pyx_v_c_tex);

  /* "cgl_wrapper.pyx":3336
 *         CGL_tilemap_clear_all_tile(self.c_tilemap)
 * 
 *     def render(self, scale_x: float, scale_y: float, offset_x: float, offset_y: float, tex: texture = None):             # <<<<<<<<<<<<<<
 *         cdef CGL_texture* c_tex = NULL
 *         if tex is not None:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3342
 *         CGL_tilemap_render(self.c_tilemap, scale_x, scale_y, offset_x, offset_y, c_tex)
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_reset(self.c_tilemap)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_35reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_35reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_34reset(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_34reset(struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("reset", 0);

  /* "cgl_wrapper.pyx":3343
 * 
 *     def reset(self):
 *         CGL_tilemap_reset(self.c_tilemap)             # <<<<<<<<<<<<<<
 * 
 * cdef class font_character:
 */
  CGL_tilemap_reset(__pyx_v_self->c_tilemap);

  /* "cgl_wrapper.pyx":3342
 *         CGL_tilemap_render(self.c_tilemap, scale_x, scale_y, offset_x, offset_y, c_tex)
 * 
 *     def reset(self):             # <<<<<<<<<<<<<<
 *         CGL_tilemap_reset(self.c_tilemap)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_37__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_37__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_36__reduce_cython__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_36__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_tilemap *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__76, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.tilemap.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7tilemap_39__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_7tilemap_39__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7tilemap_38__setstate_cython__(((struct __pyx_obj_3cgl_tilemap *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7tilemap_38__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_tilemap *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__77, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.tilemap.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3349
 * 
 *     @property
 *     def size(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.size.x, self.c_font_character.size.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_4size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_4size___get__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_4size___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3350
 *     @property
 *     def size(self) -> vec2:
 *         return vec2(self.c_font_character.size.x, self.c_font_character.size.y)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_font_character.size.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_font_character.size.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3349
 * 
 *     @property
 *     def size(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.size.x, self.c_font_character.size.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.font_character.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3353
 * 
 *     @property
 *     def bearing(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.bearing.x, self.c_font_character.bearing.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_7bearing_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_7bearing_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_7bearing___get__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_7bearing___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3354
 *     @property
 *     def bearing(self) -> vec2:
 *         return vec2(self.c_font_character.bearing.x, self.c_font_character.bearing.y)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_font_character.bearing.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_font_character.bearing.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3353
 * 
 *     @property
 *     def bearing(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.bearing.x, self.c_font_character.bearing.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.font_character.bearing.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3357
 * 
 *     @property
 *     def advance(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.advance.x, self.c_font_character.advance.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_7advance_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_7advance_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_7advance___get__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_7advance___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3358
 *     @property
 *     def advance(self) -> vec2:
 *         return vec2(self.c_font_character.advance.x, self.c_font_character.advance.y)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_font_character.advance.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_font_character.advance.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3357
 * 
 *     @property
 *     def advance(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.advance.x, self.c_font_character.advance.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.font_character.advance.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3361
 * 
 *     @property
 *     def normalized_size(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.normalized_size.x, self.c_font_character.normalized_size.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_15normalized_size_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_15normalized_size_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_15normalized_size___get__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_15normalized_size___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3362
 *     @property
 *     def normalized_size(self) -> vec2:
 *         return vec2(self.c_font_character.normalized_size.x, self.c_font_character.normalized_size.y)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_font_character.normalized_size.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_font_character.normalized_size.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3361
 * 
 *     @property
 *     def normalized_size(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.normalized_size.x, self.c_font_character.normalized_size.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.font_character.normalized_size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3365
 * 
 *     @property
 *     def normalized_offset(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.normalized_offset.x, self.c_font_character.normalized_offset.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_17normalized_offset_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_17normalized_offset_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_17normalized_offset___get__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_17normalized_offset___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3366
 *     @property
 *     def normalized_offset(self) -> vec2:
 *         return vec2(self.c_font_character.normalized_offset.x, self.c_font_character.normalized_offset.y)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_font_character.normalized_offset.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_font_character.normalized_offset.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3365
 * 
 *     @property
 *     def normalized_offset(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.normalized_offset.x, self.c_font_character.normalized_offset.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.font_character.normalized_offset.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3369
 * 
 *     @property
 *     def bearing_normalized(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.bearing_normalized.x, self.c_font_character.bearing_normalized.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_18bearing_normalized_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_18bearing_normalized_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_18bearing_normalized___get__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_18bearing_normalized___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3370
 *     @property
 *     def bearing_normalized(self) -> vec2:
 *         return vec2(self.c_font_character.bearing_normalized.x, self.c_font_character.bearing_normalized.y)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_font_character.bearing_normalized.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_font_character.bearing_normalized.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3370, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3369
 * 
 *     @property
 *     def bearing_normalized(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.bearing_normalized.x, self.c_font_character.bearing_normalized.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.font_character.bearing_normalized.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3373
 * 
 *     @property
 *     def advance_normalized(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.advance_normalized.x, self.c_font_character.advance_normalized.y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_18advance_normalized_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_18advance_normalized_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_18advance_normalized___get__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_18advance_normalized___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3374
 *     @property
 *     def advance_normalized(self) -> vec2:
 *         return vec2(self.c_font_character.advance_normalized.x, self.c_font_character.advance_normalized.y)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_font_character.advance_normalized.x); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_font_character.advance_normalized.y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_1 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_3cgl_vec2), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3374, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3373
 * 
 *     @property
 *     def advance_normalized(self) -> vec2:             # <<<<<<<<<<<<<<
 *         return vec2(self.c_font_character.advance_normalized.x, self.c_font_character.advance_normalized.y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.font_character.advance_normalized.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3377
 * 
 *     @property
 *     def character(self) -> char:             # <<<<<<<<<<<<<<
 *         return self.c_font_character.ch
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_9character_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_9character_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_9character___get__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_9character___get__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3378
 *     @property
 *     def character(self) -> char:
 *         return self.c_font_character.ch             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self, CGL_font_character c_font_character):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_char(__pyx_v_self->c_font_character.ch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3378, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3377
 * 
 *     @property
 *     def character(self) -> char:             # <<<<<<<<<<<<<<
 *         return self.c_font_character.ch
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.font_character.character.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3380
 *         return self.c_font_character.ch
 * 
 *     def __init__(self, CGL_font_character c_font_character):             # <<<<<<<<<<<<<<
 *         self.c_font_character = c_font_character
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_14font_character_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_14font_character_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct CGL_font_character __pyx_v_c_font_character;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_c_font_character,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c_font_character)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 3380, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_c_font_character = __pyx_convert__from_py_struct__CGL_font_character(values[0]); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 3380, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3380, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.font_character.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_14font_character___init__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self), __pyx_v_c_font_character);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_14font_character___init__(struct __pyx_obj_3cgl_font_character *__pyx_v_self, struct CGL_font_character __pyx_v_c_font_character) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":3381
 * 
 *     def __init__(self, CGL_font_character c_font_character):
 *         self.c_font_character = c_font_character             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_v_self->c_font_character = __pyx_v_c_font_character;

  /* "cgl_wrapper.pyx":3380
 *         return self.c_font_character.ch
 * 
 *     def __init__(self, CGL_font_character c_font_character):             # <<<<<<<<<<<<<<
 *         self.c_font_character = c_font_character
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3383
 *         self.c_font_character = c_font_character
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"font_character({self.c_font_character})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_2__repr__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_2__repr__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":3384
 * 
 *     def __repr__(self):
 *         return f"font_character({self.c_font_character})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_font_character);
  __pyx_t_2 += 15;
  __Pyx_GIVEREF(__pyx_kp_u_font_character);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_font_character);
  __pyx_t_4 = __pyx_convert__to_py_struct__CGL_font_character(__pyx_v_self->c_font_character); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3384, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3383
 *         self.c_font_character = c_font_character
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"font_character({self.c_font_character})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.font_character.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3386
 *         return f"font_character({self.c_font_character})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"font_character({self.c_font_character})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_4__str__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_4__str__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":3387
 * 
 *     def __str__(self):
 *         return f"font_character({self.c_font_character})"             # <<<<<<<<<<<<<<
 * 
 *     def __hash__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_font_character);
  __pyx_t_2 += 15;
  __Pyx_GIVEREF(__pyx_kp_u_font_character);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_font_character);
  __pyx_t_4 = __pyx_convert__to_py_struct__CGL_font_character(__pyx_v_self->c_font_character); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__4);
  __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3386
 *         return f"font_character({self.c_font_character})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"font_character({self.c_font_character})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.font_character.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3389
 *         return f"font_character({self.c_font_character})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.c_font_character.ch
 * 
 */

/* Python wrapper */
static Py_hash_t __pyx_pw_3cgl_14font_character_7__hash__(PyObject *__pyx_v_self); /*proto*/
static Py_hash_t __pyx_pw_3cgl_14font_character_7__hash__(PyObject *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_6__hash__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_hash_t __pyx_pf_3cgl_14font_character_6__hash__(struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  Py_hash_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__hash__", 0);

  /* "cgl_wrapper.pyx":3390
 * 
 *     def __hash__(self):
 *         return self.c_font_character.ch             # <<<<<<<<<<<<<<
 * 
 * cdef class font:
 */
  __pyx_r = __pyx_v_self->c_font_character.ch;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3389
 *         return f"font_character({self.c_font_character})"
 * 
 *     def __hash__(self):             # <<<<<<<<<<<<<<
 *         return self.c_font_character.ch
 * 
 */

  /* function exit code */
  __pyx_L0:;
  if (unlikely(__pyx_r == -1) && !PyErr_Occurred()) __pyx_r = -2;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_8__reduce_cython__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_font_character *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__78, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.font_character.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_14font_character_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_14font_character_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_14font_character_10__setstate_cython__(((struct __pyx_obj_3cgl_font_character *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_14font_character_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_font_character *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__79, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.font_character.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3397
 *     cdef str meta_data
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_font = NULL
 *         self.has_been_destroyed = True
 */

/* Python wrapper */
static int __pyx_pw_3cgl_4font_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_4font_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_4font___init__(((struct __pyx_obj_3cgl_font *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_4font___init__(struct __pyx_obj_3cgl_font *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":3398
 * 
 *     def __init__(self):
 *         self.c_font = NULL             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = True
 *         self.meta_data = "not_loaded"
 */
  __pyx_v_self->c_font = NULL;

  /* "cgl_wrapper.pyx":3399
 *     def __init__(self):
 *         self.c_font = NULL
 *         self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 *         self.meta_data = "not_loaded"
 * 
 */
  __pyx_v_self->has_been_destroyed = 1;

  /* "cgl_wrapper.pyx":3400
 *         self.c_font = NULL
 *         self.has_been_destroyed = True
 *         self.meta_data = "not_loaded"             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  __Pyx_INCREF(__pyx_n_s_not_loaded);
  __Pyx_GIVEREF(__pyx_n_s_not_loaded);
  __Pyx_GOTREF(__pyx_v_self->meta_data);
  __Pyx_DECREF(__pyx_v_self->meta_data);
  __pyx_v_self->meta_data = __pyx_n_s_not_loaded;

  /* "cgl_wrapper.pyx":3397
 *     cdef str meta_data
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_font = NULL
 *         self.has_been_destroyed = True
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3402
 *         self.meta_data = "not_loaded"
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

/* Python wrapper */
static void __pyx_pw_3cgl_4font_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_3cgl_4font_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_3cgl_4font_2__dealloc__(((struct __pyx_obj_3cgl_font *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_3cgl_4font_2__dealloc__(struct __pyx_obj_3cgl_font *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "cgl_wrapper.pyx":3403
 * 
 *     def __dealloc__(self):
 *         self.destroy()             # <<<<<<<<<<<<<<
 * 
 *     def destroy(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_destroy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
    }
  }
  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3403, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3402
 *         self.meta_data = "not_loaded"
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         self.destroy()
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_WriteUnraisable("cgl.font.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "cgl_wrapper.pyx":3405
 *         self.destroy()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_font_destory(self.c_font)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4font_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4font_5destroy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4font_4destroy(((struct __pyx_obj_3cgl_font *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4font_4destroy(struct __pyx_obj_3cgl_font *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("destroy", 0);

  /* "cgl_wrapper.pyx":3406
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_font_destory(self.c_font)
 *             self.has_been_destroyed = True
 */
  __pyx_t_1 = ((!(__pyx_v_self->has_been_destroyed != 0)) != 0);
  if (__pyx_t_1) {

    /* "cgl_wrapper.pyx":3407
 *     def destroy(self):
 *         if not self.has_been_destroyed:
 *             CGL_font_destory(self.c_font)             # <<<<<<<<<<<<<<
 *             self.has_been_destroyed = True
 *         self.meta_data = "not_loaded"
 */
    CGL_font_destory(__pyx_v_self->c_font);

    /* "cgl_wrapper.pyx":3408
 *         if not self.has_been_destroyed:
 *             CGL_font_destory(self.c_font)
 *             self.has_been_destroyed = True             # <<<<<<<<<<<<<<
 *         self.meta_data = "not_loaded"
 * 
 */
    __pyx_v_self->has_been_destroyed = 1;

    /* "cgl_wrapper.pyx":3406
 * 
 *     def destroy(self):
 *         if not self.has_been_destroyed:             # <<<<<<<<<<<<<<
 *             CGL_font_destory(self.c_font)
 *             self.has_been_destroyed = True
 */
  }

  /* "cgl_wrapper.pyx":3409
 *             CGL_font_destory(self.c_font)
 *             self.has_been_destroyed = True
 *         self.meta_data = "not_loaded"             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_INCREF(__pyx_n_s_not_loaded);
  __Pyx_GIVEREF(__pyx_n_s_not_loaded);
  __Pyx_GOTREF(__pyx_v_self->meta_data);
  __Pyx_DECREF(__pyx_v_self->meta_data);
  __pyx_v_self->meta_data = __pyx_n_s_not_loaded;

  /* "cgl_wrapper.pyx":3405
 *         self.destroy()
 * 
 *     def destroy(self):             # <<<<<<<<<<<<<<
 *         if not self.has_been_destroyed:
 *             CGL_font_destory(self.c_font)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3412
 * 
 * 
 *     def load_from_memory(self, data: bytes):             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 *         self.c_font = CGL_font_load_from_memory(data, len(data))
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4font_7load_from_memory(PyObject *__pyx_v_self, PyObject *__pyx_v_data); /*proto*/
static PyObject *__pyx_pw_3cgl_4font_7load_from_memory(PyObject *__pyx_v_self, PyObject *__pyx_v_data) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load_from_memory (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_data), (&PyBytes_Type), 1, "data", 1))) __PYX_ERR(0, 3412, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4font_6load_from_memory(((struct __pyx_obj_3cgl_font *)__pyx_v_self), ((PyObject*)__pyx_v_data));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4font_6load_from_memory(struct __pyx_obj_3cgl_font *__pyx_v_self, PyObject *__pyx_v_data) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char const *__pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load_from_memory", 0);

  /* "cgl_wrapper.pyx":3413
 * 
 *     def load_from_memory(self, data: bytes):
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 *         self.c_font = CGL_font_load_from_memory(data, len(data))
 *         self.meta_data = "memory_font"
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":3414
 *     def load_from_memory(self, data: bytes):
 *         self.has_been_destroyed = False
 *         self.c_font = CGL_font_load_from_memory(data, len(data))             # <<<<<<<<<<<<<<
 *         self.meta_data = "memory_font"
 * 
 */
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
    __PYX_ERR(0, 3414, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyBytes_AsString(__pyx_v_data); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 3414, __pyx_L1_error)
  if (unlikely(__pyx_v_data == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(0, 3414, __pyx_L1_error)
  }
  __pyx_t_2 = PyBytes_GET_SIZE(__pyx_v_data); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3414, __pyx_L1_error)
  __pyx_v_self->c_font = CGL_font_load_from_memory(__pyx_t_1, __pyx_t_2);

  /* "cgl_wrapper.pyx":3415
 *         self.has_been_destroyed = False
 *         self.c_font = CGL_font_load_from_memory(data, len(data))
 *         self.meta_data = "memory_font"             # <<<<<<<<<<<<<<
 * 
 *     def load(self, path: str):
 */
  __Pyx_INCREF(__pyx_n_s_memory_font);
  __Pyx_GIVEREF(__pyx_n_s_memory_font);
  __Pyx_GOTREF(__pyx_v_self->meta_data);
  __Pyx_DECREF(__pyx_v_self->meta_data);
  __pyx_v_self->meta_data = __pyx_n_s_memory_font;

  /* "cgl_wrapper.pyx":3412
 * 
 * 
 *     def load_from_memory(self, data: bytes):             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 *         self.c_font = CGL_font_load_from_memory(data, len(data))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.font.load_from_memory", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3417
 *         self.meta_data = "memory_font"
 * 
 *     def load(self, path: str):             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 *         self.c_font = CGL_font_load(path.encode("utf-8"))
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4font_9load(PyObject *__pyx_v_self, PyObject *__pyx_v_path); /*proto*/
static PyObject *__pyx_pw_3cgl_4font_9load(PyObject *__pyx_v_self, PyObject *__pyx_v_path) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("load (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyString_Type), 1, "path", 1))) __PYX_ERR(0, 3417, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4font_8load(((struct __pyx_obj_3cgl_font *)__pyx_v_self), ((PyObject*)__pyx_v_path));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4font_8load(struct __pyx_obj_3cgl_font *__pyx_v_self, PyObject *__pyx_v_path) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("load", 0);

  /* "cgl_wrapper.pyx":3418
 * 
 *     def load(self, path: str):
 *         self.has_been_destroyed = False             # <<<<<<<<<<<<<<
 *         self.c_font = CGL_font_load(path.encode("utf-8"))
 *         self.meta_data = str(f"file_font{path}")
 */
  __pyx_v_self->has_been_destroyed = 0;

  /* "cgl_wrapper.pyx":3419
 *     def load(self, path: str):
 *         self.has_been_destroyed = False
 *         self.c_font = CGL_font_load(path.encode("utf-8"))             # <<<<<<<<<<<<<<
 *         self.meta_data = str(f"file_font{path}")
 * 
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_path, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3419, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3419, __pyx_L1_error)
  __pyx_v_self->c_font = CGL_font_load(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3420
 *         self.has_been_destroyed = False
 *         self.c_font = CGL_font_load(path.encode("utf-8"))
 *         self.meta_data = str(f"file_font{path}")             # <<<<<<<<<<<<<<
 * 
 *     def get_atlas(self) -> texture:
 */
  __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_path, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_n_u_file_font, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3420, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 3420, __pyx_L1_error)
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->meta_data);
  __Pyx_DECREF(__pyx_v_self->meta_data);
  __pyx_v_self->meta_data = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3417
 *         self.meta_data = "memory_font"
 * 
 *     def load(self, path: str):             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 *         self.c_font = CGL_font_load(path.encode("utf-8"))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.font.load", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3422
 *         self.meta_data = str(f"file_font{path}")
 * 
 *     def get_atlas(self) -> texture:             # <<<<<<<<<<<<<<
 *         result = texture()
 *         result.set_c_texture(CGL_font_get_atlas(self.c_font))
 */

/* Python wrapper */
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_4font_11get_atlas(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_3cgl_texture *__pyx_pw_3cgl_4font_11get_atlas(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  struct __pyx_obj_3cgl_texture *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_atlas (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4font_10get_atlas(((struct __pyx_obj_3cgl_font *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct __pyx_obj_3cgl_texture *__pyx_pf_3cgl_4font_10get_atlas(struct __pyx_obj_3cgl_font *__pyx_v_self) {
  struct __pyx_obj_3cgl_texture *__pyx_v_result = NULL;
  struct __pyx_obj_3cgl_texture *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_atlas", 0);

  /* "cgl_wrapper.pyx":3423
 * 
 *     def get_atlas(self) -> texture:
 *         result = texture()             # <<<<<<<<<<<<<<
 *         result.set_c_texture(CGL_font_get_atlas(self.c_font))
 *         result.has_been_destroyed = True
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3423, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((struct __pyx_obj_3cgl_texture *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3424
 *     def get_atlas(self) -> texture:
 *         result = texture()
 *         result.set_c_texture(CGL_font_get_atlas(self.c_font))             # <<<<<<<<<<<<<<
 *         result.has_been_destroyed = True
 *         return result
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_result->__pyx_vtab)->set_c_texture(__pyx_v_result, CGL_font_get_atlas(__pyx_v_self->c_font)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3424, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3425
 *         result = texture()
 *         result.set_c_texture(CGL_font_get_atlas(self.c_font))
 *         result.has_been_destroyed = True             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
  __pyx_v_result->has_been_destroyed = 1;

  /* "cgl_wrapper.pyx":3426
 *         result.set_c_texture(CGL_font_get_atlas(self.c_font))
 *         result.has_been_destroyed = True
 *         return result             # <<<<<<<<<<<<<<
 * 
 *     def build_atlas(self, width: int, height: int, font_size: int) -> bool:
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_result));
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3422
 *         self.meta_data = str(f"file_font{path}")
 * 
 *     def get_atlas(self) -> texture:             # <<<<<<<<<<<<<<
 *         result = texture()
 *         result.set_c_texture(CGL_font_get_atlas(self.c_font))
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.font.get_atlas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3428
 *         return result
 * 
 *     def build_atlas(self, width: int, height: int, font_size: int) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_font_build_atlas(self.c_font, width, height, font_size)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4font_13build_atlas(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_3cgl_4font_13build_atlas(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_width = 0;
  PyObject *__pyx_v_height = 0;
  PyObject *__pyx_v_font_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("build_atlas (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_font_size,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_width)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_height)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("build_atlas", 1, 3, 3, 1); __PYX_ERR(0, 3428, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_font_size)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("build_atlas", 1, 3, 3, 2); __PYX_ERR(0, 3428, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_atlas") < 0)) __PYX_ERR(0, 3428, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_width = values[0];
    __pyx_v_height = values[1];
    __pyx_v_font_size = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("build_atlas", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3428, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.font.build_atlas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_4font_12build_atlas(((struct __pyx_obj_3cgl_font *)__pyx_v_self), __pyx_v_width, __pyx_v_height, __pyx_v_font_size);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4font_12build_atlas(struct __pyx_obj_3cgl_font *__pyx_v_self, PyObject *__pyx_v_width, PyObject *__pyx_v_height, PyObject *__pyx_v_font_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("build_atlas", 0);

  /* "cgl_wrapper.pyx":3429
 * 
 *     def build_atlas(self, width: int, height: int, font_size: int) -> bool:
 *         return CGL_font_build_atlas(self.c_font, width, height, font_size)             # <<<<<<<<<<<<<<
 * 
 *     def bake_to_texture(self, strng: str) -> tuple:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_width); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3429, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_height); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3429, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyInt_As_size_t(__pyx_v_font_size); if (unlikely((__pyx_t_3 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3429, __pyx_L1_error)
  __pyx_t_4 = __Pyx_PyBool_FromLong(CGL_font_build_atlas(__pyx_v_self->c_font, __pyx_t_1, __pyx_t_2, __pyx_t_3)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3428
 *         return result
 * 
 *     def build_atlas(self, width: int, height: int, font_size: int) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_font_build_atlas(self.c_font, width, height, font_size)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("cgl.font.build_atlas", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3431
 *         return CGL_font_build_atlas(self.c_font, width, height, font_size)
 * 
 *     def bake_to_texture(self, strng: str) -> tuple:             # <<<<<<<<<<<<<<
 *         result_tex = texture()
 *         cdef size_t width
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4font_15bake_to_texture(PyObject *__pyx_v_self, PyObject *__pyx_v_strng); /*proto*/
static PyObject *__pyx_pw_3cgl_4font_15bake_to_texture(PyObject *__pyx_v_self, PyObject *__pyx_v_strng) {
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("bake_to_texture (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strng), (&PyString_Type), 1, "strng", 1))) __PYX_ERR(0, 3431, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_4font_14bake_to_texture(((struct __pyx_obj_3cgl_font *)__pyx_v_self), ((PyObject*)__pyx_v_strng));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4font_14bake_to_texture(struct __pyx_obj_3cgl_font *__pyx_v_self, PyObject *__pyx_v_strng) {
  struct __pyx_obj_3cgl_texture *__pyx_v_result_tex = NULL;
  size_t __pyx_v_width;
  size_t __pyx_v_height;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  Py_ssize_t __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("bake_to_texture", 0);

  /* "cgl_wrapper.pyx":3432
 * 
 *     def bake_to_texture(self, strng: str) -> tuple:
 *         result_tex = texture()             # <<<<<<<<<<<<<<
 *         cdef size_t width
 *         cdef size_t height
 */
  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_texture)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3432, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result_tex = ((struct __pyx_obj_3cgl_texture *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3435
 *         cdef size_t width
 *         cdef size_t height
 *         result_tex.set_c_texture(CGL_text_bake_to_texture(strng.encode("utf-8"), len(strng), self.c_font, &width, &height))             # <<<<<<<<<<<<<<
 *         return (result_tex, width, height)
 * 
 */
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_strng, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3435, __pyx_L1_error)
  __pyx_t_3 = PyObject_Length(__pyx_v_strng); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3435, __pyx_L1_error)
  __pyx_t_4 = ((struct __pyx_vtabstruct_3cgl_texture *)__pyx_v_result_tex->__pyx_vtab)->set_c_texture(__pyx_v_result_tex, CGL_text_bake_to_texture(__pyx_t_2, __pyx_t_3, __pyx_v_self->c_font, (&__pyx_v_width), (&__pyx_v_height))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3435, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "cgl_wrapper.pyx":3436
 *         cdef size_t height
 *         result_tex.set_c_texture(CGL_text_bake_to_texture(strng.encode("utf-8"), len(strng), self.c_font, &width, &height))
 *         return (result_tex, width, height)             # <<<<<<<<<<<<<<
 * 
 *     def get_characters(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = __Pyx_PyInt_FromSize_t(__pyx_v_width); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_1 = __Pyx_PyInt_FromSize_t(__pyx_v_height); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3436, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_v_result_tex));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_result_tex));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_result_tex));
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1);
  __pyx_t_4 = 0;
  __pyx_t_1 = 0;
  __pyx_r = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3431
 *         return CGL_font_build_atlas(self.c_font, width, height, font_size)
 * 
 *     def bake_to_texture(self, strng: str) -> tuple:             # <<<<<<<<<<<<<<
 *         result_tex = texture()
 *         cdef size_t width
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.font.bake_to_texture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_result_tex);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3438
 *         return (result_tex, width, height)
 * 
 *     def get_characters(self):             # <<<<<<<<<<<<<<
 *         cdef CGL_font_character* c_font_characters
 *         cdef list result = []
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4font_17get_characters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4font_17get_characters(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_characters (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4font_16get_characters(((struct __pyx_obj_3cgl_font *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4font_16get_characters(struct __pyx_obj_3cgl_font *__pyx_v_self) {
  struct CGL_font_character *__pyx_v_c_font_characters;
  PyObject *__pyx_v_result = 0;
  long __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  long __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_characters", 0);

  /* "cgl_wrapper.pyx":3440
 *     def get_characters(self):
 *         cdef CGL_font_character* c_font_characters
 *         cdef list result = []             # <<<<<<<<<<<<<<
 *         c_font_characters = CGL_font_get_characters(self.c_font)
 *         for i in range(127):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3440, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_result = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3441
 *         cdef CGL_font_character* c_font_characters
 *         cdef list result = []
 *         c_font_characters = CGL_font_get_characters(self.c_font)             # <<<<<<<<<<<<<<
 *         for i in range(127):
 *             result.append(font_character(c_font_characters[i]))
 */
  __pyx_v_c_font_characters = CGL_font_get_characters(__pyx_v_self->c_font);

  /* "cgl_wrapper.pyx":3442
 *         cdef list result = []
 *         c_font_characters = CGL_font_get_characters(self.c_font)
 *         for i in range(127):             # <<<<<<<<<<<<<<
 *             result.append(font_character(c_font_characters[i]))
 *         return result
 */
  for (__pyx_t_2 = 0; __pyx_t_2 < 0x7F; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "cgl_wrapper.pyx":3443
 *         c_font_characters = CGL_font_get_characters(self.c_font)
 *         for i in range(127):
 *             result.append(font_character(c_font_characters[i]))             # <<<<<<<<<<<<<<
 *         return result
 * 
 */
    __pyx_t_1 = __pyx_convert__to_py_struct__CGL_font_character((__pyx_v_c_font_characters[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_3cgl_font_character), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3443, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 3443, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "cgl_wrapper.pyx":3444
 *         for i in range(127):
 *             result.append(font_character(c_font_characters[i]))
 *         return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_result);
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3438
 *         return (result_tex, width, height)
 * 
 *     def get_characters(self):             # <<<<<<<<<<<<<<
 *         cdef CGL_font_character* c_font_characters
 *         cdef list result = []
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.font.get_characters", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4font_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_4font_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4font_18__reduce_cython__(((struct __pyx_obj_3cgl_font *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4font_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_font *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__80, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.font.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_4font_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_4font_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_4font_20__setstate_cython__(((struct __pyx_obj_3cgl_font *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_4font_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_font *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__81, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.font.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3447
 * 
 * 
 * def text_init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_text_init()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_259text_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_259text_init = {"text_init", (PyCFunction)__pyx_pw_3cgl_259text_init, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_259text_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("text_init (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_258text_init(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_258text_init(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("text_init", 0);

  /* "cgl_wrapper.pyx":3448
 * 
 * def text_init() -> bool:
 *     return CGL_text_init()             # <<<<<<<<<<<<<<
 * 
 * def text_shutdown():
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_text_init()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3448, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3447
 * 
 * 
 * def text_init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_text_init()
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.text_init", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3450
 *     return CGL_text_init()
 * 
 * def text_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_text_shutdown()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_261text_shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_261text_shutdown = {"text_shutdown", (PyCFunction)__pyx_pw_3cgl_261text_shutdown, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_261text_shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("text_shutdown (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_260text_shutdown(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_260text_shutdown(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("text_shutdown", 0);

  /* "cgl_wrapper.pyx":3451
 * 
 * def text_shutdown():
 *     CGL_text_shutdown()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  CGL_text_shutdown();

  /* "cgl_wrapper.pyx":3450
 *     return CGL_text_init()
 * 
 * def text_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_text_shutdown()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3456
 * cdef class widgets:
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("widgets is a static class")
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_7widgets_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_7widgets_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_7widgets___init__(((struct __pyx_obj_3cgl_widgets *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_7widgets___init__(CYTHON_UNUSED struct __pyx_obj_3cgl_widgets *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":3457
 * 
 *     def __init__(self):
 *         raise RuntimeError("widgets is a static class")             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__82, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(0, 3457, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3456
 * cdef class widgets:
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         raise RuntimeError("widgets is a static class")
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.widgets.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3460
 * 
 *     @staticmethod
 *     def create_context(max_vertices: int, max_indices: int) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_widgets_context_create(max_vertices, max_indices)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_3create_context(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_3create_context = {"create_context", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_3create_context, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_3create_context(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_max_vertices = 0;
  PyObject *__pyx_v_max_indices = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("create_context (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_max_vertices,&__pyx_n_s_max_indices,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_vertices)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_indices)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("create_context", 1, 2, 2, 1); __PYX_ERR(0, 3460, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "create_context") < 0)) __PYX_ERR(0, 3460, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_max_vertices = values[0];
    __pyx_v_max_indices = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("create_context", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3460, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.create_context", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_2create_context(__pyx_v_max_vertices, __pyx_v_max_indices);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_2create_context(PyObject *__pyx_v_max_vertices, PyObject *__pyx_v_max_indices) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  struct CGL_widgets_context *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_context", 0);

  /* "cgl_wrapper.pyx":3461
 *     @staticmethod
 *     def create_context(max_vertices: int, max_indices: int) -> object:
 *         return <object>CGL_widgets_context_create(max_vertices, max_indices)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_As_size_t(__pyx_v_max_vertices); if (unlikely((__pyx_t_1 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3461, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyInt_As_size_t(__pyx_v_max_indices); if (unlikely((__pyx_t_2 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 3461, __pyx_L1_error)
  __pyx_t_3 = CGL_widgets_context_create(__pyx_t_1, __pyx_t_2);
  __Pyx_INCREF(((PyObject *)__pyx_t_3));
  __pyx_r = ((PyObject *)__pyx_t_3);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3460
 * 
 *     @staticmethod
 *     def create_context(max_vertices: int, max_indices: int) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_widgets_context_create(max_vertices, max_indices)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.widgets.create_context", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3464
 * 
 *     @staticmethod
 *     def destroy_context(ctx: object):             # <<<<<<<<<<<<<<
 *         CGL_widgets_context_destory(<CGL_widgets_context*>ctx)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_5destroy_context(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_5destroy_context = {"destroy_context", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_5destroy_context, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_5destroy_context(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ctx = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy_context (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ctx,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ctx)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "destroy_context") < 0)) __PYX_ERR(0, 3464, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ctx = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("destroy_context", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3464, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.destroy_context", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_4destroy_context(__pyx_v_ctx);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_4destroy_context(PyObject *__pyx_v_ctx) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("destroy_context", 0);

  /* "cgl_wrapper.pyx":3465
 *     @staticmethod
 *     def destroy_context(ctx: object):
 *         CGL_widgets_context_destory(<CGL_widgets_context*>ctx)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_context_destory(((struct CGL_widgets_context *)__pyx_v_ctx));

  /* "cgl_wrapper.pyx":3464
 * 
 *     @staticmethod
 *     def destroy_context(ctx: object):             # <<<<<<<<<<<<<<
 *         CGL_widgets_context_destory(<CGL_widgets_context*>ctx)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3468
 * 
 *     @staticmethod
 *     def get_current_context() -> object:             # <<<<<<<<<<<<<<
 *         # NOTE: this is a type in the original C code,
 *         #       not some kind of a bug here
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_7get_current_context(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_7get_current_context = {"get_current_context", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_7get_current_context, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_7get_current_context(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("get_current_context (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("get_current_context", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_current_context", 0))) return NULL;
  __pyx_r = __pyx_pf_3cgl_7widgets_6get_current_context();

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_6get_current_context(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  struct CGL_widgets_context *__pyx_t_1;
  __Pyx_RefNannySetupContext("get_current_context", 0);

  /* "cgl_wrapper.pyx":3472
 *         #       not some kind of a bug here
 *         #       and will be later fixed
 *         return <object>CGL_window_get_current_context()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = CGL_window_get_current_context();
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3468
 * 
 *     @staticmethod
 *     def get_current_context() -> object:             # <<<<<<<<<<<<<<
 *         # NOTE: this is a type in the original C code,
 *         #       not some kind of a bug here
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3475
 * 
 *     @staticmethod
 *     def set_current_context(ctx: object):             # <<<<<<<<<<<<<<
 *         # NOTE: this is a type in the original C code,
 *         #       not some kind of a bug here
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_9set_current_context(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_9set_current_context = {"set_current_context", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_9set_current_context, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_9set_current_context(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ctx = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_current_context (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ctx,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ctx)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_current_context") < 0)) __PYX_ERR(0, 3475, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_ctx = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_current_context", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3475, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_current_context", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_8set_current_context(__pyx_v_ctx);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_8set_current_context(PyObject *__pyx_v_ctx) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_current_context", 0);

  /* "cgl_wrapper.pyx":3479
 *         #       not some kind of a bug here
 *         #       and will be later fixed
 *         CGL_window_set_current_context(<CGL_widgets_context*>ctx)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_window_set_current_context(((struct CGL_widgets_context *)__pyx_v_ctx));

  /* "cgl_wrapper.pyx":3475
 * 
 *     @staticmethod
 *     def set_current_context(ctx: object):             # <<<<<<<<<<<<<<
 *         # NOTE: this is a type in the original C code,
 *         #       not some kind of a bug here
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3482
 * 
 *     @staticmethod
 *     def init():             # <<<<<<<<<<<<<<
 *         CGL_widgets_init()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_11init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_11init = {"init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_11init, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_11init(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("init", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "init", 0))) return NULL;
  __pyx_r = __pyx_pf_3cgl_7widgets_10init();

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_10init(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("init", 0);

  /* "cgl_wrapper.pyx":3483
 *     @staticmethod
 *     def init():
 *         CGL_widgets_init()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  (void)(CGL_widgets_init());

  /* "cgl_wrapper.pyx":3482
 * 
 *     @staticmethod
 *     def init():             # <<<<<<<<<<<<<<
 *         CGL_widgets_init()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3486
 * 
 *     @staticmethod
 *     def shutdown():             # <<<<<<<<<<<<<<
 *         CGL_widgets_shutdown()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_13shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_13shutdown = {"shutdown", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_13shutdown, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_13shutdown(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("shutdown (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("shutdown", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "shutdown", 0))) return NULL;
  __pyx_r = __pyx_pf_3cgl_7widgets_12shutdown();

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_12shutdown(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("shutdown", 0);

  /* "cgl_wrapper.pyx":3487
 *     @staticmethod
 *     def shutdown():
 *         CGL_widgets_shutdown()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_shutdown();

  /* "cgl_wrapper.pyx":3486
 * 
 *     @staticmethod
 *     def shutdown():             # <<<<<<<<<<<<<<
 *         CGL_widgets_shutdown()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3490
 * 
 *     @staticmethod
 *     def begin():             # <<<<<<<<<<<<<<
 *         CGL_widgets_begin()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_15begin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_15begin = {"begin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_15begin, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_15begin(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("begin (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("begin", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "begin", 0))) return NULL;
  __pyx_r = __pyx_pf_3cgl_7widgets_14begin();

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_14begin(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("begin", 0);

  /* "cgl_wrapper.pyx":3491
 *     @staticmethod
 *     def begin():
 *         CGL_widgets_begin()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  (void)(CGL_widgets_begin());

  /* "cgl_wrapper.pyx":3490
 * 
 *     @staticmethod
 *     def begin():             # <<<<<<<<<<<<<<
 *         CGL_widgets_begin()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3494
 * 
 *     @staticmethod
 *     def begin_int(scale_x: float, scale_y: float, offset_x: float, offset_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_begin_int(scale_x, scale_y, offset_x, offset_y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_17begin_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_17begin_int = {"begin_int", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_17begin_int, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_17begin_int(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_scale_x;
  double __pyx_v_scale_y;
  double __pyx_v_offset_x;
  double __pyx_v_offset_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("begin_int (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_scale_x,&__pyx_n_s_scale_y,&__pyx_n_s_offset_x,&__pyx_n_s_offset_y,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("begin_int", 1, 4, 4, 1); __PYX_ERR(0, 3494, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("begin_int", 1, 4, 4, 2); __PYX_ERR(0, 3494, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("begin_int", 1, 4, 4, 3); __PYX_ERR(0, 3494, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "begin_int") < 0)) __PYX_ERR(0, 3494, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_scale_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_scale_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3494, __pyx_L3_error)
    __pyx_v_scale_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_scale_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3494, __pyx_L3_error)
    __pyx_v_offset_x = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_offset_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3494, __pyx_L3_error)
    __pyx_v_offset_y = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_offset_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3494, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("begin_int", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3494, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.begin_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_16begin_int(__pyx_v_scale_x, __pyx_v_scale_y, __pyx_v_offset_x, __pyx_v_offset_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_16begin_int(double __pyx_v_scale_x, double __pyx_v_scale_y, double __pyx_v_offset_x, double __pyx_v_offset_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("begin_int", 0);

  /* "cgl_wrapper.pyx":3495
 *     @staticmethod
 *     def begin_int(scale_x: float, scale_y: float, offset_x: float, offset_y: float):
 *         CGL_widgets_begin_int(scale_x, scale_y, offset_x, offset_y)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  (void)(CGL_widgets_begin_int(__pyx_v_scale_x, __pyx_v_scale_y, __pyx_v_offset_x, __pyx_v_offset_y));

  /* "cgl_wrapper.pyx":3494
 * 
 *     @staticmethod
 *     def begin_int(scale_x: float, scale_y: float, offset_x: float, offset_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_begin_int(scale_x, scale_y, offset_x, offset_y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3498
 * 
 *     @staticmethod
 *     def end():             # <<<<<<<<<<<<<<
 *         CGL_widgets_end()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_19end(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_19end = {"end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_19end, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_19end(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("end (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("end", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "end", 0))) return NULL;
  __pyx_r = __pyx_pf_3cgl_7widgets_18end();

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_18end(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("end", 0);

  /* "cgl_wrapper.pyx":3499
 *     @staticmethod
 *     def end():
 *         CGL_widgets_end()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  (void)(CGL_widgets_end());

  /* "cgl_wrapper.pyx":3498
 * 
 *     @staticmethod
 *     def end():             # <<<<<<<<<<<<<<
 *         CGL_widgets_end()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3502
 * 
 *     @staticmethod
 *     def flush():             # <<<<<<<<<<<<<<
 *         CGL_widgets_flush()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_21flush(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_21flush = {"flush", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_21flush, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_21flush(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("flush (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("flush", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "flush", 0))) return NULL;
  __pyx_r = __pyx_pf_3cgl_7widgets_20flush();

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_20flush(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("flush", 0);

  /* "cgl_wrapper.pyx":3503
 *     @staticmethod
 *     def flush():
 *         CGL_widgets_flush()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  (void)(CGL_widgets_flush());

  /* "cgl_wrapper.pyx":3502
 * 
 *     @staticmethod
 *     def flush():             # <<<<<<<<<<<<<<
 *         CGL_widgets_flush()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3506
 * 
 *     @staticmethod
 *     def flush_if_required():             # <<<<<<<<<<<<<<
 *         CGL_widgets_flush_if_required()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_23flush_if_required(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_23flush_if_required = {"flush_if_required", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_23flush_if_required, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_23flush_if_required(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("flush_if_required (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("flush_if_required", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "flush_if_required", 0))) return NULL;
  __pyx_r = __pyx_pf_3cgl_7widgets_22flush_if_required();

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_22flush_if_required(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("flush_if_required", 0);

  /* "cgl_wrapper.pyx":3507
 *     @staticmethod
 *     def flush_if_required():
 *         CGL_widgets_flush_if_required()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  (void)(CGL_widgets_flush_if_required());

  /* "cgl_wrapper.pyx":3506
 * 
 *     @staticmethod
 *     def flush_if_required():             # <<<<<<<<<<<<<<
 *         CGL_widgets_flush_if_required()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3510
 * 
 *     @staticmethod
 *     def add_vertex(v: mesh_vertex):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex(&v.c_vertex)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_25add_vertex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_25add_vertex = {"add_vertex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_25add_vertex, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_25add_vertex(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_v = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_vertex") < 0)) __PYX_ERR(0, 3510, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_v = ((struct __pyx_obj_3cgl_mesh_vertex *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_vertex", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3510, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_vertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_3cgl_mesh_vertex, 1, "v", 0))) __PYX_ERR(0, 3510, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_24add_vertex(__pyx_v_v);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_24add_vertex(struct __pyx_obj_3cgl_mesh_vertex *__pyx_v_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex", 0);

  /* "cgl_wrapper.pyx":3511
 *     @staticmethod
 *     def add_vertex(v: mesh_vertex):
 *         CGL_widgets_add_vertex(&v.c_vertex)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_vertex((&__pyx_v_v->c_vertex));

  /* "cgl_wrapper.pyx":3510
 * 
 *     @staticmethod
 *     def add_vertex(v: mesh_vertex):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex(&v.c_vertex)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3514
 * 
 *     @staticmethod
 *     def add_mesh(m: mesh_cpu):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_mesh(m.c_mesh)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_27add_mesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_27add_mesh = {"add_mesh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_27add_mesh, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_27add_mesh(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_m = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_mesh (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_mesh") < 0)) __PYX_ERR(0, 3514, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_m = ((struct __pyx_obj_3cgl_mesh_cpu *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_mesh", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3514, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_mesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mesh_cpu, 1, "m", 0))) __PYX_ERR(0, 3514, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_26add_mesh(__pyx_v_m);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_26add_mesh(struct __pyx_obj_3cgl_mesh_cpu *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_mesh", 0);

  /* "cgl_wrapper.pyx":3515
 *     @staticmethod
 *     def add_mesh(m: mesh_cpu):
 *         CGL_widgets_add_mesh(m.c_mesh)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_mesh(__pyx_v_m->c_mesh);

  /* "cgl_wrapper.pyx":3514
 * 
 *     @staticmethod
 *     def add_mesh(m: mesh_cpu):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_mesh(m.c_mesh)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3518
 * 
 *     @staticmethod
 *     def add_vertex_p(v: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p(v.c_vec3)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_29add_vertex_p(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_29add_vertex_p = {"add_vertex_p", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_29add_vertex_p, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_29add_vertex_p(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_v = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_p (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_vertex_p") < 0)) __PYX_ERR(0, 3518, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_v = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_vertex_p", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3518, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_vertex_p", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_3cgl_vec3, 1, "v", 0))) __PYX_ERR(0, 3518, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_28add_vertex_p(__pyx_v_v);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_28add_vertex_p(struct __pyx_obj_3cgl_vec3 *__pyx_v_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_p", 0);

  /* "cgl_wrapper.pyx":3519
 *     @staticmethod
 *     def add_vertex_p(v: vec3):
 *         CGL_widgets_add_vertex_p(v.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_vertex_p(__pyx_v_v->c_vec3);

  /* "cgl_wrapper.pyx":3518
 * 
 *     @staticmethod
 *     def add_vertex_p(v: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p(v.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3522
 * 
 *     @staticmethod
 *     def add_vertex_p3f(x: float, y: float, z: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3f(x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_31add_vertex_p3f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_31add_vertex_p3f = {"add_vertex_p3f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_31add_vertex_p3f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_31add_vertex_p3f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_p3f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_p3f", 1, 3, 3, 1); __PYX_ERR(0, 3522, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_p3f", 1, 3, 3, 2); __PYX_ERR(0, 3522, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_vertex_p3f") < 0)) __PYX_ERR(0, 3522, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3522, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3522, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3522, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_vertex_p3f", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3522, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_vertex_p3f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_30add_vertex_p3f(__pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_30add_vertex_p3f(double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_p3f", 0);

  /* "cgl_wrapper.pyx":3523
 *     @staticmethod
 *     def add_vertex_p3f(x: float, y: float, z: float):
 *         CGL_widgets_add_vertex_p3f(x, y, z)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_vertex_p3f(__pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* "cgl_wrapper.pyx":3522
 * 
 *     @staticmethod
 *     def add_vertex_p3f(x: float, y: float, z: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3f(x, y, z)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3526
 * 
 *     @staticmethod
 *     def add_vertex_pt(v: vec3, t: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_pt(v.c_vec3, t.c_vec2)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_33add_vertex_pt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_33add_vertex_pt = {"add_vertex_pt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_33add_vertex_pt, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_33add_vertex_pt(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_v = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_t = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_pt (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_t,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_pt", 1, 2, 2, 1); __PYX_ERR(0, 3526, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_vertex_pt") < 0)) __PYX_ERR(0, 3526, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_v = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_t = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_vertex_pt", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3526, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_vertex_pt", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_3cgl_vec3, 1, "v", 0))) __PYX_ERR(0, 3526, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_t), __pyx_ptype_3cgl_vec2, 1, "t", 0))) __PYX_ERR(0, 3526, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_32add_vertex_pt(__pyx_v_v, __pyx_v_t);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_32add_vertex_pt(struct __pyx_obj_3cgl_vec3 *__pyx_v_v, struct __pyx_obj_3cgl_vec2 *__pyx_v_t) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_pt", 0);

  /* "cgl_wrapper.pyx":3527
 *     @staticmethod
 *     def add_vertex_pt(v: vec3, t: vec2):
 *         CGL_widgets_add_vertex_pt(v.c_vec3, t.c_vec2)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_vertex_pt(__pyx_v_v->c_vec3, __pyx_v_t->c_vec2);

  /* "cgl_wrapper.pyx":3526
 * 
 *     @staticmethod
 *     def add_vertex_pt(v: vec3, t: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_pt(v.c_vec3, t.c_vec2)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3530
 * 
 *     @staticmethod
 *     def add_vertex_p3ft(x: float, y: float, z: float, t: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3ft(x, y, z, t.c_vec2)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_35add_vertex_p3ft(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_35add_vertex_p3ft = {"add_vertex_p3ft", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_35add_vertex_p3ft, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_35add_vertex_p3ft(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_t = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_p3ft (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,&__pyx_n_s_t,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_p3ft", 1, 4, 4, 1); __PYX_ERR(0, 3530, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_p3ft", 1, 4, 4, 2); __PYX_ERR(0, 3530, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_p3ft", 1, 4, 4, 3); __PYX_ERR(0, 3530, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_vertex_p3ft") < 0)) __PYX_ERR(0, 3530, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3530, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3530, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3530, __pyx_L3_error)
    __pyx_v_t = ((struct __pyx_obj_3cgl_vec2 *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_vertex_p3ft", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3530, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_vertex_p3ft", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_t), __pyx_ptype_3cgl_vec2, 1, "t", 0))) __PYX_ERR(0, 3530, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_34add_vertex_p3ft(__pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_t);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_34add_vertex_p3ft(double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, struct __pyx_obj_3cgl_vec2 *__pyx_v_t) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_p3ft", 0);

  /* "cgl_wrapper.pyx":3531
 *     @staticmethod
 *     def add_vertex_p3ft(x: float, y: float, z: float, t: vec2):
 *         CGL_widgets_add_vertex_p3ft(x, y, z, t.c_vec2)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_vertex_p3ft(__pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_t->c_vec2);

  /* "cgl_wrapper.pyx":3530
 * 
 *     @staticmethod
 *     def add_vertex_p3ft(x: float, y: float, z: float, t: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3ft(x, y, z, t.c_vec2)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3534
 * 
 *     @staticmethod
 *     def add_vertex_pt2f(v: vec3, t0: float, t1: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_pt2f(v.c_vec3, t0, t1)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_37add_vertex_pt2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_37add_vertex_pt2f = {"add_vertex_pt2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_37add_vertex_pt2f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_37add_vertex_pt2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_v = 0;
  double __pyx_v_t0;
  double __pyx_v_t1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_pt2f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_v,&__pyx_n_s_t0,&__pyx_n_s_t1,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t0)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_pt2f", 1, 3, 3, 1); __PYX_ERR(0, 3534, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_pt2f", 1, 3, 3, 2); __PYX_ERR(0, 3534, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_vertex_pt2f") < 0)) __PYX_ERR(0, 3534, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_v = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_t0 = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_t0 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3534, __pyx_L3_error)
    __pyx_v_t1 = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_t1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3534, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_vertex_pt2f", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3534, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_vertex_pt2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_v), __pyx_ptype_3cgl_vec3, 1, "v", 0))) __PYX_ERR(0, 3534, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_36add_vertex_pt2f(__pyx_v_v, __pyx_v_t0, __pyx_v_t1);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_36add_vertex_pt2f(struct __pyx_obj_3cgl_vec3 *__pyx_v_v, double __pyx_v_t0, double __pyx_v_t1) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_pt2f", 0);

  /* "cgl_wrapper.pyx":3535
 *     @staticmethod
 *     def add_vertex_pt2f(v: vec3, t0: float, t1: float):
 *         CGL_widgets_add_vertex_pt2f(v.c_vec3, t0, t1)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_vertex_pt2f(__pyx_v_v->c_vec3, __pyx_v_t0, __pyx_v_t1);

  /* "cgl_wrapper.pyx":3534
 * 
 *     @staticmethod
 *     def add_vertex_pt2f(v: vec3, t0: float, t1: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_pt2f(v.c_vec3, t0, t1)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3538
 * 
 *     @staticmethod
 *     def add_vertex_p3ft2f(x: float, y: float, z: float, u: float, v: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3ft2f(x, y, z, u, v)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_39add_vertex_p3ft2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_39add_vertex_p3ft2f = {"add_vertex_p3ft2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_39add_vertex_p3ft2f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_39add_vertex_p3ft2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  double __pyx_v_u;
  double __pyx_v_v;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_p3ft2f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,&__pyx_n_s_u,&__pyx_n_s_v,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_p3ft2f", 1, 5, 5, 1); __PYX_ERR(0, 3538, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_p3ft2f", 1, 5, 5, 2); __PYX_ERR(0, 3538, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_u)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_p3ft2f", 1, 5, 5, 3); __PYX_ERR(0, 3538, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_v)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_vertex_p3ft2f", 1, 5, 5, 4); __PYX_ERR(0, 3538, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_vertex_p3ft2f") < 0)) __PYX_ERR(0, 3538, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3538, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3538, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3538, __pyx_L3_error)
    __pyx_v_u = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_u == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3538, __pyx_L3_error)
    __pyx_v_v = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_v == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3538, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_vertex_p3ft2f", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3538, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_vertex_p3ft2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_38add_vertex_p3ft2f(__pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_u, __pyx_v_v);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_38add_vertex_p3ft2f(double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, double __pyx_v_u, double __pyx_v_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_vertex_p3ft2f", 0);

  /* "cgl_wrapper.pyx":3539
 *     @staticmethod
 *     def add_vertex_p3ft2f(x: float, y: float, z: float, u: float, v: float):
 *         CGL_widgets_add_vertex_p3ft2f(x, y, z, u, v)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_vertex_p3ft2f(__pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_u, __pyx_v_v);

  /* "cgl_wrapper.pyx":3538
 * 
 *     @staticmethod
 *     def add_vertex_p3ft2f(x: float, y: float, z: float, u: float, v: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3ft2f(x, y, z, u, v)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3542
 * 
 *     @staticmethod
 *     def set_stroke_color(c: vec4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_color(c.c_vec4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_41set_stroke_color(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_41set_stroke_color = {"set_stroke_color", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_41set_stroke_color, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_41set_stroke_color(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec4 *__pyx_v_c = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_stroke_color (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_c,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_stroke_color") < 0)) __PYX_ERR(0, 3542, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec4 *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_stroke_color", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3542, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_stroke_color", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec4, 1, "c", 0))) __PYX_ERR(0, 3542, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_40set_stroke_color(__pyx_v_c);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_40set_stroke_color(struct __pyx_obj_3cgl_vec4 *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_stroke_color", 0);

  /* "cgl_wrapper.pyx":3543
 *     @staticmethod
 *     def set_stroke_color(c: vec4):
 *         CGL_widgets_set_stroke_color(c.c_vec4)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_stroke_color(__pyx_v_c->c_vec4);

  /* "cgl_wrapper.pyx":3542
 * 
 *     @staticmethod
 *     def set_stroke_color(c: vec4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_color(c.c_vec4)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3546
 * 
 *     @staticmethod
 *     def set_stroke_colorf(r: float, g: float, b: float, a: float = 1.0):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_colorf(r, g, b, a)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_43set_stroke_colorf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_43set_stroke_colorf = {"set_stroke_colorf", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_43set_stroke_colorf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_43set_stroke_colorf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_r;
  double __pyx_v_g;
  double __pyx_v_b;
  double __pyx_v_a;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_stroke_colorf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_r,&__pyx_n_s_g,&__pyx_n_s_b,&__pyx_n_s_a,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_stroke_colorf", 0, 3, 4, 1); __PYX_ERR(0, 3546, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_stroke_colorf", 0, 3, 4, 2); __PYX_ERR(0, 3546, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_stroke_colorf") < 0)) __PYX_ERR(0, 3546, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_r = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3546, __pyx_L3_error)
    __pyx_v_g = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_g == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3546, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3546, __pyx_L3_error)
    if (values[3]) {
      __pyx_v_a = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_a == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3546, __pyx_L3_error)
    } else {
      __pyx_v_a = ((double)1.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_stroke_colorf", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3546, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_stroke_colorf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_42set_stroke_colorf(__pyx_v_r, __pyx_v_g, __pyx_v_b, __pyx_v_a);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_42set_stroke_colorf(double __pyx_v_r, double __pyx_v_g, double __pyx_v_b, double __pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_stroke_colorf", 0);

  /* "cgl_wrapper.pyx":3547
 *     @staticmethod
 *     def set_stroke_colorf(r: float, g: float, b: float, a: float = 1.0):
 *         CGL_widgets_set_stroke_colorf(r, g, b, a)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_stroke_colorf(__pyx_v_r, __pyx_v_g, __pyx_v_b, __pyx_v_a);

  /* "cgl_wrapper.pyx":3546
 * 
 *     @staticmethod
 *     def set_stroke_colorf(r: float, g: float, b: float, a: float = 1.0):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_colorf(r, g, b, a)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3550
 * 
 *     @staticmethod
 *     def set_stroke_thickness(t: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_thicnkess(t)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_45set_stroke_thickness(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_45set_stroke_thickness = {"set_stroke_thickness", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_45set_stroke_thickness, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_45set_stroke_thickness(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_t;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_stroke_thickness (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_t,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_t)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_stroke_thickness") < 0)) __PYX_ERR(0, 3550, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_t = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_t == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3550, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_stroke_thickness", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3550, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_stroke_thickness", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_44set_stroke_thickness(__pyx_v_t);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_44set_stroke_thickness(double __pyx_v_t) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_stroke_thickness", 0);

  /* "cgl_wrapper.pyx":3551
 *     @staticmethod
 *     def set_stroke_thickness(t: float):
 *         CGL_widgets_set_stroke_thicnkess(t)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_stroke_thicnkess(__pyx_v_t);

  /* "cgl_wrapper.pyx":3550
 * 
 *     @staticmethod
 *     def set_stroke_thickness(t: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_thicnkess(t)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3554
 * 
 *     @staticmethod
 *     def set_fill_color(c: vec4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_color(c.c_vec4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_47set_fill_color(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_47set_fill_color = {"set_fill_color", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_47set_fill_color, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_47set_fill_color(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec4 *__pyx_v_c = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_fill_color (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_c,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_fill_color") < 0)) __PYX_ERR(0, 3554, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec4 *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_fill_color", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3554, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_fill_color", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec4, 1, "c", 0))) __PYX_ERR(0, 3554, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_46set_fill_color(__pyx_v_c);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_46set_fill_color(struct __pyx_obj_3cgl_vec4 *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_fill_color", 0);

  /* "cgl_wrapper.pyx":3555
 *     @staticmethod
 *     def set_fill_color(c: vec4):
 *         CGL_widgets_set_fill_color(c.c_vec4)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_fill_color(__pyx_v_c->c_vec4);

  /* "cgl_wrapper.pyx":3554
 * 
 *     @staticmethod
 *     def set_fill_color(c: vec4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_color(c.c_vec4)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3558
 * 
 *     @staticmethod
 *     def set_fill_colorf(r: float, g: float, b: float, a: float = 1.0):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_colorf(r, g, b, a)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_49set_fill_colorf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_49set_fill_colorf = {"set_fill_colorf", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_49set_fill_colorf, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_49set_fill_colorf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_r;
  double __pyx_v_g;
  double __pyx_v_b;
  double __pyx_v_a;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_fill_colorf (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_r,&__pyx_n_s_g,&__pyx_n_s_b,&__pyx_n_s_a,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_fill_colorf", 0, 3, 4, 1); __PYX_ERR(0, 3558, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_fill_colorf", 0, 3, 4, 2); __PYX_ERR(0, 3558, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_fill_colorf") < 0)) __PYX_ERR(0, 3558, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_r = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_r == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3558, __pyx_L3_error)
    __pyx_v_g = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_g == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3558, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_b == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3558, __pyx_L3_error)
    if (values[3]) {
      __pyx_v_a = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_a == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3558, __pyx_L3_error)
    } else {
      __pyx_v_a = ((double)1.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_fill_colorf", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3558, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_fill_colorf", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_48set_fill_colorf(__pyx_v_r, __pyx_v_g, __pyx_v_b, __pyx_v_a);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_48set_fill_colorf(double __pyx_v_r, double __pyx_v_g, double __pyx_v_b, double __pyx_v_a) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_fill_colorf", 0);

  /* "cgl_wrapper.pyx":3559
 *     @staticmethod
 *     def set_fill_colorf(r: float, g: float, b: float, a: float = 1.0):
 *         CGL_widgets_set_fill_colorf(r, g, b, a)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_fill_colorf(__pyx_v_r, __pyx_v_g, __pyx_v_b, __pyx_v_a);

  /* "cgl_wrapper.pyx":3558
 * 
 *     @staticmethod
 *     def set_fill_colorf(r: float, g: float, b: float, a: float = 1.0):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_colorf(r, g, b, a)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3562
 * 
 *     @staticmethod
 *     def set_fill_mode(enebled: bool):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_mode(enebled)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_51set_fill_mode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_51set_fill_mode = {"set_fill_mode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_51set_fill_mode, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_51set_fill_mode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  bool __pyx_v_enebled;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_fill_mode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_enebled,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_enebled)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_fill_mode") < 0)) __PYX_ERR(0, 3562, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_enebled = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_enebled == ((bool)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3562, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_fill_mode", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3562, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_fill_mode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_50set_fill_mode(__pyx_v_enebled);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_50set_fill_mode(bool __pyx_v_enebled) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_fill_mode", 0);

  /* "cgl_wrapper.pyx":3563
 *     @staticmethod
 *     def set_fill_mode(enebled: bool):
 *         CGL_widgets_set_fill_mode(enebled)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_fill_mode(__pyx_v_enebled);

  /* "cgl_wrapper.pyx":3562
 * 
 *     @staticmethod
 *     def set_fill_mode(enebled: bool):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_mode(enebled)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3566
 * 
 *     @staticmethod
 *     def set_projection_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_projection_matrix(&m.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_53set_projection_matrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_53set_projection_matrix = {"set_projection_matrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_53set_projection_matrix, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_53set_projection_matrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_mat4 *__pyx_v_m = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_projection_matrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_projection_matrix") < 0)) __PYX_ERR(0, 3566, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_m = ((struct __pyx_obj_3cgl_mat4 *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_projection_matrix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3566, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_projection_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 3566, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_52set_projection_matrix(__pyx_v_m);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_52set_projection_matrix(struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_projection_matrix", 0);

  /* "cgl_wrapper.pyx":3567
 *     @staticmethod
 *     def set_projection_matrix(m: mat4):
 *         CGL_widgets_set_projection_matrix(&m.c_mat4)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_projection_matrix((&__pyx_v_m->c_mat4));

  /* "cgl_wrapper.pyx":3566
 * 
 *     @staticmethod
 *     def set_projection_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_projection_matrix(&m.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3570
 * 
 *     @staticmethod
 *     def enable_diffuse_shading(light_pos: vec3, light_color: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_enable_diffuse_shading(light_pos.c_vec3, light_color.c_vec3)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_55enable_diffuse_shading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_55enable_diffuse_shading = {"enable_diffuse_shading", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_55enable_diffuse_shading, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_55enable_diffuse_shading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_light_pos = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_light_color = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enable_diffuse_shading (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_light_pos,&__pyx_n_s_light_color,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_light_pos)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_light_color)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("enable_diffuse_shading", 1, 2, 2, 1); __PYX_ERR(0, 3570, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "enable_diffuse_shading") < 0)) __PYX_ERR(0, 3570, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_light_pos = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_light_color = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("enable_diffuse_shading", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3570, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.enable_diffuse_shading", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_light_pos), __pyx_ptype_3cgl_vec3, 1, "light_pos", 0))) __PYX_ERR(0, 3570, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_light_color), __pyx_ptype_3cgl_vec3, 1, "light_color", 0))) __PYX_ERR(0, 3570, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_54enable_diffuse_shading(__pyx_v_light_pos, __pyx_v_light_color);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_54enable_diffuse_shading(struct __pyx_obj_3cgl_vec3 *__pyx_v_light_pos, struct __pyx_obj_3cgl_vec3 *__pyx_v_light_color) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("enable_diffuse_shading", 0);

  /* "cgl_wrapper.pyx":3571
 *     @staticmethod
 *     def enable_diffuse_shading(light_pos: vec3, light_color: vec3):
 *         CGL_widgets_enable_diffuse_shading(light_pos.c_vec3, light_color.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_enable_diffuse_shading(__pyx_v_light_pos->c_vec3, __pyx_v_light_color->c_vec3);

  /* "cgl_wrapper.pyx":3570
 * 
 *     @staticmethod
 *     def enable_diffuse_shading(light_pos: vec3, light_color: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_enable_diffuse_shading(light_pos.c_vec3, light_color.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3574
 * 
 *     @staticmethod
 *     def disable_diffuse_shading():             # <<<<<<<<<<<<<<
 *         CGL_widgets_disable_diffuse_shading()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_57disable_diffuse_shading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_57disable_diffuse_shading = {"disable_diffuse_shading", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_57disable_diffuse_shading, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_57disable_diffuse_shading(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("disable_diffuse_shading (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("disable_diffuse_shading", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "disable_diffuse_shading", 0))) return NULL;
  __pyx_r = __pyx_pf_3cgl_7widgets_56disable_diffuse_shading();

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_56disable_diffuse_shading(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("disable_diffuse_shading", 0);

  /* "cgl_wrapper.pyx":3575
 *     @staticmethod
 *     def disable_diffuse_shading():
 *         CGL_widgets_disable_diffuse_shading()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_disable_diffuse_shading();

  /* "cgl_wrapper.pyx":3574
 * 
 *     @staticmethod
 *     def disable_diffuse_shading():             # <<<<<<<<<<<<<<
 *         CGL_widgets_disable_diffuse_shading()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3578
 * 
 *     @staticmethod
 *     def set_view_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_view_matrix(&m.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_59set_view_matrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_59set_view_matrix = {"set_view_matrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_59set_view_matrix, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_59set_view_matrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_mat4 *__pyx_v_m = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_view_matrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_view_matrix") < 0)) __PYX_ERR(0, 3578, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_m = ((struct __pyx_obj_3cgl_mat4 *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_view_matrix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3578, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_view_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 3578, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_58set_view_matrix(__pyx_v_m);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_58set_view_matrix(struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_view_matrix", 0);

  /* "cgl_wrapper.pyx":3579
 *     @staticmethod
 *     def set_view_matrix(m: mat4):
 *         CGL_widgets_set_view_matrix(&m.c_mat4)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_view_matrix((&__pyx_v_m->c_mat4));

  /* "cgl_wrapper.pyx":3578
 * 
 *     @staticmethod
 *     def set_view_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_view_matrix(&m.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3582
 * 
 *     @staticmethod
 *     def set_model_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_model_matrix(&m.c_mat4)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_61set_model_matrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_61set_model_matrix = {"set_model_matrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_61set_model_matrix, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_61set_model_matrix(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_mat4 *__pyx_v_m = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_model_matrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_m,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_m)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_model_matrix") < 0)) __PYX_ERR(0, 3582, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_m = ((struct __pyx_obj_3cgl_mat4 *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_model_matrix", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3582, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_model_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_m), __pyx_ptype_3cgl_mat4, 1, "m", 0))) __PYX_ERR(0, 3582, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_60set_model_matrix(__pyx_v_m);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_60set_model_matrix(struct __pyx_obj_3cgl_mat4 *__pyx_v_m) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_model_matrix", 0);

  /* "cgl_wrapper.pyx":3583
 *     @staticmethod
 *     def set_model_matrix(m: mat4):
 *         CGL_widgets_set_model_matrix(&m.c_mat4)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_model_matrix((&__pyx_v_m->c_mat4));

  /* "cgl_wrapper.pyx":3582
 * 
 *     @staticmethod
 *     def set_model_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_model_matrix(&m.c_mat4)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3586
 * 
 *     @staticmethod
 *     def set_texture(tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_texture(tex.c_texture)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_63set_texture(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_63set_texture = {"set_texture", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_63set_texture, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_63set_texture(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_texture *__pyx_v_tex = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_texture (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tex,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tex)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_texture") < 0)) __PYX_ERR(0, 3586, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_tex = ((struct __pyx_obj_3cgl_texture *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_texture", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3586, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_texture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tex), __pyx_ptype_3cgl_texture, 1, "tex", 0))) __PYX_ERR(0, 3586, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_62set_texture(__pyx_v_tex);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_62set_texture(struct __pyx_obj_3cgl_texture *__pyx_v_tex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_texture", 0);

  /* "cgl_wrapper.pyx":3587
 *     @staticmethod
 *     def set_texture(tex: texture):
 *         CGL_widgets_set_texture(tex.c_texture)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_texture(__pyx_v_tex->c_texture);

  /* "cgl_wrapper.pyx":3586
 * 
 *     @staticmethod
 *     def set_texture(tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_texture(tex.c_texture)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3590
 * 
 *     @staticmethod
 *     def set_font_texture(tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_font_texture(tex.c_texture)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_65set_font_texture(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_65set_font_texture = {"set_font_texture", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_65set_font_texture, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_65set_font_texture(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_texture *__pyx_v_tex = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_font_texture (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_tex,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tex)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_font_texture") < 0)) __PYX_ERR(0, 3590, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_tex = ((struct __pyx_obj_3cgl_texture *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_font_texture", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3590, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_font_texture", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tex), __pyx_ptype_3cgl_texture, 1, "tex", 0))) __PYX_ERR(0, 3590, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_64set_font_texture(__pyx_v_tex);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_64set_font_texture(struct __pyx_obj_3cgl_texture *__pyx_v_tex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_font_texture", 0);

  /* "cgl_wrapper.pyx":3591
 *     @staticmethod
 *     def set_font_texture(tex: texture):
 *         CGL_widgets_set_font_texture(tex.c_texture)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_font_texture(__pyx_v_tex->c_texture);

  /* "cgl_wrapper.pyx":3590
 * 
 *     @staticmethod
 *     def set_font_texture(tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_font_texture(tex.c_texture)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3594
 * 
 *     @staticmethod
 *     def set_texture_coordinate_so(scale_x: float, scale_y: float, offset_x: float, offset_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_texture_coordinate_so(scale_x, scale_y, offset_x, offset_y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_67set_texture_coordinate_so(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_67set_texture_coordinate_so = {"set_texture_coordinate_so", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_67set_texture_coordinate_so, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_67set_texture_coordinate_so(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_scale_x;
  double __pyx_v_scale_y;
  double __pyx_v_offset_x;
  double __pyx_v_offset_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_texture_coordinate_so (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_scale_x,&__pyx_n_s_scale_y,&__pyx_n_s_offset_x,&__pyx_n_s_offset_y,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_texture_coordinate_so", 1, 4, 4, 1); __PYX_ERR(0, 3594, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_texture_coordinate_so", 1, 4, 4, 2); __PYX_ERR(0, 3594, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("set_texture_coordinate_so", 1, 4, 4, 3); __PYX_ERR(0, 3594, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_texture_coordinate_so") < 0)) __PYX_ERR(0, 3594, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_scale_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_scale_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3594, __pyx_L3_error)
    __pyx_v_scale_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_scale_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3594, __pyx_L3_error)
    __pyx_v_offset_x = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_offset_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3594, __pyx_L3_error)
    __pyx_v_offset_y = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_offset_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3594, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("set_texture_coordinate_so", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3594, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.set_texture_coordinate_so", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_66set_texture_coordinate_so(__pyx_v_scale_x, __pyx_v_scale_y, __pyx_v_offset_x, __pyx_v_offset_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_66set_texture_coordinate_so(double __pyx_v_scale_x, double __pyx_v_scale_y, double __pyx_v_offset_x, double __pyx_v_offset_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("set_texture_coordinate_so", 0);

  /* "cgl_wrapper.pyx":3595
 *     @staticmethod
 *     def set_texture_coordinate_so(scale_x: float, scale_y: float, offset_x: float, offset_y: float):
 *         CGL_widgets_set_texture_coordinate_so(scale_x, scale_y, offset_x, offset_y)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_set_texture_coordinate_so(__pyx_v_scale_x, __pyx_v_scale_y, __pyx_v_offset_x, __pyx_v_offset_y);

  /* "cgl_wrapper.pyx":3594
 * 
 *     @staticmethod
 *     def set_texture_coordinate_so(scale_x: float, scale_y: float, offset_x: float, offset_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_texture_coordinate_so(scale_x, scale_y, offset_x, offset_y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3598
 * 
 *     @staticmethod
 *     def apply_transformations_on_cpu():             # <<<<<<<<<<<<<<
 *         CGL_widgets_apply_transformations_on_cpu()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_69apply_transformations_on_cpu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_69apply_transformations_on_cpu = {"apply_transformations_on_cpu", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_69apply_transformations_on_cpu, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_69apply_transformations_on_cpu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_transformations_on_cpu (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("apply_transformations_on_cpu", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "apply_transformations_on_cpu", 0))) return NULL;
  __pyx_r = __pyx_pf_3cgl_7widgets_68apply_transformations_on_cpu();

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_68apply_transformations_on_cpu(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_transformations_on_cpu", 0);

  /* "cgl_wrapper.pyx":3599
 *     @staticmethod
 *     def apply_transformations_on_cpu():
 *         CGL_widgets_apply_transformations_on_cpu()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_apply_transformations_on_cpu();

  /* "cgl_wrapper.pyx":3598
 * 
 *     @staticmethod
 *     def apply_transformations_on_cpu():             # <<<<<<<<<<<<<<
 *         CGL_widgets_apply_transformations_on_cpu()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3602
 * 
 *     @staticmethod
 *     def apply_transformations_on_gpu():             # <<<<<<<<<<<<<<
 *         CGL_widgets_apply_transformations_on_gpu()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_71apply_transformations_on_gpu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_71apply_transformations_on_gpu = {"apply_transformations_on_gpu", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_71apply_transformations_on_gpu, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_71apply_transformations_on_gpu(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_transformations_on_gpu (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("apply_transformations_on_gpu", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "apply_transformations_on_gpu", 0))) return NULL;
  __pyx_r = __pyx_pf_3cgl_7widgets_70apply_transformations_on_gpu();

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_70apply_transformations_on_gpu(void) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("apply_transformations_on_gpu", 0);

  /* "cgl_wrapper.pyx":3603
 *     @staticmethod
 *     def apply_transformations_on_gpu():
 *         CGL_widgets_apply_transformations_on_gpu()             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_apply_transformations_on_gpu();

  /* "cgl_wrapper.pyx":3602
 * 
 *     @staticmethod
 *     def apply_transformations_on_gpu():             # <<<<<<<<<<<<<<
 *         CGL_widgets_apply_transformations_on_gpu()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3606
 * 
 *     @staticmethod
 *     def add_triangle(a: vec3, b: vec3, c: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_73add_triangle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_73add_triangle = {"add_triangle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_73add_triangle, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_73add_triangle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_c = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_triangle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_triangle", 1, 3, 3, 1); __PYX_ERR(0, 3606, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_triangle", 1, 3, 3, 2); __PYX_ERR(0, 3606, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_triangle") < 0)) __PYX_ERR(0, 3606, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_triangle", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3606, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec3, 1, "a", 0))) __PYX_ERR(0, 3606, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec3, 1, "b", 0))) __PYX_ERR(0, 3606, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec3, 1, "c", 0))) __PYX_ERR(0, 3606, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_72add_triangle(__pyx_v_a, __pyx_v_b, __pyx_v_c);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_72add_triangle(struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_triangle", 0);

  /* "cgl_wrapper.pyx":3607
 *     @staticmethod
 *     def add_triangle(a: vec3, b: vec3, c: vec3):
 *         CGL_widgets_add_triangle(a.c_vec3, b.c_vec3, c.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_triangle(__pyx_v_a->c_vec3, __pyx_v_b->c_vec3, __pyx_v_c->c_vec3);

  /* "cgl_wrapper.pyx":3606
 * 
 *     @staticmethod
 *     def add_triangle(a: vec3, b: vec3, c: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3610
 * 
 *     @staticmethod
 *     def add_quad(a: vec3, b: vec3, c: vec3, d: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_75add_quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_75add_quad = {"add_quad", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_75add_quad, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_75add_quad(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_a = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_b = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_c = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_d = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_quad (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_c,&__pyx_n_s_d,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad", 1, 4, 4, 1); __PYX_ERR(0, 3610, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad", 1, 4, 4, 2); __PYX_ERR(0, 3610, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad", 1, 4, 4, 3); __PYX_ERR(0, 3610, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_quad") < 0)) __PYX_ERR(0, 3610, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_a = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_b = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_c = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
    __pyx_v_d = ((struct __pyx_obj_3cgl_vec3 *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_quad", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3610, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_quad", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_a), __pyx_ptype_3cgl_vec3, 1, "a", 0))) __PYX_ERR(0, 3610, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), __pyx_ptype_3cgl_vec3, 1, "b", 0))) __PYX_ERR(0, 3610, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_3cgl_vec3, 1, "c", 0))) __PYX_ERR(0, 3610, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_d), __pyx_ptype_3cgl_vec3, 1, "d", 0))) __PYX_ERR(0, 3610, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_74add_quad(__pyx_v_a, __pyx_v_b, __pyx_v_c, __pyx_v_d);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_74add_quad(struct __pyx_obj_3cgl_vec3 *__pyx_v_a, struct __pyx_obj_3cgl_vec3 *__pyx_v_b, struct __pyx_obj_3cgl_vec3 *__pyx_v_c, struct __pyx_obj_3cgl_vec3 *__pyx_v_d) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_quad", 0);

  /* "cgl_wrapper.pyx":3611
 *     @staticmethod
 *     def add_quad(a: vec3, b: vec3, c: vec3, d: vec3):
 *         CGL_widgets_add_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_quad(__pyx_v_a->c_vec3, __pyx_v_b->c_vec3, __pyx_v_c->c_vec3, __pyx_v_d->c_vec3);

  /* "cgl_wrapper.pyx":3610
 * 
 *     @staticmethod
 *     def add_quad(a: vec3, b: vec3, c: vec3, d: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3614
 * 
 *     @staticmethod
 *     def add_quad_8f(a_x: float, a_y: float, b_x: float, b_y: float, c_x: float, c_y: float, d_x: float, d_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_quad_8f(a_x, a_y, b_x, b_y, c_x, c_y, d_x, d_y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_77add_quad_8f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_77add_quad_8f = {"add_quad_8f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_77add_quad_8f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_77add_quad_8f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_a_x;
  double __pyx_v_a_y;
  double __pyx_v_b_x;
  double __pyx_v_b_y;
  double __pyx_v_c_x;
  double __pyx_v_c_y;
  double __pyx_v_d_x;
  double __pyx_v_d_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_quad_8f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a_x,&__pyx_n_s_a_y,&__pyx_n_s_b_x,&__pyx_n_s_b_y,&__pyx_n_s_c_x,&__pyx_n_s_c_y,&__pyx_n_s_d_x,&__pyx_n_s_d_y,0};
    PyObject* values[8] = {0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_a_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad_8f", 1, 8, 8, 1); __PYX_ERR(0, 3614, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad_8f", 1, 8, 8, 2); __PYX_ERR(0, 3614, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_b_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad_8f", 1, 8, 8, 3); __PYX_ERR(0, 3614, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad_8f", 1, 8, 8, 4); __PYX_ERR(0, 3614, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_c_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad_8f", 1, 8, 8, 5); __PYX_ERR(0, 3614, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad_8f", 1, 8, 8, 6); __PYX_ERR(0, 3614, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_d_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_quad_8f", 1, 8, 8, 7); __PYX_ERR(0, 3614, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_quad_8f") < 0)) __PYX_ERR(0, 3614, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 8) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
    }
    __pyx_v_a_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_a_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3614, __pyx_L3_error)
    __pyx_v_a_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_a_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3614, __pyx_L3_error)
    __pyx_v_b_x = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_b_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3614, __pyx_L3_error)
    __pyx_v_b_y = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_b_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3614, __pyx_L3_error)
    __pyx_v_c_x = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_c_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3614, __pyx_L3_error)
    __pyx_v_c_y = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_c_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3614, __pyx_L3_error)
    __pyx_v_d_x = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_d_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3614, __pyx_L3_error)
    __pyx_v_d_y = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_d_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3614, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_quad_8f", 1, 8, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3614, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_quad_8f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_76add_quad_8f(__pyx_v_a_x, __pyx_v_a_y, __pyx_v_b_x, __pyx_v_b_y, __pyx_v_c_x, __pyx_v_c_y, __pyx_v_d_x, __pyx_v_d_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_76add_quad_8f(double __pyx_v_a_x, double __pyx_v_a_y, double __pyx_v_b_x, double __pyx_v_b_y, double __pyx_v_c_x, double __pyx_v_c_y, double __pyx_v_d_x, double __pyx_v_d_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_quad_8f", 0);

  /* "cgl_wrapper.pyx":3615
 *     @staticmethod
 *     def add_quad_8f(a_x: float, a_y: float, b_x: float, b_y: float, c_x: float, c_y: float, d_x: float, d_y: float):
 *         CGL_widgets_add_quad_8f(a_x, a_y, b_x, b_y, c_x, c_y, d_x, d_y)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_quad_8f(__pyx_v_a_x, __pyx_v_a_y, __pyx_v_b_x, __pyx_v_b_y, __pyx_v_c_x, __pyx_v_c_y, __pyx_v_d_x, __pyx_v_d_y);

  /* "cgl_wrapper.pyx":3614
 * 
 *     @staticmethod
 *     def add_quad_8f(a_x: float, a_y: float, b_x: float, b_y: float, c_x: float, c_y: float, d_x: float, d_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_quad_8f(a_x, a_y, b_x, b_y, c_x, c_y, d_x, d_y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3618
 * 
 *     @staticmethod
 *     def add_line(start: vec3, end: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_line(start.c_vec3, end.c_vec3)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_79add_line(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_79add_line = {"add_line", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_79add_line, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_79add_line(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_start = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_end = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_line (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_end,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_line", 1, 2, 2, 1); __PYX_ERR(0, 3618, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_line") < 0)) __PYX_ERR(0, 3618, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_start = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_end = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_line", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3618, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_line", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), __pyx_ptype_3cgl_vec3, 1, "start", 0))) __PYX_ERR(0, 3618, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_end), __pyx_ptype_3cgl_vec3, 1, "end", 0))) __PYX_ERR(0, 3618, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_78add_line(__pyx_v_start, __pyx_v_end);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_78add_line(struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec3 *__pyx_v_end) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_line", 0);

  /* "cgl_wrapper.pyx":3619
 *     @staticmethod
 *     def add_line(start: vec3, end: vec3):
 *         CGL_widgets_add_line(start.c_vec3, end.c_vec3)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_line(__pyx_v_start->c_vec3, __pyx_v_end->c_vec3);

  /* "cgl_wrapper.pyx":3618
 * 
 *     @staticmethod
 *     def add_line(start: vec3, end: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_line(start.c_vec3, end.c_vec3)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3622
 * 
 *     @staticmethod
 *     def add_line2f(start_x: float, start_y: float, end_x: float, end_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_line2f(start_x, start_y, end_x, end_y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_81add_line2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_81add_line2f = {"add_line2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_81add_line2f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_81add_line2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_start_x;
  double __pyx_v_start_y;
  double __pyx_v_end_x;
  double __pyx_v_end_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_line2f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start_x,&__pyx_n_s_start_y,&__pyx_n_s_end_x,&__pyx_n_s_end_y,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_line2f", 1, 4, 4, 1); __PYX_ERR(0, 3622, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_line2f", 1, 4, 4, 2); __PYX_ERR(0, 3622, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_line2f", 1, 4, 4, 3); __PYX_ERR(0, 3622, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_line2f") < 0)) __PYX_ERR(0, 3622, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_start_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_start_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3622, __pyx_L3_error)
    __pyx_v_start_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_start_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3622, __pyx_L3_error)
    __pyx_v_end_x = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_end_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3622, __pyx_L3_error)
    __pyx_v_end_y = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_end_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3622, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_line2f", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3622, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_line2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_80add_line2f(__pyx_v_start_x, __pyx_v_start_y, __pyx_v_end_x, __pyx_v_end_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_80add_line2f(double __pyx_v_start_x, double __pyx_v_start_y, double __pyx_v_end_x, double __pyx_v_end_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_line2f", 0);

  /* "cgl_wrapper.pyx":3623
 *     @staticmethod
 *     def add_line2f(start_x: float, start_y: float, end_x: float, end_y: float):
 *         CGL_widgets_add_line2f(start_x, start_y, end_x, end_y)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_line2f(__pyx_v_start_x, __pyx_v_start_y, __pyx_v_end_x, __pyx_v_end_y);

  /* "cgl_wrapper.pyx":3622
 * 
 *     @staticmethod
 *     def add_line2f(start_x: float, start_y: float, end_x: float, end_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_line2f(start_x, start_y, end_x, end_y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3626
 * 
 *     @staticmethod
 *     def add_rect(start: vec3, size: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_rect(start.c_vec3, size.c_vec2)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_83add_rect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_83add_rect = {"add_rect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_83add_rect, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_83add_rect(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_start = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_size = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_rect (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_size,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_rect", 1, 2, 2, 1); __PYX_ERR(0, 3626, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_rect") < 0)) __PYX_ERR(0, 3626, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_start = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_size = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_rect", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3626, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_rect", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), __pyx_ptype_3cgl_vec3, 1, "start", 0))) __PYX_ERR(0, 3626, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_size), __pyx_ptype_3cgl_vec2, 1, "size", 0))) __PYX_ERR(0, 3626, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_82add_rect(__pyx_v_start, __pyx_v_size);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_82add_rect(struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec2 *__pyx_v_size) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_rect", 0);

  /* "cgl_wrapper.pyx":3627
 *     @staticmethod
 *     def add_rect(start: vec3, size: vec2):
 *         CGL_widgets_add_rect(start.c_vec3, size.c_vec2)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_rect(__pyx_v_start->c_vec3, __pyx_v_size->c_vec2);

  /* "cgl_wrapper.pyx":3626
 * 
 *     @staticmethod
 *     def add_rect(start: vec3, size: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_rect(start.c_vec3, size.c_vec2)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3630
 * 
 *     @staticmethod
 *     def add_rect2f(start_x: float, start_y: float, size_x: float, size_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_rect2f(start_x, start_y, size_x, size_y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_85add_rect2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_85add_rect2f = {"add_rect2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_85add_rect2f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_85add_rect2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_start_x;
  double __pyx_v_start_y;
  double __pyx_v_size_x;
  double __pyx_v_size_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_rect2f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start_x,&__pyx_n_s_start_y,&__pyx_n_s_size_x,&__pyx_n_s_size_y,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_rect2f", 1, 4, 4, 1); __PYX_ERR(0, 3630, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_rect2f", 1, 4, 4, 2); __PYX_ERR(0, 3630, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_rect2f", 1, 4, 4, 3); __PYX_ERR(0, 3630, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_rect2f") < 0)) __PYX_ERR(0, 3630, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_start_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_start_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3630, __pyx_L3_error)
    __pyx_v_start_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_start_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3630, __pyx_L3_error)
    __pyx_v_size_x = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_size_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3630, __pyx_L3_error)
    __pyx_v_size_y = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_size_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3630, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_rect2f", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3630, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_rect2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_84add_rect2f(__pyx_v_start_x, __pyx_v_start_y, __pyx_v_size_x, __pyx_v_size_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_84add_rect2f(double __pyx_v_start_x, double __pyx_v_start_y, double __pyx_v_size_x, double __pyx_v_size_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_rect2f", 0);

  /* "cgl_wrapper.pyx":3631
 *     @staticmethod
 *     def add_rect2f(start_x: float, start_y: float, size_x: float, size_y: float):
 *         CGL_widgets_add_rect2f(start_x, start_y, size_x, size_y)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_rect2f(__pyx_v_start_x, __pyx_v_start_y, __pyx_v_size_x, __pyx_v_size_y);

  /* "cgl_wrapper.pyx":3630
 * 
 *     @staticmethod
 *     def add_rect2f(start_x: float, start_y: float, size_x: float, size_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_rect2f(start_x, start_y, size_x, size_y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3634
 * 
 *     @staticmethod
 *     def add_circle(position: vec3, radius: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle(position.c_vec3, radius)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_87add_circle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_87add_circle = {"add_circle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_87add_circle, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_87add_circle(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_position = 0;
  double __pyx_v_radius;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_circle (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position,&__pyx_n_s_radius,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_circle", 1, 2, 2, 1); __PYX_ERR(0, 3634, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_circle") < 0)) __PYX_ERR(0, 3634, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_position = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_radius = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3634, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_circle", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3634, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_circle", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_position), __pyx_ptype_3cgl_vec3, 1, "position", 0))) __PYX_ERR(0, 3634, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_86add_circle(__pyx_v_position, __pyx_v_radius);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_86add_circle(struct __pyx_obj_3cgl_vec3 *__pyx_v_position, double __pyx_v_radius) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_circle", 0);

  /* "cgl_wrapper.pyx":3635
 *     @staticmethod
 *     def add_circle(position: vec3, radius: float):
 *         CGL_widgets_add_circle(position.c_vec3, radius)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_circle(__pyx_v_position->c_vec3, __pyx_v_radius);

  /* "cgl_wrapper.pyx":3634
 * 
 *     @staticmethod
 *     def add_circle(position: vec3, radius: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle(position.c_vec3, radius)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3638
 * 
 *     @staticmethod
 *     def add_circle2f(position_x: float, position_y: float, radius: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle2f(position_x, position_y, radius)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_89add_circle2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_89add_circle2f = {"add_circle2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_89add_circle2f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_89add_circle2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_position_x;
  double __pyx_v_position_y;
  double __pyx_v_radius;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_circle2f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position_x,&__pyx_n_s_position_y,&__pyx_n_s_radius,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_circle2f", 1, 3, 3, 1); __PYX_ERR(0, 3638, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_circle2f", 1, 3, 3, 2); __PYX_ERR(0, 3638, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_circle2f") < 0)) __PYX_ERR(0, 3638, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_position_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_position_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3638, __pyx_L3_error)
    __pyx_v_position_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_position_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3638, __pyx_L3_error)
    __pyx_v_radius = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3638, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_circle2f", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3638, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_circle2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_88add_circle2f(__pyx_v_position_x, __pyx_v_position_y, __pyx_v_radius);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_88add_circle2f(double __pyx_v_position_x, double __pyx_v_position_y, double __pyx_v_radius) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_circle2f", 0);

  /* "cgl_wrapper.pyx":3639
 *     @staticmethod
 *     def add_circle2f(position_x: float, position_y: float, radius: float):
 *         CGL_widgets_add_circle2f(position_x, position_y, radius)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_circle2f(__pyx_v_position_x, __pyx_v_position_y, __pyx_v_radius);

  /* "cgl_wrapper.pyx":3638
 * 
 *     @staticmethod
 *     def add_circle2f(position_x: float, position_y: float, radius: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle2f(position_x, position_y, radius)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3642
 * 
 *     @staticmethod
 *     def add_circler(position: vec3, radius: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circler(position.c_vec3, radius, segments)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_91add_circler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_91add_circler = {"add_circler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_91add_circler, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_91add_circler(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_position = 0;
  double __pyx_v_radius;
  PyObject *__pyx_v_segments = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_circler (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position,&__pyx_n_s_radius,&__pyx_n_s_segments,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_circler", 1, 3, 3, 1); __PYX_ERR(0, 3642, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_segments)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_circler", 1, 3, 3, 2); __PYX_ERR(0, 3642, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_circler") < 0)) __PYX_ERR(0, 3642, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_position = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_radius = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3642, __pyx_L3_error)
    __pyx_v_segments = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_circler", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3642, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_circler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_position), __pyx_ptype_3cgl_vec3, 1, "position", 0))) __PYX_ERR(0, 3642, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_90add_circler(__pyx_v_position, __pyx_v_radius, __pyx_v_segments);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_90add_circler(struct __pyx_obj_3cgl_vec3 *__pyx_v_position, double __pyx_v_radius, PyObject *__pyx_v_segments) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_circler", 0);

  /* "cgl_wrapper.pyx":3643
 *     @staticmethod
 *     def add_circler(position: vec3, radius: float, segments: int):
 *         CGL_widgets_add_circler(position.c_vec3, radius, segments)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_segments); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3643, __pyx_L1_error)
  CGL_widgets_add_circler(__pyx_v_position->c_vec3, __pyx_v_radius, __pyx_t_1);

  /* "cgl_wrapper.pyx":3642
 * 
 *     @staticmethod
 *     def add_circler(position: vec3, radius: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circler(position.c_vec3, radius, segments)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.widgets.add_circler", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3646
 * 
 *     @staticmethod
 *     def add_circler2fr(position_x: float, position_y: float, radius: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle2fr(position_x, position_y, radius, segments)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_93add_circler2fr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_93add_circler2fr = {"add_circler2fr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_93add_circler2fr, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_93add_circler2fr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_position_x;
  double __pyx_v_position_y;
  double __pyx_v_radius;
  PyObject *__pyx_v_segments = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_circler2fr (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position_x,&__pyx_n_s_position_y,&__pyx_n_s_radius,&__pyx_n_s_segments,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_circler2fr", 1, 4, 4, 1); __PYX_ERR(0, 3646, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_circler2fr", 1, 4, 4, 2); __PYX_ERR(0, 3646, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_segments)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_circler2fr", 1, 4, 4, 3); __PYX_ERR(0, 3646, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_circler2fr") < 0)) __PYX_ERR(0, 3646, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_position_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_position_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3646, __pyx_L3_error)
    __pyx_v_position_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_position_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3646, __pyx_L3_error)
    __pyx_v_radius = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3646, __pyx_L3_error)
    __pyx_v_segments = values[3];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_circler2fr", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3646, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_circler2fr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_92add_circler2fr(__pyx_v_position_x, __pyx_v_position_y, __pyx_v_radius, __pyx_v_segments);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_92add_circler2fr(double __pyx_v_position_x, double __pyx_v_position_y, double __pyx_v_radius, PyObject *__pyx_v_segments) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_circler2fr", 0);

  /* "cgl_wrapper.pyx":3647
 *     @staticmethod
 *     def add_circler2fr(position_x: float, position_y: float, radius: float, segments: int):
 *         CGL_widgets_add_circle2fr(position_x, position_y, radius, segments)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_segments); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3647, __pyx_L1_error)
  CGL_widgets_add_circle2fr(__pyx_v_position_x, __pyx_v_position_y, __pyx_v_radius, __pyx_t_1);

  /* "cgl_wrapper.pyx":3646
 * 
 *     @staticmethod
 *     def add_circler2fr(position_x: float, position_y: float, radius: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle2fr(position_x, position_y, radius, segments)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.widgets.add_circler2fr", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3650
 * 
 *     @staticmethod
 *     def add_oval(position: vec3, radius: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_oval(position.c_vec3, radius.c_vec2)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_95add_oval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_95add_oval = {"add_oval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_95add_oval, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_95add_oval(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_position = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_radius = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_oval (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position,&__pyx_n_s_radius,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_oval", 1, 2, 2, 1); __PYX_ERR(0, 3650, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_oval") < 0)) __PYX_ERR(0, 3650, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_position = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_radius = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_oval", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3650, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_oval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_position), __pyx_ptype_3cgl_vec3, 1, "position", 0))) __PYX_ERR(0, 3650, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_radius), __pyx_ptype_3cgl_vec2, 1, "radius", 0))) __PYX_ERR(0, 3650, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_94add_oval(__pyx_v_position, __pyx_v_radius);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_94add_oval(struct __pyx_obj_3cgl_vec3 *__pyx_v_position, struct __pyx_obj_3cgl_vec2 *__pyx_v_radius) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_oval", 0);

  /* "cgl_wrapper.pyx":3651
 *     @staticmethod
 *     def add_oval(position: vec3, radius: vec2):
 *         CGL_widgets_add_oval(position.c_vec3, radius.c_vec2)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_oval(__pyx_v_position->c_vec3, __pyx_v_radius->c_vec2);

  /* "cgl_wrapper.pyx":3650
 * 
 *     @staticmethod
 *     def add_oval(position: vec3, radius: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_oval(position.c_vec3, radius.c_vec2)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3654
 * 
 *     @staticmethod
 *     def add_oval2f(position_x: float, position_y: float, radius_x: float, radius_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_oval2f(position_x, position_y, radius_x, radius_y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_97add_oval2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_97add_oval2f = {"add_oval2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_97add_oval2f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_97add_oval2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_position_x;
  double __pyx_v_position_y;
  double __pyx_v_radius_x;
  double __pyx_v_radius_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_oval2f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position_x,&__pyx_n_s_position_y,&__pyx_n_s_radius_x,&__pyx_n_s_radius_y,0};
    PyObject* values[4] = {0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_oval2f", 1, 4, 4, 1); __PYX_ERR(0, 3654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_oval2f", 1, 4, 4, 2); __PYX_ERR(0, 3654, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_oval2f", 1, 4, 4, 3); __PYX_ERR(0, 3654, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_oval2f") < 0)) __PYX_ERR(0, 3654, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
    }
    __pyx_v_position_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_position_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L3_error)
    __pyx_v_position_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_position_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L3_error)
    __pyx_v_radius_x = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_radius_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L3_error)
    __pyx_v_radius_y = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_radius_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3654, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_oval2f", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3654, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_oval2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_96add_oval2f(__pyx_v_position_x, __pyx_v_position_y, __pyx_v_radius_x, __pyx_v_radius_y);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_96add_oval2f(double __pyx_v_position_x, double __pyx_v_position_y, double __pyx_v_radius_x, double __pyx_v_radius_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_oval2f", 0);

  /* "cgl_wrapper.pyx":3655
 *     @staticmethod
 *     def add_oval2f(position_x: float, position_y: float, radius_x: float, radius_y: float):
 *         CGL_widgets_add_oval2f(position_x, position_y, radius_x, radius_y)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_oval2f(__pyx_v_position_x, __pyx_v_position_y, __pyx_v_radius_x, __pyx_v_radius_y);

  /* "cgl_wrapper.pyx":3654
 * 
 *     @staticmethod
 *     def add_oval2f(position_x: float, position_y: float, radius_x: float, radius_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_oval2f(position_x, position_y, radius_x, radius_y)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3658
 * 
 *     @staticmethod
 *     def add_arc2f(position_x: float, position_y: float, radius: float, start_angle: float, end_angle: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_arc2f(position_x, position_y, radius, start_angle, end_angle, segments)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_99add_arc2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_99add_arc2f = {"add_arc2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_99add_arc2f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_99add_arc2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_position_x;
  double __pyx_v_position_y;
  double __pyx_v_radius;
  double __pyx_v_start_angle;
  double __pyx_v_end_angle;
  PyObject *__pyx_v_segments = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_arc2f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_position_x,&__pyx_n_s_position_y,&__pyx_n_s_radius,&__pyx_n_s_start_angle,&__pyx_n_s_end_angle,&__pyx_n_s_segments,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_position_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_arc2f", 1, 6, 6, 1); __PYX_ERR(0, 3658, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_radius)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_arc2f", 1, 6, 6, 2); __PYX_ERR(0, 3658, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start_angle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_arc2f", 1, 6, 6, 3); __PYX_ERR(0, 3658, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end_angle)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_arc2f", 1, 6, 6, 4); __PYX_ERR(0, 3658, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_segments)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_arc2f", 1, 6, 6, 5); __PYX_ERR(0, 3658, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_arc2f") < 0)) __PYX_ERR(0, 3658, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_position_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_position_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L3_error)
    __pyx_v_position_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_position_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L3_error)
    __pyx_v_radius = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_radius == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L3_error)
    __pyx_v_start_angle = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_start_angle == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L3_error)
    __pyx_v_end_angle = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_end_angle == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3658, __pyx_L3_error)
    __pyx_v_segments = values[5];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_arc2f", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3658, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_arc2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_98add_arc2f(__pyx_v_position_x, __pyx_v_position_y, __pyx_v_radius, __pyx_v_start_angle, __pyx_v_end_angle, __pyx_v_segments);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_98add_arc2f(double __pyx_v_position_x, double __pyx_v_position_y, double __pyx_v_radius, double __pyx_v_start_angle, double __pyx_v_end_angle, PyObject *__pyx_v_segments) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_arc2f", 0);

  /* "cgl_wrapper.pyx":3659
 *     @staticmethod
 *     def add_arc2f(position_x: float, position_y: float, radius: float, start_angle: float, end_angle: float, segments: int):
 *         CGL_widgets_add_arc2f(position_x, position_y, radius, start_angle, end_angle, segments)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_segments); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3659, __pyx_L1_error)
  CGL_widgets_add_arc2f(__pyx_v_position_x, __pyx_v_position_y, __pyx_v_radius, __pyx_v_start_angle, __pyx_v_end_angle, __pyx_t_1);

  /* "cgl_wrapper.pyx":3658
 * 
 *     @staticmethod
 *     def add_arc2f(position_x: float, position_y: float, radius: float, start_angle: float, end_angle: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_arc2f(position_x, position_y, radius, start_angle, end_angle, segments)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.widgets.add_arc2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3662
 * 
 *     @staticmethod
 *     def add_character(ch: str, x: float, y: float, sx: float, sy: float) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_character(ch[0], x, y, sx, sy)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_101add_character(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_101add_character = {"add_character", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_101add_character, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_101add_character(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_ch = 0;
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_sx;
  double __pyx_v_sy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_character (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_ch,&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_sx,&__pyx_n_s_sy,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ch)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_character", 1, 5, 5, 1); __PYX_ERR(0, 3662, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_character", 1, 5, 5, 2); __PYX_ERR(0, 3662, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sx)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_character", 1, 5, 5, 3); __PYX_ERR(0, 3662, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_character", 1, 5, 5, 4); __PYX_ERR(0, 3662, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_character") < 0)) __PYX_ERR(0, 3662, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_ch = ((PyObject*)values[0]);
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3662, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3662, __pyx_L3_error)
    __pyx_v_sx = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_sx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3662, __pyx_L3_error)
    __pyx_v_sy = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_sy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3662, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_character", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3662, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_ch), (&PyString_Type), 1, "ch", 1))) __PYX_ERR(0, 3662, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_100add_character(__pyx_v_ch, __pyx_v_x, __pyx_v_y, __pyx_v_sx, __pyx_v_sy);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_100add_character(PyObject *__pyx_v_ch, double __pyx_v_x, double __pyx_v_y, double __pyx_v_sx, double __pyx_v_sy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_character", 0);

  /* "cgl_wrapper.pyx":3663
 *     @staticmethod
 *     def add_character(ch: str, x: float, y: float, sx: float, sy: float) -> bool:
 *         return CGL_widgets_add_character(ch[0], x, y, sx, sy)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ch, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_As_char(__pyx_t_1); if (unlikely((__pyx_t_2 == (char)-1) && PyErr_Occurred())) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyBool_FromLong(CGL_widgets_add_character(__pyx_t_2, __pyx_v_x, __pyx_v_y, __pyx_v_sx, __pyx_v_sy)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3663, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3662
 * 
 *     @staticmethod
 *     def add_character(ch: str, x: float, y: float, sx: float, sy: float) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_character(ch[0], x, y, sx, sy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.widgets.add_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3666
 * 
 *     @staticmethod
 *     def add_string(st: str, x: float, y: float, sx: float, sy: float) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_string(st.encode('utf-8'), x, y, sx, sy)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_103add_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_103add_string = {"add_string", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_103add_string, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_103add_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_st = 0;
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_sx;
  double __pyx_v_sy;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_string (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_st,&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_sx,&__pyx_n_s_sy,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_st)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_string", 1, 5, 5, 1); __PYX_ERR(0, 3666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_string", 1, 5, 5, 2); __PYX_ERR(0, 3666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sx)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_string", 1, 5, 5, 3); __PYX_ERR(0, 3666, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sy)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_string", 1, 5, 5, 4); __PYX_ERR(0, 3666, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_string") < 0)) __PYX_ERR(0, 3666, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_st = ((PyObject*)values[0]);
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3666, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3666, __pyx_L3_error)
    __pyx_v_sx = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_sx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3666, __pyx_L3_error)
    __pyx_v_sy = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_sy == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3666, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3666, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_st), (&PyString_Type), 1, "st", 1))) __PYX_ERR(0, 3666, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_102add_string(__pyx_v_st, __pyx_v_x, __pyx_v_y, __pyx_v_sx, __pyx_v_sy);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_102add_string(PyObject *__pyx_v_st, double __pyx_v_x, double __pyx_v_y, double __pyx_v_sx, double __pyx_v_sy) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_string", 0);

  /* "cgl_wrapper.pyx":3667
 *     @staticmethod
 *     def add_string(st: str, x: float, y: float, sx: float, sy: float) -> bool:
 *         return CGL_widgets_add_string(st.encode('utf-8'), x, y, sx, sy)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_st, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3667, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyBool_FromLong(CGL_widgets_add_string(__pyx_t_2, __pyx_v_x, __pyx_v_y, __pyx_v_sx, __pyx_v_sy)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3667, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3666
 * 
 *     @staticmethod
 *     def add_string(st: str, x: float, y: float, sx: float, sy: float) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_string(st.encode('utf-8'), x, y, sx, sy)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.widgets.add_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3670
 * 
 *     @staticmethod
 *     def add_cubic_bazier(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_105add_cubic_bazier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_105add_cubic_bazier = {"add_cubic_bazier", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_105add_cubic_bazier, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_105add_cubic_bazier(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_start = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_end = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_control_1 = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_control_2 = 0;
  PyObject *__pyx_v_res = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_cubic_bazier (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_control_1,&__pyx_n_s_control_2,&__pyx_n_s_res,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier", 1, 5, 5, 1); __PYX_ERR(0, 3670, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier", 1, 5, 5, 2); __PYX_ERR(0, 3670, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier", 1, 5, 5, 3); __PYX_ERR(0, 3670, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier", 1, 5, 5, 4); __PYX_ERR(0, 3670, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_cubic_bazier") < 0)) __PYX_ERR(0, 3670, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_start = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_end = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_control_1 = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
    __pyx_v_control_2 = ((struct __pyx_obj_3cgl_vec3 *)values[3]);
    __pyx_v_res = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_cubic_bazier", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3670, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), __pyx_ptype_3cgl_vec3, 1, "start", 0))) __PYX_ERR(0, 3670, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_end), __pyx_ptype_3cgl_vec3, 1, "end", 0))) __PYX_ERR(0, 3670, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_control_1), __pyx_ptype_3cgl_vec3, 1, "control_1", 0))) __PYX_ERR(0, 3670, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_control_2), __pyx_ptype_3cgl_vec3, 1, "control_2", 0))) __PYX_ERR(0, 3670, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_104add_cubic_bazier(__pyx_v_start, __pyx_v_end, __pyx_v_control_1, __pyx_v_control_2, __pyx_v_res);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_104add_cubic_bazier(struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec3 *__pyx_v_end, struct __pyx_obj_3cgl_vec3 *__pyx_v_control_1, struct __pyx_obj_3cgl_vec3 *__pyx_v_control_2, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_cubic_bazier", 0);

  /* "cgl_wrapper.pyx":3671
 *     @staticmethod
 *     def add_cubic_bazier(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):
 *         CGL_widgets_add_cubic_bazier(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_res); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3671, __pyx_L1_error)
  CGL_widgets_add_cubic_bazier(__pyx_v_start->c_vec3, __pyx_v_end->c_vec3, __pyx_v_control_1->c_vec3, __pyx_v_control_2->c_vec3, __pyx_t_1);

  /* "cgl_wrapper.pyx":3670
 * 
 *     @staticmethod
 *     def add_cubic_bazier(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3674
 * 
 *     @staticmethod
 *     def add_cubic_bazier2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_107add_cubic_bazier2v(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_107add_cubic_bazier2v = {"add_cubic_bazier2v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_107add_cubic_bazier2v, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_107add_cubic_bazier2v(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec2 *__pyx_v_start = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_end = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_control_1 = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_control_2 = 0;
  PyObject *__pyx_v_res = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_cubic_bazier2v (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_control_1,&__pyx_n_s_control_2,&__pyx_n_s_res,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2v", 1, 5, 5, 1); __PYX_ERR(0, 3674, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2v", 1, 5, 5, 2); __PYX_ERR(0, 3674, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2v", 1, 5, 5, 3); __PYX_ERR(0, 3674, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2v", 1, 5, 5, 4); __PYX_ERR(0, 3674, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_cubic_bazier2v") < 0)) __PYX_ERR(0, 3674, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_start = ((struct __pyx_obj_3cgl_vec2 *)values[0]);
    __pyx_v_end = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
    __pyx_v_control_1 = ((struct __pyx_obj_3cgl_vec2 *)values[2]);
    __pyx_v_control_2 = ((struct __pyx_obj_3cgl_vec2 *)values[3]);
    __pyx_v_res = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2v", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3674, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier2v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), __pyx_ptype_3cgl_vec2, 1, "start", 0))) __PYX_ERR(0, 3674, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_end), __pyx_ptype_3cgl_vec2, 1, "end", 0))) __PYX_ERR(0, 3674, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_control_1), __pyx_ptype_3cgl_vec2, 1, "control_1", 0))) __PYX_ERR(0, 3674, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_control_2), __pyx_ptype_3cgl_vec2, 1, "control_2", 0))) __PYX_ERR(0, 3674, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_106add_cubic_bazier2v(__pyx_v_start, __pyx_v_end, __pyx_v_control_1, __pyx_v_control_2, __pyx_v_res);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_106add_cubic_bazier2v(struct __pyx_obj_3cgl_vec2 *__pyx_v_start, struct __pyx_obj_3cgl_vec2 *__pyx_v_end, struct __pyx_obj_3cgl_vec2 *__pyx_v_control_1, struct __pyx_obj_3cgl_vec2 *__pyx_v_control_2, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_cubic_bazier2v", 0);

  /* "cgl_wrapper.pyx":3675
 *     @staticmethod
 *     def add_cubic_bazier2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):
 *         CGL_widgets_add_cubic_bazier2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_res); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3675, __pyx_L1_error)
  CGL_widgets_add_cubic_bazier2v(__pyx_v_start->c_vec2, __pyx_v_end->c_vec2, __pyx_v_control_1->c_vec2, __pyx_v_control_2->c_vec2, __pyx_t_1);

  /* "cgl_wrapper.pyx":3674
 * 
 *     @staticmethod
 *     def add_cubic_bazier2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier2v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3678
 * 
 *     @staticmethod
 *     def add_cubic_bazier2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_109add_cubic_bazier2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_109add_cubic_bazier2f = {"add_cubic_bazier2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_109add_cubic_bazier2f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_109add_cubic_bazier2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_start_x;
  double __pyx_v_start_y;
  double __pyx_v_end_x;
  double __pyx_v_end_y;
  double __pyx_v_control_1_x;
  double __pyx_v_control_1_y;
  double __pyx_v_control_2_x;
  double __pyx_v_control_2_y;
  PyObject *__pyx_v_res = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_cubic_bazier2f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start_x,&__pyx_n_s_start_y,&__pyx_n_s_end_x,&__pyx_n_s_end_y,&__pyx_n_s_control_1_x,&__pyx_n_s_control_1_y,&__pyx_n_s_control_2_x,&__pyx_n_s_control_2_y,&__pyx_n_s_res,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2f", 1, 9, 9, 1); __PYX_ERR(0, 3678, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2f", 1, 9, 9, 2); __PYX_ERR(0, 3678, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2f", 1, 9, 9, 3); __PYX_ERR(0, 3678, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_1_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2f", 1, 9, 9, 4); __PYX_ERR(0, 3678, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_1_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2f", 1, 9, 9, 5); __PYX_ERR(0, 3678, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_2_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2f", 1, 9, 9, 6); __PYX_ERR(0, 3678, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_2_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2f", 1, 9, 9, 7); __PYX_ERR(0, 3678, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2f", 1, 9, 9, 8); __PYX_ERR(0, 3678, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_cubic_bazier2f") < 0)) __PYX_ERR(0, 3678, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
    }
    __pyx_v_start_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_start_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3678, __pyx_L3_error)
    __pyx_v_start_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_start_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3678, __pyx_L3_error)
    __pyx_v_end_x = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_end_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3678, __pyx_L3_error)
    __pyx_v_end_y = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_end_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3678, __pyx_L3_error)
    __pyx_v_control_1_x = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_control_1_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3678, __pyx_L3_error)
    __pyx_v_control_1_y = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_control_1_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3678, __pyx_L3_error)
    __pyx_v_control_2_x = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_control_2_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3678, __pyx_L3_error)
    __pyx_v_control_2_y = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_control_2_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3678, __pyx_L3_error)
    __pyx_v_res = values[8];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_cubic_bazier2f", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3678, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_108add_cubic_bazier2f(__pyx_v_start_x, __pyx_v_start_y, __pyx_v_end_x, __pyx_v_end_y, __pyx_v_control_1_x, __pyx_v_control_1_y, __pyx_v_control_2_x, __pyx_v_control_2_y, __pyx_v_res);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_108add_cubic_bazier2f(double __pyx_v_start_x, double __pyx_v_start_y, double __pyx_v_end_x, double __pyx_v_end_y, double __pyx_v_control_1_x, double __pyx_v_control_1_y, double __pyx_v_control_2_x, double __pyx_v_control_2_y, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_cubic_bazier2f", 0);

  /* "cgl_wrapper.pyx":3679
 *     @staticmethod
 *     def add_cubic_bazier2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):
 *         CGL_widgets_add_cubic_bazier2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_res); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3679, __pyx_L1_error)
  CGL_widgets_add_cubic_bazier2f(__pyx_v_start_x, __pyx_v_start_y, __pyx_v_end_x, __pyx_v_end_y, __pyx_v_control_1_x, __pyx_v_control_1_y, __pyx_v_control_2_x, __pyx_v_control_2_y, __pyx_t_1);

  /* "cgl_wrapper.pyx":3678
 * 
 *     @staticmethod
 *     def add_cubic_bazier2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3682
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_111add_cubic_bazier_points(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_111add_cubic_bazier_points = {"add_cubic_bazier_points", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_111add_cubic_bazier_points, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_111add_cubic_bazier_points(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec3 *__pyx_v_start = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_end = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_control_1 = 0;
  struct __pyx_obj_3cgl_vec3 *__pyx_v_control_2 = 0;
  PyObject *__pyx_v_res = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_cubic_bazier_points (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_control_1,&__pyx_n_s_control_2,&__pyx_n_s_res,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points", 1, 5, 5, 1); __PYX_ERR(0, 3682, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points", 1, 5, 5, 2); __PYX_ERR(0, 3682, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points", 1, 5, 5, 3); __PYX_ERR(0, 3682, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points", 1, 5, 5, 4); __PYX_ERR(0, 3682, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_cubic_bazier_points") < 0)) __PYX_ERR(0, 3682, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_start = ((struct __pyx_obj_3cgl_vec3 *)values[0]);
    __pyx_v_end = ((struct __pyx_obj_3cgl_vec3 *)values[1]);
    __pyx_v_control_1 = ((struct __pyx_obj_3cgl_vec3 *)values[2]);
    __pyx_v_control_2 = ((struct __pyx_obj_3cgl_vec3 *)values[3]);
    __pyx_v_res = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3682, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier_points", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), __pyx_ptype_3cgl_vec3, 1, "start", 0))) __PYX_ERR(0, 3682, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_end), __pyx_ptype_3cgl_vec3, 1, "end", 0))) __PYX_ERR(0, 3682, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_control_1), __pyx_ptype_3cgl_vec3, 1, "control_1", 0))) __PYX_ERR(0, 3682, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_control_2), __pyx_ptype_3cgl_vec3, 1, "control_2", 0))) __PYX_ERR(0, 3682, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_110add_cubic_bazier_points(__pyx_v_start, __pyx_v_end, __pyx_v_control_1, __pyx_v_control_2, __pyx_v_res);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_110add_cubic_bazier_points(struct __pyx_obj_3cgl_vec3 *__pyx_v_start, struct __pyx_obj_3cgl_vec3 *__pyx_v_end, struct __pyx_obj_3cgl_vec3 *__pyx_v_control_1, struct __pyx_obj_3cgl_vec3 *__pyx_v_control_2, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_cubic_bazier_points", 0);

  /* "cgl_wrapper.pyx":3683
 *     @staticmethod
 *     def add_cubic_bazier_points(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):
 *         CGL_widgets_add_cubic_bazier_points(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_res); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3683, __pyx_L1_error)
  CGL_widgets_add_cubic_bazier_points(__pyx_v_start->c_vec3, __pyx_v_end->c_vec3, __pyx_v_control_1->c_vec3, __pyx_v_control_2->c_vec3, __pyx_t_1);

  /* "cgl_wrapper.pyx":3682
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier_points", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3686
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_113add_cubic_bazier_points2v(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_113add_cubic_bazier_points2v = {"add_cubic_bazier_points2v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_113add_cubic_bazier_points2v, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_113add_cubic_bazier_points2v(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_vec2 *__pyx_v_start = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_end = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_control_1 = 0;
  struct __pyx_obj_3cgl_vec2 *__pyx_v_control_2 = 0;
  PyObject *__pyx_v_res = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_cubic_bazier_points2v (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_control_1,&__pyx_n_s_control_2,&__pyx_n_s_res,0};
    PyObject* values[5] = {0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2v", 1, 5, 5, 1); __PYX_ERR(0, 3686, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_1)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2v", 1, 5, 5, 2); __PYX_ERR(0, 3686, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_2)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2v", 1, 5, 5, 3); __PYX_ERR(0, 3686, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2v", 1, 5, 5, 4); __PYX_ERR(0, 3686, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_cubic_bazier_points2v") < 0)) __PYX_ERR(0, 3686, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
    }
    __pyx_v_start = ((struct __pyx_obj_3cgl_vec2 *)values[0]);
    __pyx_v_end = ((struct __pyx_obj_3cgl_vec2 *)values[1]);
    __pyx_v_control_1 = ((struct __pyx_obj_3cgl_vec2 *)values[2]);
    __pyx_v_control_2 = ((struct __pyx_obj_3cgl_vec2 *)values[3]);
    __pyx_v_res = values[4];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2v", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3686, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier_points2v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_start), __pyx_ptype_3cgl_vec2, 1, "start", 0))) __PYX_ERR(0, 3686, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_end), __pyx_ptype_3cgl_vec2, 1, "end", 0))) __PYX_ERR(0, 3686, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_control_1), __pyx_ptype_3cgl_vec2, 1, "control_1", 0))) __PYX_ERR(0, 3686, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_control_2), __pyx_ptype_3cgl_vec2, 1, "control_2", 0))) __PYX_ERR(0, 3686, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_112add_cubic_bazier_points2v(__pyx_v_start, __pyx_v_end, __pyx_v_control_1, __pyx_v_control_2, __pyx_v_res);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_112add_cubic_bazier_points2v(struct __pyx_obj_3cgl_vec2 *__pyx_v_start, struct __pyx_obj_3cgl_vec2 *__pyx_v_end, struct __pyx_obj_3cgl_vec2 *__pyx_v_control_1, struct __pyx_obj_3cgl_vec2 *__pyx_v_control_2, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_cubic_bazier_points2v", 0);

  /* "cgl_wrapper.pyx":3687
 *     @staticmethod
 *     def add_cubic_bazier_points2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):
 *         CGL_widgets_add_cubic_bazier_points2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_res); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3687, __pyx_L1_error)
  CGL_widgets_add_cubic_bazier_points2v(__pyx_v_start->c_vec2, __pyx_v_end->c_vec2, __pyx_v_control_1->c_vec2, __pyx_v_control_2->c_vec2, __pyx_t_1);

  /* "cgl_wrapper.pyx":3686
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier_points2v", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3690
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_115add_cubic_bazier_points2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_115add_cubic_bazier_points2f = {"add_cubic_bazier_points2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_115add_cubic_bazier_points2f, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_115add_cubic_bazier_points2f(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_start_x;
  double __pyx_v_start_y;
  double __pyx_v_end_x;
  double __pyx_v_end_y;
  double __pyx_v_control_1_x;
  double __pyx_v_control_1_y;
  double __pyx_v_control_2_x;
  double __pyx_v_control_2_y;
  PyObject *__pyx_v_res = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_cubic_bazier_points2f (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_start_x,&__pyx_n_s_start_y,&__pyx_n_s_end_x,&__pyx_n_s_end_y,&__pyx_n_s_control_1_x,&__pyx_n_s_control_1_y,&__pyx_n_s_control_2_x,&__pyx_n_s_control_2_y,&__pyx_n_s_res,0};
    PyObject* values[9] = {0,0,0,0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
        CYTHON_FALLTHROUGH;
        case  8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
        CYTHON_FALLTHROUGH;
        case  7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
        CYTHON_FALLTHROUGH;
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_start_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2f", 1, 9, 9, 1); __PYX_ERR(0, 3690, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2f", 1, 9, 9, 2); __PYX_ERR(0, 3690, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2f", 1, 9, 9, 3); __PYX_ERR(0, 3690, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_1_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2f", 1, 9, 9, 4); __PYX_ERR(0, 3690, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_1_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2f", 1, 9, 9, 5); __PYX_ERR(0, 3690, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_2_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2f", 1, 9, 9, 6); __PYX_ERR(0, 3690, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_control_2_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2f", 1, 9, 9, 7); __PYX_ERR(0, 3690, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  8:
        if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_res)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2f", 1, 9, 9, 8); __PYX_ERR(0, 3690, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_cubic_bazier_points2f") < 0)) __PYX_ERR(0, 3690, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 9) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
      values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
      values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
      values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
    }
    __pyx_v_start_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_start_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L3_error)
    __pyx_v_start_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_start_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L3_error)
    __pyx_v_end_x = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_end_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L3_error)
    __pyx_v_end_y = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_end_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L3_error)
    __pyx_v_control_1_x = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_control_1_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L3_error)
    __pyx_v_control_1_y = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_control_1_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L3_error)
    __pyx_v_control_2_x = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_control_2_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L3_error)
    __pyx_v_control_2_y = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_control_2_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3690, __pyx_L3_error)
    __pyx_v_res = values[8];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_cubic_bazier_points2f", 1, 9, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3690, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier_points2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_7widgets_114add_cubic_bazier_points2f(__pyx_v_start_x, __pyx_v_start_y, __pyx_v_end_x, __pyx_v_end_y, __pyx_v_control_1_x, __pyx_v_control_1_y, __pyx_v_control_2_x, __pyx_v_control_2_y, __pyx_v_res);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_114add_cubic_bazier_points2f(double __pyx_v_start_x, double __pyx_v_start_y, double __pyx_v_end_x, double __pyx_v_end_y, double __pyx_v_control_1_x, double __pyx_v_control_1_y, double __pyx_v_control_2_x, double __pyx_v_control_2_y, PyObject *__pyx_v_res) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_cubic_bazier_points2f", 0);

  /* "cgl_wrapper.pyx":3691
 *     @staticmethod
 *     def add_cubic_bazier_points2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):
 *         CGL_widgets_add_cubic_bazier_points2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_res); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3691, __pyx_L1_error)
  CGL_widgets_add_cubic_bazier_points2f(__pyx_v_start_x, __pyx_v_start_y, __pyx_v_end_x, __pyx_v_end_y, __pyx_v_control_1_x, __pyx_v_control_1_y, __pyx_v_control_2_x, __pyx_v_control_2_y, __pyx_t_1);

  /* "cgl_wrapper.pyx":3690
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.widgets.add_cubic_bazier_points2f", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3694
 * 
 *     @staticmethod
 *     def add_shape_out_line(shape: shape):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_shape_out_line(&shape.c_shape)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_117add_shape_out_line(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_117add_shape_out_line = {"add_shape_out_line", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_117add_shape_out_line, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_117add_shape_out_line(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_3cgl_shape *__pyx_v_shape = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_shape_out_line (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape_2,0};
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape_2)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_shape_out_line") < 0)) __PYX_ERR(0, 3694, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_shape = ((struct __pyx_obj_3cgl_shape *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_shape_out_line", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3694, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_shape_out_line", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), __pyx_ptype_3cgl_shape, 1, "shape", 0))) __PYX_ERR(0, 3694, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_116add_shape_out_line(__pyx_v_shape);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_116add_shape_out_line(struct __pyx_obj_3cgl_shape *__pyx_v_shape) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_shape_out_line", 0);

  /* "cgl_wrapper.pyx":3695
 *     @staticmethod
 *     def add_shape_out_line(shape: shape):
 *         CGL_widgets_add_shape_out_line(&shape.c_shape)             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  CGL_widgets_add_shape_out_line((&__pyx_v_shape->c_shape));

  /* "cgl_wrapper.pyx":3694
 * 
 *     @staticmethod
 *     def add_shape_out_line(shape: shape):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_shape_out_line(&shape.c_shape)
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3698
 * 
 *     @staticmethod
 *     def add_string_with_font(st: str, font: font, x: float, y: float, sx: float, scale_y: float) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_string_with_font(st.encode('utf-8'), font.c_font, x, y, sx, scale_y)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_119add_string_with_font(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_7widgets_119add_string_with_font = {"add_string_with_font", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_119add_string_with_font, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_7widgets_119add_string_with_font(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_st = 0;
  struct __pyx_obj_3cgl_font *__pyx_v_font = 0;
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_sx;
  double __pyx_v_scale_y;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add_string_with_font (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_st,&__pyx_n_s_font,&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_sx,&__pyx_n_s_scale_y,0};
    PyObject* values[6] = {0,0,0,0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_st)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_font)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_string_with_font", 1, 6, 6, 1); __PYX_ERR(0, 3698, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_string_with_font", 1, 6, 6, 2); __PYX_ERR(0, 3698, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_string_with_font", 1, 6, 6, 3); __PYX_ERR(0, 3698, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_sx)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_string_with_font", 1, 6, 6, 4); __PYX_ERR(0, 3698, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_scale_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("add_string_with_font", 1, 6, 6, 5); __PYX_ERR(0, 3698, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_string_with_font") < 0)) __PYX_ERR(0, 3698, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
      values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
      values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
      values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
    }
    __pyx_v_st = ((PyObject*)values[0]);
    __pyx_v_font = ((struct __pyx_obj_3cgl_font *)values[1]);
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3698, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3698, __pyx_L3_error)
    __pyx_v_sx = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_sx == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3698, __pyx_L3_error)
    __pyx_v_scale_y = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_scale_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3698, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("add_string_with_font", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3698, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.widgets.add_string_with_font", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_st), (&PyString_Type), 1, "st", 1))) __PYX_ERR(0, 3698, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_font), __pyx_ptype_3cgl_font, 1, "font", 0))) __PYX_ERR(0, 3698, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_7widgets_118add_string_with_font(__pyx_v_st, __pyx_v_font, __pyx_v_x, __pyx_v_y, __pyx_v_sx, __pyx_v_scale_y);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_118add_string_with_font(PyObject *__pyx_v_st, struct __pyx_obj_3cgl_font *__pyx_v_font, double __pyx_v_x, double __pyx_v_y, double __pyx_v_sx, double __pyx_v_scale_y) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char const *__pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add_string_with_font", 0);

  /* "cgl_wrapper.pyx":3699
 *     @staticmethod
 *     def add_string_with_font(st: str, font: font, x: float, y: float, sx: float, scale_y: float) -> float:
 *         return CGL_widgets_add_string_with_font(st.encode('utf-8'), font.c_font, x, y, sx, scale_y)             # <<<<<<<<<<<<<<
 * 
 * NOISE_TYPE_PERLIN        = 0
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_encode, __pyx_v_st, __pyx_kp_s_utf_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 3699, __pyx_L1_error)
  __pyx_t_3 = PyFloat_FromDouble(CGL_widgets_add_string_with_font(__pyx_t_2, __pyx_v_font->c_font, __pyx_v_x, __pyx_v_y, __pyx_v_sx, __pyx_v_scale_y)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3699, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3698
 * 
 *     @staticmethod
 *     def add_string_with_font(st: str, font: font, x: float, y: float, sx: float, scale_y: float) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_string_with_font(st.encode('utf-8'), font.c_font, x, y, sx, scale_y)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("cgl.widgets.add_string_with_font", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_121__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_7widgets_121__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7widgets_120__reduce_cython__(((struct __pyx_obj_3cgl_widgets *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_120__reduce_cython__(struct __pyx_obj_3cgl_widgets *__pyx_v_self) {
  PyObject *__pyx_v_state = 0;
  PyObject *__pyx_v__dict = 0;
  int __pyx_v_use_setstate;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":5
 *     cdef object _dict
 *     cdef bint use_setstate
 *     state = ()             # <<<<<<<<<<<<<<
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 */
  __Pyx_INCREF(__pyx_empty_tuple);
  __pyx_v_state = __pyx_empty_tuple;

  /* "(tree fragment)":6
 *     cdef bint use_setstate
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)             # <<<<<<<<<<<<<<
 *     if _dict is not None:
 *         state += (_dict,)
 */
  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
  __pyx_t_2 = (__pyx_v__dict != Py_None);
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":8
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:
 *         state += (_dict,)             # <<<<<<<<<<<<<<
 *         use_setstate = True
 *     else:
 */
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v__dict);
    __Pyx_GIVEREF(__pyx_v__dict);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
    __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 8, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
    __pyx_t_4 = 0;

    /* "(tree fragment)":9
 *     if _dict is not None:
 *         state += (_dict,)
 *         use_setstate = True             # <<<<<<<<<<<<<<
 *     else:
 *         use_setstate = False
 */
    __pyx_v_use_setstate = 1;

    /* "(tree fragment)":7
 *     state = ()
 *     _dict = getattr(self, '__dict__', None)
 *     if _dict is not None:             # <<<<<<<<<<<<<<
 *         state += (_dict,)
 *         use_setstate = True
 */
    goto __pyx_L3;
  }

  /* "(tree fragment)":11
 *         use_setstate = True
 *     else:
 *         use_setstate = False             # <<<<<<<<<<<<<<
 *     if use_setstate:
 *         return __pyx_unpickle_widgets, (type(self), 0xd41d8cd, None), state
 */
  /*else*/ {
    __pyx_v_use_setstate = 0;
  }
  __pyx_L3:;

  /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_widgets, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  __pyx_t_3 = (__pyx_v_use_setstate != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":13
 *         use_setstate = False
 *     if use_setstate:
 *         return __pyx_unpickle_widgets, (type(self), 0xd41d8cd, None), state             # <<<<<<<<<<<<<<
 *     else:
 *         return __pyx_unpickle_widgets, (type(self), 0xd41d8cd, state)
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_widgets); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(Py_None);
    PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
    __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
    __pyx_t_4 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L0;

    /* "(tree fragment)":12
 *     else:
 *         use_setstate = False
 *     if use_setstate:             # <<<<<<<<<<<<<<
 *         return __pyx_unpickle_widgets, (type(self), 0xd41d8cd, None), state
 *     else:
 */
  }

  /* "(tree fragment)":15
 *         return __pyx_unpickle_widgets, (type(self), 0xd41d8cd, None), state
 *     else:
 *         return __pyx_unpickle_widgets, (type(self), 0xd41d8cd, state)             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_widgets__set_state(self, __pyx_state)
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_widgets); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
    __Pyx_INCREF(__pyx_int_222419149);
    __Pyx_GIVEREF(__pyx_int_222419149);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_222419149);
    __Pyx_INCREF(__pyx_v_state);
    __Pyx_GIVEREF(__pyx_v_state);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
    __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
    __pyx_t_5 = 0;
    __pyx_t_1 = 0;
    __pyx_r = __pyx_t_4;
    __pyx_t_4 = 0;
    goto __pyx_L0;
  }

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     cdef tuple state
 *     cdef object _dict
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.widgets.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_state);
  __Pyx_XDECREF(__pyx_v__dict);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_widgets, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_widgets__set_state(self, __pyx_state)
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_7widgets_123__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_7widgets_123__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_7widgets_122__setstate_cython__(((struct __pyx_obj_3cgl_widgets *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_7widgets_122__setstate_cython__(struct __pyx_obj_3cgl_widgets *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":17
 *         return __pyx_unpickle_widgets, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):
 *     __pyx_unpickle_widgets__set_state(self, __pyx_state)             # <<<<<<<<<<<<<<
 */
  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 17, __pyx_L1_error)
  __pyx_t_1 = __pyx_f_3cgl___pyx_unpickle_widgets__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "(tree fragment)":16
 *     else:
 *         return __pyx_unpickle_widgets, (type(self), 0xd41d8cd, state)
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     __pyx_unpickle_widgets__set_state(self, __pyx_state)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.widgets.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3720
 * 
 *     @property
 *     def type(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.type
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_4type___get__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_4type___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3721
 *     @property
 *     def type(self) -> int:
 *         return self.c_noise_params.type             # <<<<<<<<<<<<<<
 * 
 *     @type.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_noise_params.type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3720
 * 
 *     @property
 *     def type(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.type
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_params.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3724
 * 
 *     @type.setter
 *     def type(self, value: int):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.type = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_12noise_params_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_12noise_params_4type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_4type_2__set__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_12noise_params_4type_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3725
 *     @type.setter
 *     def type(self, value: int):
 *         self.c_noise_params.type = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3725, __pyx_L1_error)
  __pyx_v_self->c_noise_params.type = __pyx_t_1;

  /* "cgl_wrapper.pyx":3724
 * 
 *     @type.setter
 *     def type(self, value: int):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.type = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.noise_params.type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3728
 * 
 *     @property
 *     def fractal_type(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.fractal_type
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_12fractal_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_12fractal_type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_12fractal_type___get__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_12fractal_type___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3729
 *     @property
 *     def fractal_type(self) -> int:
 *         return self.c_noise_params.fractal_type             # <<<<<<<<<<<<<<
 * 
 *     @fractal_type.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_noise_params.fractal_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3729, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3728
 * 
 *     @property
 *     def fractal_type(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.fractal_type
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_params.fractal_type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3732
 * 
 *     @fractal_type.setter
 *     def fractal_type(self, value: int):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.fractal_type = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_12noise_params_12fractal_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_12noise_params_12fractal_type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_12fractal_type_2__set__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_12noise_params_12fractal_type_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3733
 *     @fractal_type.setter
 *     def fractal_type(self, value: int):
 *         self.c_noise_params.fractal_type = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3733, __pyx_L1_error)
  __pyx_v_self->c_noise_params.fractal_type = __pyx_t_1;

  /* "cgl_wrapper.pyx":3732
 * 
 *     @fractal_type.setter
 *     def fractal_type(self, value: int):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.fractal_type = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.noise_params.fractal_type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3736
 * 
 *     @property
 *     def octaves(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.octaves
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_7octaves_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_7octaves_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_7octaves___get__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_7octaves___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3737
 *     @property
 *     def octaves(self) -> int:
 *         return self.c_noise_params.octaves             # <<<<<<<<<<<<<<
 * 
 *     @octaves.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_CGL_int(__pyx_v_self->c_noise_params.octaves); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3736
 * 
 *     @property
 *     def octaves(self) -> int:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.octaves
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_params.octaves.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3740
 * 
 *     @octaves.setter
 *     def octaves(self, value: int):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.octaves = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_12noise_params_7octaves_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pw_3cgl_12noise_params_7octaves_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_7octaves_2__set__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self), ((PyObject *)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_12noise_params_7octaves_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, PyObject *__pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  CGL_int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3741
 *     @octaves.setter
 *     def octaves(self, value: int):
 *         self.c_noise_params.octaves = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_1 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(0, 3741, __pyx_L1_error)
  __pyx_v_self->c_noise_params.octaves = __pyx_t_1;

  /* "cgl_wrapper.pyx":3740
 * 
 *     @octaves.setter
 *     def octaves(self, value: int):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.octaves = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("cgl.noise_params.octaves.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3744
 * 
 *     @property
 *     def lacunarity(self) -> float:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.lacunarity
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_10lacunarity_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_10lacunarity_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_10lacunarity___get__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_10lacunarity___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3745
 *     @property
 *     def lacunarity(self) -> float:
 *         return self.c_noise_params.lacunarity             # <<<<<<<<<<<<<<
 * 
 *     @lacunarity.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_noise_params.lacunarity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3744
 * 
 *     @property
 *     def lacunarity(self) -> float:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.lacunarity
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_params.lacunarity.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3748
 * 
 *     @lacunarity.setter
 *     def lacunarity(self, value: float):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.lacunarity = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_12noise_params_10lacunarity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_3cgl_12noise_params_10lacunarity_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3748, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_params.lacunarity.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_12noise_params_10lacunarity_2__set__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self), ((double)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_12noise_params_10lacunarity_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, double __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3749
 *     @lacunarity.setter
 *     def lacunarity(self, value: float):
 *         self.c_noise_params.lacunarity = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_noise_params.lacunarity = __pyx_v_value;

  /* "cgl_wrapper.pyx":3748
 * 
 *     @lacunarity.setter
 *     def lacunarity(self, value: float):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.lacunarity = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3752
 * 
 *     @property
 *     def gain(self) -> float:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.gain
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_4gain_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_4gain_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_4gain___get__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_4gain___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3753
 *     @property
 *     def gain(self) -> float:
 *         return self.c_noise_params.gain             # <<<<<<<<<<<<<<
 * 
 *     @gain.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_noise_params.gain); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3752
 * 
 *     @property
 *     def gain(self) -> float:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.gain
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_params.gain.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3756
 * 
 *     @gain.setter
 *     def gain(self, value: float):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.gain = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_12noise_params_4gain_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_3cgl_12noise_params_4gain_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3756, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_params.gain.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_12noise_params_4gain_2__set__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self), ((double)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_12noise_params_4gain_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, double __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3757
 *     @gain.setter
 *     def gain(self, value: float):
 *         self.c_noise_params.gain = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_noise_params.gain = __pyx_v_value;

  /* "cgl_wrapper.pyx":3756
 * 
 *     @gain.setter
 *     def gain(self, value: float):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.gain = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3760
 * 
 *     @property
 *     def frequency(self) -> float:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.frequency
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_9frequency_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_9frequency_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_9frequency___get__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_9frequency___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3761
 *     @property
 *     def frequency(self) -> float:
 *         return self.c_noise_params.frequency             # <<<<<<<<<<<<<<
 * 
 *     @frequency.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_noise_params.frequency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3760
 * 
 *     @property
 *     def frequency(self) -> float:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.frequency
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_params.frequency.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3764
 * 
 *     @frequency.setter
 *     def frequency(self, value: float):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.frequency = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_12noise_params_9frequency_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_3cgl_12noise_params_9frequency_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3764, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_params.frequency.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_12noise_params_9frequency_2__set__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self), ((double)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_12noise_params_9frequency_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, double __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3765
 *     @frequency.setter
 *     def frequency(self, value: float):
 *         self.c_noise_params.frequency = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_noise_params.frequency = __pyx_v_value;

  /* "cgl_wrapper.pyx":3764
 * 
 *     @frequency.setter
 *     def frequency(self, value: float):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.frequency = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3768
 * 
 *     @property
 *     def weighted_strength(self) -> float:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.weighted_strength
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_17weighted_strength_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_17weighted_strength_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_17weighted_strength___get__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_17weighted_strength___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3769
 *     @property
 *     def weighted_strength(self) -> float:
 *         return self.c_noise_params.weighted_strength             # <<<<<<<<<<<<<<
 * 
 *     @weighted_strength.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_noise_params.weighted_strength); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3769, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3768
 * 
 *     @property
 *     def weighted_strength(self) -> float:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.weighted_strength
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_params.weighted_strength.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3772
 * 
 *     @weighted_strength.setter
 *     def weighted_strength(self, value: float):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.weighted_strength = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_12noise_params_17weighted_strength_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_3cgl_12noise_params_17weighted_strength_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3772, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_params.weighted_strength.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_12noise_params_17weighted_strength_2__set__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self), ((double)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_12noise_params_17weighted_strength_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, double __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3773
 *     @weighted_strength.setter
 *     def weighted_strength(self, value: float):
 *         self.c_noise_params.weighted_strength = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_noise_params.weighted_strength = __pyx_v_value;

  /* "cgl_wrapper.pyx":3772
 * 
 *     @weighted_strength.setter
 *     def weighted_strength(self, value: float):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.weighted_strength = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3776
 * 
 *     @property
 *     def ping_pong_strength(self) -> float:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.ping_pong_strength
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_18ping_pong_strength_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_18ping_pong_strength_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_18ping_pong_strength___get__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_18ping_pong_strength___get__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "cgl_wrapper.pyx":3777
 *     @property
 *     def ping_pong_strength(self) -> float:
 *         return self.c_noise_params.ping_pong_strength             # <<<<<<<<<<<<<<
 * 
 *     @ping_pong_strength.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_noise_params.ping_pong_strength); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3777, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3776
 * 
 *     @property
 *     def ping_pong_strength(self) -> float:             # <<<<<<<<<<<<<<
 *         return self.c_noise_params.ping_pong_strength
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_params.ping_pong_strength.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3780
 * 
 *     @ping_pong_strength.setter
 *     def ping_pong_strength(self, value: float):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.ping_pong_strength = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_3cgl_12noise_params_18ping_pong_strength_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_3cgl_12noise_params_18ping_pong_strength_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  double __pyx_v_value;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsDouble(__pyx_arg_value); if (unlikely((__pyx_v_value == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3780, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_params.ping_pong_strength.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_12noise_params_18ping_pong_strength_2__set__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self), ((double)__pyx_v_value));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_12noise_params_18ping_pong_strength_2__set__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self, double __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "cgl_wrapper.pyx":3781
 *     @ping_pong_strength.setter
 *     def ping_pong_strength(self, value: float):
 *         self.c_noise_params.ping_pong_strength = value             # <<<<<<<<<<<<<<
 * 
 *     def __init__(self):
 */
  __pyx_v_self->c_noise_params.ping_pong_strength = __pyx_v_value;

  /* "cgl_wrapper.pyx":3780
 * 
 *     @ping_pong_strength.setter
 *     def ping_pong_strength(self, value: float):             # <<<<<<<<<<<<<<
 *         self.c_noise_params.ping_pong_strength = value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3783
 *         self.c_noise_params.ping_pong_strength = value
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_noise_params = CGL_noise_params()
 *         CGL_noise_params_default(&self.c_noise_params)
 */

/* Python wrapper */
static int __pyx_pw_3cgl_12noise_params_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_3cgl_12noise_params_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
  __pyx_r = __pyx_pf_3cgl_12noise_params___init__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_3cgl_12noise_params___init__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  struct CGL_noise_params __pyx_t_1;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "cgl_wrapper.pyx":3784
 * 
 *     def __init__(self):
 *         self.c_noise_params = CGL_noise_params()             # <<<<<<<<<<<<<<
 *         CGL_noise_params_default(&self.c_noise_params)
 * 
 */
  __pyx_v_self->c_noise_params = __pyx_t_1;

  /* "cgl_wrapper.pyx":3785
 *     def __init__(self):
 *         self.c_noise_params = CGL_noise_params()
 *         CGL_noise_params_default(&self.c_noise_params)             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  CGL_noise_params_default((&__pyx_v_self->c_noise_params));

  /* "cgl_wrapper.pyx":3783
 *         self.c_noise_params.ping_pong_strength = value
 * 
 *     def __init__(self):             # <<<<<<<<<<<<<<
 *         self.c_noise_params = CGL_noise_params()
 *         CGL_noise_params_default(&self.c_noise_params)
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3787
 *         CGL_noise_params_default(&self.c_noise_params)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_2__repr__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_2__repr__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__", 0);

  /* "cgl_wrapper.pyx":3788
 * 
 *     def __repr__(self):
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_noise_params_type);
  __pyx_t_2 += 18;
  __Pyx_GIVEREF(__pyx_kp_u_noise_params_type);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_noise_params_type);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_fractal_type);
  __pyx_t_2 += 15;
  __Pyx_GIVEREF(__pyx_kp_u_fractal_type);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_fractal_type);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fractal_type_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_octaves);
  __pyx_t_2 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_octaves);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_octaves);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_octaves_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_lacunarity);
  __pyx_t_2 += 13;
  __Pyx_GIVEREF(__pyx_kp_u_lacunarity);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u_lacunarity);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lacunarity_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_gain);
  __pyx_t_2 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_gain);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u_gain);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gain_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_frequency);
  __pyx_t_2 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_frequency);
  PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_kp_u_frequency);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_frequency_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 11, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_weighted_strength);
  __pyx_t_2 += 20;
  __Pyx_GIVEREF(__pyx_kp_u_weighted_strength);
  PyTuple_SET_ITEM(__pyx_t_1, 12, __pyx_kp_u_weighted_strength);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weighted_strength_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 13, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_ping_pong_strength);
  __pyx_t_2 += 21;
  __Pyx_GIVEREF(__pyx_kp_u_ping_pong_strength);
  PyTuple_SET_ITEM(__pyx_t_1, 14, __pyx_kp_u_ping_pong_strength);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ping_pong_strength_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 15, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 16, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 17, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3787
 *         CGL_noise_params_default(&self.c_noise_params)
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.noise_params.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3790
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_5__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_5__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_4__str__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_4__str__(struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  Py_UCS4 __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__", 0);

  /* "cgl_wrapper.pyx":3791
 * 
 *     def __str__(self):
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"             # <<<<<<<<<<<<<<
 * 
 * def noise_init():
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = 0;
  __pyx_t_3 = 127;
  __Pyx_INCREF(__pyx_kp_u_noise_params_type);
  __pyx_t_2 += 18;
  __Pyx_GIVEREF(__pyx_kp_u_noise_params_type);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_noise_params_type);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_fractal_type);
  __pyx_t_2 += 15;
  __Pyx_GIVEREF(__pyx_kp_u_fractal_type);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_fractal_type);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fractal_type_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_octaves);
  __pyx_t_2 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_octaves);
  PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_octaves);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_octaves_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_lacunarity);
  __pyx_t_2 += 13;
  __Pyx_GIVEREF(__pyx_kp_u_lacunarity);
  PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u_lacunarity);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_lacunarity_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 7, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_gain);
  __pyx_t_2 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_gain);
  PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u_gain);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gain_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 9, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_frequency);
  __pyx_t_2 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_frequency);
  PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_kp_u_frequency);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_frequency_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 11, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u_weighted_strength);
  __pyx_t_2 += 20;
  __Pyx_GIVEREF(__pyx_kp_u_weighted_strength);
  PyTuple_SET_ITEM(__pyx_t_1, 12, __pyx_kp_u_weighted_strength);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_weighted_strength_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_4, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_1, 13, __pyx_t_5);
  __pyx_t_5 = 0;
  __Pyx_INCREF(__pyx_kp_u_ping_pong_strength);
  __pyx_t_2 += 21;
  __Pyx_GIVEREF(__pyx_kp_u_ping_pong_strength);
  PyTuple_SET_ITEM(__pyx_t_1, 14, __pyx_kp_u_ping_pong_strength);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ping_pong_strength_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3;
  __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_1, 15, __pyx_t_4);
  __pyx_t_4 = 0;
  __Pyx_INCREF(__pyx_kp_u__4);
  __pyx_t_2 += 1;
  __Pyx_GIVEREF(__pyx_kp_u__4);
  PyTuple_SET_ITEM(__pyx_t_1, 16, __pyx_kp_u__4);
  __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 17, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3791, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_4;
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3790
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("cgl.noise_params.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_6__reduce_cython__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_noise_params *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__reduce_cython__", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__83, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 2, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __reduce_cython__(self):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_params.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_12noise_params_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_3cgl_12noise_params_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_12noise_params_8__setstate_cython__(((struct __pyx_obj_3cgl_noise_params *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_12noise_params_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_3cgl_noise_params *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setstate_cython__", 0);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__84, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __PYX_ERR(1, 4, __pyx_L1_error)

  /* "(tree fragment)":3
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):             # <<<<<<<<<<<<<<
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_params.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3793
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"
 * 
 * def noise_init():             # <<<<<<<<<<<<<<
 *     CGL_noise_init()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_263noise_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_263noise_init = {"noise_init", (PyCFunction)__pyx_pw_3cgl_263noise_init, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_263noise_init(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_init (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_262noise_init(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_262noise_init(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_init", 0);

  /* "cgl_wrapper.pyx":3794
 * 
 * def noise_init():
 *     CGL_noise_init()             # <<<<<<<<<<<<<<
 * 
 * def noise_shutdown():
 */
  CGL_noise_init();

  /* "cgl_wrapper.pyx":3793
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"
 * 
 * def noise_init():             # <<<<<<<<<<<<<<
 *     CGL_noise_init()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3796
 *     CGL_noise_init()
 * 
 * def noise_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_noise_shutdown()
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_265noise_shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_265noise_shutdown = {"noise_shutdown", (PyCFunction)__pyx_pw_3cgl_265noise_shutdown, METH_NOARGS, 0};
static PyObject *__pyx_pw_3cgl_265noise_shutdown(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_shutdown (wrapper)", 0);
  __pyx_r = __pyx_pf_3cgl_264noise_shutdown(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_264noise_shutdown(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_shutdown", 0);

  /* "cgl_wrapper.pyx":3797
 * 
 * def noise_shutdown():
 *     CGL_noise_shutdown()             # <<<<<<<<<<<<<<
 * 
 * def noise_get(x: float, y: float, z: float, np: noise_params = noise_params() ) -> float:
 */
  CGL_noise_shutdown();

  /* "cgl_wrapper.pyx":3796
 *     CGL_noise_init()
 * 
 * def noise_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_noise_shutdown()
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3799
 *     CGL_noise_shutdown()
 * 
 * def noise_get(x: float, y: float, z: float, np: noise_params = noise_params() ) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_get(&np.c_noise_params, x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_267noise_get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_267noise_get = {"noise_get", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_267noise_get, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_267noise_get(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  struct __pyx_obj_3cgl_noise_params *__pyx_v_np = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_get (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,&__pyx_n_s_np,0};
    PyObject* values[4] = {0,0,0,0};
    values[3] = (PyObject *)__pyx_k__85;
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_get", 0, 3, 4, 1); __PYX_ERR(0, 3799, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_get", 0, 3, 4, 2); __PYX_ERR(0, 3799, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_np);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "noise_get") < 0)) __PYX_ERR(0, 3799, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3799, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3799, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3799, __pyx_L3_error)
    __pyx_v_np = ((struct __pyx_obj_3cgl_noise_params *)values[3]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("noise_get", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3799, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_np), __pyx_ptype_3cgl_noise_params, 1, "np", 0))) __PYX_ERR(0, 3799, __pyx_L1_error)
  __pyx_r = __pyx_pf_3cgl_266noise_get(__pyx_self, __pyx_v_x, __pyx_v_y, __pyx_v_z, __pyx_v_np);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_266noise_get(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z, struct __pyx_obj_3cgl_noise_params *__pyx_v_np) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("noise_get", 0);

  /* "cgl_wrapper.pyx":3800
 * 
 * def noise_get(x: float, y: float, z: float, np: noise_params = noise_params() ) -> float:
 *     return CGL_noise_get(&np.c_noise_params, x, y, z)             # <<<<<<<<<<<<<<
 * 
 * def noise_perlin(x: float, y: float, z: float) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_noise_get((&__pyx_v_np->c_noise_params), __pyx_v_x, __pyx_v_y, __pyx_v_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3800, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3799
 *     CGL_noise_shutdown()
 * 
 * def noise_get(x: float, y: float, z: float, np: noise_params = noise_params() ) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_get(&np.c_noise_params, x, y, z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3802
 *     return CGL_noise_get(&np.c_noise_params, x, y, z)
 * 
 * def noise_perlin(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_perlin(x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_269noise_perlin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_269noise_perlin = {"noise_perlin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_269noise_perlin, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_269noise_perlin(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_perlin (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_perlin", 1, 3, 3, 1); __PYX_ERR(0, 3802, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_perlin", 1, 3, 3, 2); __PYX_ERR(0, 3802, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "noise_perlin") < 0)) __PYX_ERR(0, 3802, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3802, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3802, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3802, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("noise_perlin", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3802, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_perlin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_268noise_perlin(__pyx_self, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_268noise_perlin(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("noise_perlin", 0);

  /* "cgl_wrapper.pyx":3803
 * 
 * def noise_perlin(x: float, y: float, z: float) -> float:
 *     return CGL_noise_perlin(x, y, z)             # <<<<<<<<<<<<<<
 * 
 * def noise_opensimplex(x: float, y: float, z: float) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_noise_perlin(__pyx_v_x, __pyx_v_y, __pyx_v_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3803, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3802
 *     return CGL_noise_get(&np.c_noise_params, x, y, z)
 * 
 * def noise_perlin(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_perlin(x, y, z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_perlin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3805
 *     return CGL_noise_perlin(x, y, z)
 * 
 * def noise_opensimplex(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_opensimplex(x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_271noise_opensimplex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_271noise_opensimplex = {"noise_opensimplex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_271noise_opensimplex, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_271noise_opensimplex(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_opensimplex (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_opensimplex", 1, 3, 3, 1); __PYX_ERR(0, 3805, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_opensimplex", 1, 3, 3, 2); __PYX_ERR(0, 3805, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "noise_opensimplex") < 0)) __PYX_ERR(0, 3805, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3805, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3805, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3805, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("noise_opensimplex", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3805, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_opensimplex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_270noise_opensimplex(__pyx_self, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_270noise_opensimplex(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("noise_opensimplex", 0);

  /* "cgl_wrapper.pyx":3806
 * 
 * def noise_opensimplex(x: float, y: float, z: float) -> float:
 *     return CGL_noise_opensimplex(x, y, z)             # <<<<<<<<<<<<<<
 * 
 * def noise_opensimplex2s(x: float, y: float, z: float) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_noise_opensimplex(__pyx_v_x, __pyx_v_y, __pyx_v_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3806, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3805
 *     return CGL_noise_perlin(x, y, z)
 * 
 * def noise_opensimplex(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_opensimplex(x, y, z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_opensimplex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3808
 *     return CGL_noise_opensimplex(x, y, z)
 * 
 * def noise_opensimplex2s(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_opensimplex2s(x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_273noise_opensimplex2s(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_273noise_opensimplex2s = {"noise_opensimplex2s", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_273noise_opensimplex2s, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_273noise_opensimplex2s(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_opensimplex2s (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_opensimplex2s", 1, 3, 3, 1); __PYX_ERR(0, 3808, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_opensimplex2s", 1, 3, 3, 2); __PYX_ERR(0, 3808, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "noise_opensimplex2s") < 0)) __PYX_ERR(0, 3808, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3808, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3808, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3808, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("noise_opensimplex2s", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3808, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_opensimplex2s", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_272noise_opensimplex2s(__pyx_self, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_272noise_opensimplex2s(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("noise_opensimplex2s", 0);

  /* "cgl_wrapper.pyx":3809
 * 
 * def noise_opensimplex2s(x: float, y: float, z: float) -> float:
 *     return CGL_noise_opensimplex2s(x, y, z)             # <<<<<<<<<<<<<<
 * 
 * def noise_value(x: float, y: float, z: float) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_noise_opensimplex2s(__pyx_v_x, __pyx_v_y, __pyx_v_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3809, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3808
 *     return CGL_noise_opensimplex(x, y, z)
 * 
 * def noise_opensimplex2s(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_opensimplex2s(x, y, z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_opensimplex2s", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3811
 *     return CGL_noise_opensimplex2s(x, y, z)
 * 
 * def noise_value(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_value(x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_275noise_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_275noise_value = {"noise_value", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_275noise_value, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_275noise_value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_value (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_value", 1, 3, 3, 1); __PYX_ERR(0, 3811, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_value", 1, 3, 3, 2); __PYX_ERR(0, 3811, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "noise_value") < 0)) __PYX_ERR(0, 3811, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3811, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3811, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3811, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("noise_value", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3811, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_274noise_value(__pyx_self, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_274noise_value(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("noise_value", 0);

  /* "cgl_wrapper.pyx":3812
 * 
 * def noise_value(x: float, y: float, z: float) -> float:
 *     return CGL_noise_value(x, y, z)             # <<<<<<<<<<<<<<
 * 
 * def noise_valuecubic(x: float, y: float, z: float) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_noise_value(__pyx_v_x, __pyx_v_y, __pyx_v_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3811
 *     return CGL_noise_opensimplex2s(x, y, z)
 * 
 * def noise_value(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_value(x, y, z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3814
 *     return CGL_noise_value(x, y, z)
 * 
 * def noise_valuecubic(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_valuecubic(x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_277noise_valuecubic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_277noise_valuecubic = {"noise_valuecubic", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_277noise_valuecubic, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_277noise_valuecubic(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_valuecubic (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_valuecubic", 1, 3, 3, 1); __PYX_ERR(0, 3814, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_valuecubic", 1, 3, 3, 2); __PYX_ERR(0, 3814, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "noise_valuecubic") < 0)) __PYX_ERR(0, 3814, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3814, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3814, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3814, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("noise_valuecubic", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3814, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_valuecubic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_276noise_valuecubic(__pyx_self, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_276noise_valuecubic(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("noise_valuecubic", 0);

  /* "cgl_wrapper.pyx":3815
 * 
 * def noise_valuecubic(x: float, y: float, z: float) -> float:
 *     return CGL_noise_valuecubic(x, y, z)             # <<<<<<<<<<<<<<
 * 
 * def noise_worley(x: float, y: float, z: float) -> float:
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_noise_valuecubic(__pyx_v_x, __pyx_v_y, __pyx_v_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3814
 *     return CGL_noise_value(x, y, z)
 * 
 * def noise_valuecubic(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_valuecubic(x, y, z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_valuecubic", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "cgl_wrapper.pyx":3817
 *     return CGL_noise_valuecubic(x, y, z)
 * 
 * def noise_worley(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_worley(x, y, z)
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_279noise_worley(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_279noise_worley = {"noise_worley", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_279noise_worley, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_279noise_worley(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_x;
  double __pyx_v_y;
  double __pyx_v_z;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("noise_worley (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_z,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_worley", 1, 3, 3, 1); __PYX_ERR(0, 3817, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_z)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("noise_worley", 1, 3, 3, 2); __PYX_ERR(0, 3817, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "noise_worley") < 0)) __PYX_ERR(0, 3817, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3817, __pyx_L3_error)
    __pyx_v_y = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_y == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3817, __pyx_L3_error)
    __pyx_v_z = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_z == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 3817, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("noise_worley", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3817, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.noise_worley", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_278noise_worley(__pyx_self, __pyx_v_x, __pyx_v_y, __pyx_v_z);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_278noise_worley(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_x, double __pyx_v_y, double __pyx_v_z) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("noise_worley", 0);

  /* "cgl_wrapper.pyx":3818
 * 
 * def noise_worley(x: float, y: float, z: float) -> float:
 *     return CGL_noise_worley(x, y, z)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(CGL_noise_worley(__pyx_v_x, __pyx_v_y, __pyx_v_z)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3818, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "cgl_wrapper.pyx":3817
 *     return CGL_noise_valuecubic(x, y, z)
 * 
 * def noise_worley(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_worley(x, y, z)
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("cgl.noise_worley", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":1
 * def __pyx_unpickle_widgets(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

/* Python wrapper */
static PyObject *__pyx_pw_3cgl_281__pyx_unpickle_widgets(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_3cgl_281__pyx_unpickle_widgets = {"__pyx_unpickle_widgets", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_281__pyx_unpickle_widgets, METH_VARARGS|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_3cgl_281__pyx_unpickle_widgets(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v___pyx_type = 0;
  long __pyx_v___pyx_checksum;
  PyObject *__pyx_v___pyx_state = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__pyx_unpickle_widgets (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
    PyObject* values[3] = {0,0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_args) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (pos_args) {
        case  0:
        if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_widgets", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_widgets", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_widgets") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
      values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
    }
    __pyx_v___pyx_type = values[0];
    __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
    __pyx_v___pyx_state = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_widgets", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 1, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("cgl.__pyx_unpickle_widgets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_3cgl_280__pyx_unpickle_widgets(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_3cgl_280__pyx_unpickle_widgets(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_v___pyx_PickleError = 0;
  PyObject *__pyx_v___pyx_result = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_widgets", 0);

  /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__86, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (__pyx_t_3) {

    /* "(tree fragment)":5
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError             # <<<<<<<<<<<<<<
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = widgets.__new__(__pyx_type)
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_n_s_PickleError);
    __Pyx_GIVEREF(__pyx_n_s_PickleError);
    PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError);
    __pyx_t_4 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v___pyx_PickleError = __pyx_t_1;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":6
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)             # <<<<<<<<<<<<<<
 *     __pyx_result = widgets.__new__(__pyx_type)
 *     if __pyx_state is not None:
 */
    __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_v___pyx_PickleError);
    __pyx_t_1 = __pyx_v___pyx_PickleError; __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 6, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __PYX_ERR(1, 6, __pyx_L1_error)

    /* "(tree fragment)":4
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 *     if __pyx_checksum not in (0xd41d8cd, 0xe3b0c44, 0xda39a3e):             # <<<<<<<<<<<<<<
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 */
  }

  /* "(tree fragment)":7
 *         from pickle import PickleError as __pyx_PickleError
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = widgets.__new__(__pyx_type)             # <<<<<<<<<<<<<<
 *     if __pyx_state is not None:
 *         __pyx_unpickle_widgets__set_state(<widgets> __pyx_result, __pyx_state)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_3cgl_widgets), __pyx_n_s_new); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = NULL;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
    }
  }
  __pyx_t_4 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_5, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v___pyx_type);
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v___pyx_result = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = widgets.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_widgets__set_state(<widgets> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  __pyx_t_3 = (__pyx_v___pyx_state != Py_None);
  __pyx_t_2 = (__pyx_t_3 != 0);
  if (__pyx_t_2) {

    /* "(tree fragment)":9
 *     __pyx_result = widgets.__new__(__pyx_type)
 *     if __pyx_state is not None:
 *         __pyx_unpickle_widgets__set_state(<widgets> __pyx_result, __pyx_state)             # <<<<<<<<<<<<<<
 *     return __pyx_result
 * cdef __pyx_unpickle_widgets__set_state(widgets __pyx_result, tuple __pyx_state):
 */
    if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||((void)PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(1, 9, __pyx_L1_error)
    __pyx_t_4 = __pyx_f_3cgl___pyx_unpickle_widgets__set_state(((struct __pyx_obj_3cgl_widgets *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 9, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "(tree fragment)":8
 *         raise __pyx_PickleError("Incompatible checksums (0x%x vs (0xd41d8cd, 0xe3b0c44, 0xda39a3e) = ())" % __pyx_checksum)
 *     __pyx_result = widgets.__new__(__pyx_type)
 *     if __pyx_state is not None:             # <<<<<<<<<<<<<<
 *         __pyx_unpickle_widgets__set_state(<widgets> __pyx_result, __pyx_state)
 *     return __pyx_result
 */
  }

  /* "(tree fragment)":10
 *     if __pyx_state is not None:
 *         __pyx_unpickle_widgets__set_state(<widgets> __pyx_result, __pyx_state)
 *     return __pyx_result             # <<<<<<<<<<<<<<
 * cdef __pyx_unpickle_widgets__set_state(widgets __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v___pyx_result);
  __pyx_r = __pyx_v___pyx_result;
  goto __pyx_L0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_widgets(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("cgl.__pyx_unpickle_widgets", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
  __Pyx_XDECREF(__pyx_v___pyx_result);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "(tree fragment)":11
 *         __pyx_unpickle_widgets__set_state(<widgets> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_widgets__set_state(widgets __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

static PyObject *__pyx_f_3cgl___pyx_unpickle_widgets__set_state(struct __pyx_obj_3cgl_widgets *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_unpickle_widgets__set_state", 0);

  /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_widgets__set_state(widgets __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  if (unlikely(__pyx_v___pyx_state == Py_None)) {
    PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
    __PYX_ERR(1, 12, __pyx_L1_error)
  }
  __pyx_t_2 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_3 = ((__pyx_t_2 > 0) != 0);
  if (__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 12, __pyx_L1_error)
  __pyx_t_4 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_4;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_1) {

    /* "(tree fragment)":13
 * cdef __pyx_unpickle_widgets__set_state(widgets __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])             # <<<<<<<<<<<<<<
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(__pyx_v___pyx_state == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(1, 13, __pyx_L1_error)
    }
    __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = NULL;
    if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "(tree fragment)":12
 *     return __pyx_result
 * cdef __pyx_unpickle_widgets__set_state(widgets __pyx_result, tuple __pyx_state):
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):             # <<<<<<<<<<<<<<
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */
  }

  /* "(tree fragment)":11
 *         __pyx_unpickle_widgets__set_state(<widgets> __pyx_result, __pyx_state)
 *     return __pyx_result
 * cdef __pyx_unpickle_widgets__set_state(widgets __pyx_result, tuple __pyx_state):             # <<<<<<<<<<<<<<
 *     if len(__pyx_state) > 0 and hasattr(__pyx_result, '__dict__'):
 *         __pyx_result.__dict__.update(__pyx_state[0])
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("cgl.__pyx_unpickle_widgets__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "FromPyStructUtility":11
 * 
 * @cname("__pyx_convert__from_py_struct__CGL_vec2")
 * cdef struct_type __pyx_convert__from_py_struct__CGL_vec2(obj) except *:             # <<<<<<<<<<<<<<
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 */

static struct CGL_vec2 __pyx_convert__from_py_struct__CGL_vec2(PyObject *__pyx_v_obj) {
  struct CGL_vec2 __pyx_v_result;
  PyObject *__pyx_v_value = NULL;
  struct CGL_vec2 __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  CGL_float __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert__from_py_struct__CGL_vec2", 0);

  /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_vec2(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  __pyx_t_1 = ((!(PyMapping_Check(__pyx_v_obj) != 0)) != 0);
  if (__pyx_t_1) {

    /* "FromPyStructUtility":14
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
    __pyx_t_2 = PyErr_Format(__pyx_builtin_TypeError, ((char const *)"Expected %.16s, got %.200s"), ((char *)"a mapping"), Py_TYPE(__pyx_v_obj)->tp_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_vec2(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  }

  /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":17
 * 
 *     try:
 *         value = obj['x']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_value = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":18
 *     try:
 *         value = obj['x']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec2", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 18, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":19
 *         value = obj['x']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")             # <<<<<<<<<<<<<<
 *     result.x = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 19, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 19, __pyx_L6_except_error)
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L9_try_end:;
  }

  /* "FromPyStructUtility":20
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['y']
 */
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(1, 20, __pyx_L1_error)
  __pyx_v_result.x = __pyx_t_10;

  /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":22
 *     result.x = value
 *     try:
 *         value = obj['y']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 22, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":23
 *     try:
 *         value = obj['y']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec2", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 23, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":24
 *         value = obj['y']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")             # <<<<<<<<<<<<<<
 *     result.y = value
 *     return result
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 24, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 24, __pyx_L14_except_error)
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L17_try_end:;
  }

  /* "FromPyStructUtility":25
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(1, 25, __pyx_L1_error)
  __pyx_v_result.y = __pyx_t_10;

  /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "FromPyStructUtility":11
 * 
 * @cname("__pyx_convert__from_py_struct__CGL_vec2")
 * cdef struct_type __pyx_convert__from_py_struct__CGL_vec2(obj) except *:             # <<<<<<<<<<<<<<
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec2", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct CGL_font_character __pyx_convert__from_py_struct__CGL_font_character(PyObject *__pyx_v_obj) {
  struct CGL_font_character __pyx_v_result;
  PyObject *__pyx_v_value = NULL;
  struct CGL_font_character __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  struct CGL_vec2 __pyx_t_10;
  unsigned char *__pyx_t_11;
  char __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert__from_py_struct__CGL_font_character", 0);

  /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_font_character(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  __pyx_t_1 = ((!(PyMapping_Check(__pyx_v_obj) != 0)) != 0);
  if (__pyx_t_1) {

    /* "FromPyStructUtility":14
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
    __pyx_t_2 = PyErr_Format(__pyx_builtin_TypeError, ((char const *)"Expected %.16s, got %.200s"), ((char *)"a mapping"), Py_TYPE(__pyx_v_obj)->tp_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_font_character(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  }

  /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['size']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":17
 * 
 *     try:
 *         value = obj['size']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'size'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_value = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['size']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":18
 *     try:
 *         value = obj['size']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'size'")
 *     result.size = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 18, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":19
 *         value = obj['size']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'size'")             # <<<<<<<<<<<<<<
 *     result.size = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__89, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 19, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 19, __pyx_L6_except_error)
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['size']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L9_try_end:;
  }

  /* "FromPyStructUtility":20
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'size'")
 *     result.size = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['normalized_size']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec2(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 20, __pyx_L1_error)
  __pyx_v_result.size = __pyx_t_10;

  /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'size'")
 *     result.size = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['normalized_size']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":22
 *     result.size = value
 *     try:
 *         value = obj['normalized_size']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normalized_size'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_normalized_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 22, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'size'")
 *     result.size = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['normalized_size']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":23
 *     try:
 *         value = obj['normalized_size']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'normalized_size'")
 *     result.normalized_size = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 23, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":24
 *         value = obj['normalized_size']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normalized_size'")             # <<<<<<<<<<<<<<
 *     result.normalized_size = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__90, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 24, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 24, __pyx_L14_except_error)
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'size'")
 *     result.size = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['normalized_size']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L17_try_end:;
  }

  /* "FromPyStructUtility":25
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normalized_size'")
 *     result.normalized_size = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['offset']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec2(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 25, __pyx_L1_error)
  __pyx_v_result.normalized_size = __pyx_t_10;

  /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'normalized_size'")
 *     result.normalized_size = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['offset']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":27
 *     result.normalized_size = value
 *     try:
 *         value = obj['offset']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'offset'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 27, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'normalized_size'")
 *     result.normalized_size = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['offset']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L25_try_end;
    __pyx_L20_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":28
 *     try:
 *         value = obj['offset']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'offset'")
 *     result.offset = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 28, __pyx_L22_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":29
 *         value = obj['offset']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'offset'")             # <<<<<<<<<<<<<<
 *     result.offset = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 29, __pyx_L22_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 29, __pyx_L22_except_error)
    }
    goto __pyx_L22_except_error;
    __pyx_L22_except_error:;

    /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'normalized_size'")
 *     result.normalized_size = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['offset']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L25_try_end:;
  }

  /* "FromPyStructUtility":30
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'offset'")
 *     result.offset = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['normalized_offset']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec2(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L1_error)
  __pyx_v_result.offset = __pyx_t_10;

  /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'offset'")
 *     result.offset = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['normalized_offset']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":32
 *     result.offset = value
 *     try:
 *         value = obj['normalized_offset']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normalized_offset'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_normalized_offset); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 32, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'offset'")
 *     result.offset = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['normalized_offset']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":33
 *     try:
 *         value = obj['normalized_offset']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'normalized_offset'")
 *     result.normalized_offset = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 33, __pyx_L30_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":34
 *         value = obj['normalized_offset']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normalized_offset'")             # <<<<<<<<<<<<<<
 *     result.normalized_offset = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__92, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 34, __pyx_L30_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 34, __pyx_L30_except_error)
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'offset'")
 *     result.offset = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['normalized_offset']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L33_try_end:;
  }

  /* "FromPyStructUtility":35
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normalized_offset'")
 *     result.normalized_offset = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['bearing']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec2(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 35, __pyx_L1_error)
  __pyx_v_result.normalized_offset = __pyx_t_10;

  /* "FromPyStructUtility":36
 *         raise ValueError("No value specified for struct attribute 'normalized_offset'")
 *     result.normalized_offset = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bearing']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":37
 *     result.normalized_offset = value
 *     try:
 *         value = obj['bearing']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bearing'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_bearing); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":36
 *         raise ValueError("No value specified for struct attribute 'normalized_offset'")
 *     result.normalized_offset = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bearing']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L41_try_end;
    __pyx_L36_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":38
 *     try:
 *         value = obj['bearing']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'bearing'")
 *     result.bearing = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 38, __pyx_L38_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":39
 *         value = obj['bearing']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bearing'")             # <<<<<<<<<<<<<<
 *     result.bearing = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__93, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 39, __pyx_L38_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 39, __pyx_L38_except_error)
    }
    goto __pyx_L38_except_error;
    __pyx_L38_except_error:;

    /* "FromPyStructUtility":36
 *         raise ValueError("No value specified for struct attribute 'normalized_offset'")
 *     result.normalized_offset = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bearing']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L41_try_end:;
  }

  /* "FromPyStructUtility":40
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bearing'")
 *     result.bearing = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['bearing_normalized']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec2(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 40, __pyx_L1_error)
  __pyx_v_result.bearing = __pyx_t_10;

  /* "FromPyStructUtility":41
 *         raise ValueError("No value specified for struct attribute 'bearing'")
 *     result.bearing = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bearing_normalized']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":42
 *     result.bearing = value
 *     try:
 *         value = obj['bearing_normalized']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bearing_normalized'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_bearing_normalized); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 42, __pyx_L44_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":41
 *         raise ValueError("No value specified for struct attribute 'bearing'")
 *     result.bearing = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bearing_normalized']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L49_try_end;
    __pyx_L44_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":43
 *     try:
 *         value = obj['bearing_normalized']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'bearing_normalized'")
 *     result.bearing_normalized = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 43, __pyx_L46_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":44
 *         value = obj['bearing_normalized']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bearing_normalized'")             # <<<<<<<<<<<<<<
 *     result.bearing_normalized = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__94, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 44, __pyx_L46_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 44, __pyx_L46_except_error)
    }
    goto __pyx_L46_except_error;
    __pyx_L46_except_error:;

    /* "FromPyStructUtility":41
 *         raise ValueError("No value specified for struct attribute 'bearing'")
 *     result.bearing = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bearing_normalized']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L49_try_end:;
  }

  /* "FromPyStructUtility":45
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bearing_normalized'")
 *     result.bearing_normalized = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['advance']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec2(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 45, __pyx_L1_error)
  __pyx_v_result.bearing_normalized = __pyx_t_10;

  /* "FromPyStructUtility":46
 *         raise ValueError("No value specified for struct attribute 'bearing_normalized'")
 *     result.bearing_normalized = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['advance']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":47
 *     result.bearing_normalized = value
 *     try:
 *         value = obj['advance']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'advance'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_advance); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 47, __pyx_L52_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":46
 *         raise ValueError("No value specified for struct attribute 'bearing_normalized'")
 *     result.bearing_normalized = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['advance']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L57_try_end;
    __pyx_L52_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":48
 *     try:
 *         value = obj['advance']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'advance'")
 *     result.advance = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 48, __pyx_L54_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":49
 *         value = obj['advance']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'advance'")             # <<<<<<<<<<<<<<
 *     result.advance = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__95, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 49, __pyx_L54_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 49, __pyx_L54_except_error)
    }
    goto __pyx_L54_except_error;
    __pyx_L54_except_error:;

    /* "FromPyStructUtility":46
 *         raise ValueError("No value specified for struct attribute 'bearing_normalized'")
 *     result.bearing_normalized = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['advance']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L57_try_end:;
  }

  /* "FromPyStructUtility":50
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'advance'")
 *     result.advance = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['advance_normalized']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec2(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 50, __pyx_L1_error)
  __pyx_v_result.advance = __pyx_t_10;

  /* "FromPyStructUtility":51
 *         raise ValueError("No value specified for struct attribute 'advance'")
 *     result.advance = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['advance_normalized']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":52
 *     result.advance = value
 *     try:
 *         value = obj['advance_normalized']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'advance_normalized'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_advance_normalized); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 52, __pyx_L60_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":51
 *         raise ValueError("No value specified for struct attribute 'advance'")
 *     result.advance = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['advance_normalized']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L65_try_end;
    __pyx_L60_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":53
 *     try:
 *         value = obj['advance_normalized']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'advance_normalized'")
 *     result.advance_normalized = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 53, __pyx_L62_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":54
 *         value = obj['advance_normalized']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'advance_normalized'")             # <<<<<<<<<<<<<<
 *     result.advance_normalized = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__96, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 54, __pyx_L62_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 54, __pyx_L62_except_error)
    }
    goto __pyx_L62_except_error;
    __pyx_L62_except_error:;

    /* "FromPyStructUtility":51
 *         raise ValueError("No value specified for struct attribute 'advance'")
 *     result.advance = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['advance_normalized']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L65_try_end:;
  }

  /* "FromPyStructUtility":55
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'advance_normalized'")
 *     result.advance_normalized = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['bitmap']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec2(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 55, __pyx_L1_error)
  __pyx_v_result.advance_normalized = __pyx_t_10;

  /* "FromPyStructUtility":56
 *         raise ValueError("No value specified for struct attribute 'advance_normalized'")
 *     result.advance_normalized = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bitmap']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":57
 *     result.advance_normalized = value
 *     try:
 *         value = obj['bitmap']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bitmap'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_bitmap); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 57, __pyx_L68_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":56
 *         raise ValueError("No value specified for struct attribute 'advance_normalized'")
 *     result.advance_normalized = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bitmap']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L73_try_end;
    __pyx_L68_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":58
 *     try:
 *         value = obj['bitmap']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'bitmap'")
 *     result.bitmap = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 58, __pyx_L70_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":59
 *         value = obj['bitmap']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bitmap'")             # <<<<<<<<<<<<<<
 *     result.bitmap = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 59, __pyx_L70_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 59, __pyx_L70_except_error)
    }
    goto __pyx_L70_except_error;
    __pyx_L70_except_error:;

    /* "FromPyStructUtility":56
 *         raise ValueError("No value specified for struct attribute 'advance_normalized'")
 *     result.advance_normalized = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bitmap']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L73_try_end:;
  }

  /* "FromPyStructUtility":60
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bitmap'")
 *     result.bitmap = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['ch']
 */
  __pyx_t_11 = __Pyx_PyObject_AsWritableUString(__pyx_v_value); if (unlikely((!__pyx_t_11) && PyErr_Occurred())) __PYX_ERR(1, 60, __pyx_L1_error)
  __pyx_v_result.bitmap = __pyx_t_11;

  /* "FromPyStructUtility":61
 *         raise ValueError("No value specified for struct attribute 'bitmap'")
 *     result.bitmap = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['ch']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":62
 *     result.bitmap = value
 *     try:
 *         value = obj['ch']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'ch'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_ch); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 62, __pyx_L76_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":61
 *         raise ValueError("No value specified for struct attribute 'bitmap'")
 *     result.bitmap = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['ch']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L81_try_end;
    __pyx_L76_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":63
 *     try:
 *         value = obj['ch']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'ch'")
 *     result.ch = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 63, __pyx_L78_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":64
 *         value = obj['ch']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'ch'")             # <<<<<<<<<<<<<<
 *     result.ch = value
 *     return result
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__98, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 64, __pyx_L78_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 64, __pyx_L78_except_error)
    }
    goto __pyx_L78_except_error;
    __pyx_L78_except_error:;

    /* "FromPyStructUtility":61
 *         raise ValueError("No value specified for struct attribute 'bitmap'")
 *     result.bitmap = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['ch']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L81_try_end:;
  }

  /* "FromPyStructUtility":65
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'ch'")
 *     result.ch = value             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_12 = __Pyx_PyInt_As_char(__pyx_v_value); if (unlikely((__pyx_t_12 == (char)-1) && PyErr_Occurred())) __PYX_ERR(1, 65, __pyx_L1_error)
  __pyx_v_result.ch = __pyx_t_12;

  /* "FromPyStructUtility":66
 *         raise ValueError("No value specified for struct attribute 'ch'")
 *     result.ch = value
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "FromPyStructUtility":11
 * 
 * @cname("__pyx_convert__from_py_struct__CGL_font_character")
 * cdef struct_type __pyx_convert__from_py_struct__CGL_font_character(obj) except *:             # <<<<<<<<<<<<<<
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_font_character", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct CGL_vec3 __pyx_convert__from_py_struct__CGL_vec3(PyObject *__pyx_v_obj) {
  struct CGL_vec3 __pyx_v_result;
  PyObject *__pyx_v_value = NULL;
  struct CGL_vec3 __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  CGL_float __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert__from_py_struct__CGL_vec3", 0);

  /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_vec3(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  __pyx_t_1 = ((!(PyMapping_Check(__pyx_v_obj) != 0)) != 0);
  if (__pyx_t_1) {

    /* "FromPyStructUtility":14
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
    __pyx_t_2 = PyErr_Format(__pyx_builtin_TypeError, ((char const *)"Expected %.16s, got %.200s"), ((char *)"a mapping"), Py_TYPE(__pyx_v_obj)->tp_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_vec3(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  }

  /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":17
 * 
 *     try:
 *         value = obj['x']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_value = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":18
 *     try:
 *         value = obj['x']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec3", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 18, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":19
 *         value = obj['x']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")             # <<<<<<<<<<<<<<
 *     result.x = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 19, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 19, __pyx_L6_except_error)
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L9_try_end:;
  }

  /* "FromPyStructUtility":20
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['y']
 */
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(1, 20, __pyx_L1_error)
  __pyx_v_result.x = __pyx_t_10;

  /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":22
 *     result.x = value
 *     try:
 *         value = obj['y']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 22, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":23
 *     try:
 *         value = obj['y']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec3", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 23, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":24
 *         value = obj['y']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")             # <<<<<<<<<<<<<<
 *     result.y = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 24, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 24, __pyx_L14_except_error)
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L17_try_end:;
  }

  /* "FromPyStructUtility":25
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['z']
 */
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(1, 25, __pyx_L1_error)
  __pyx_v_result.y = __pyx_t_10;

  /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['z']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":27
 *     result.y = value
 *     try:
 *         value = obj['z']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'z'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 27, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['z']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L25_try_end;
    __pyx_L20_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":28
 *     try:
 *         value = obj['z']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec3", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 28, __pyx_L22_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":29
 *         value = obj['z']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'z'")             # <<<<<<<<<<<<<<
 *     result.z = value
 *     return result
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 29, __pyx_L22_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 29, __pyx_L22_except_error)
    }
    goto __pyx_L22_except_error;
    __pyx_L22_except_error:;

    /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['z']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L25_try_end:;
  }

  /* "FromPyStructUtility":30
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L1_error)
  __pyx_v_result.z = __pyx_t_10;

  /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "FromPyStructUtility":11
 * 
 * @cname("__pyx_convert__from_py_struct__CGL_vec3")
 * cdef struct_type __pyx_convert__from_py_struct__CGL_vec3(obj) except *:             # <<<<<<<<<<<<<<
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec3", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct CGL_vec4 __pyx_convert__from_py_struct__CGL_vec4(PyObject *__pyx_v_obj) {
  struct CGL_vec4 __pyx_v_result;
  PyObject *__pyx_v_value = NULL;
  struct CGL_vec4 __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  CGL_float __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert__from_py_struct__CGL_vec4", 0);

  /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_vec4(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  __pyx_t_1 = ((!(PyMapping_Check(__pyx_v_obj) != 0)) != 0);
  if (__pyx_t_1) {

    /* "FromPyStructUtility":14
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
    __pyx_t_2 = PyErr_Format(__pyx_builtin_TypeError, ((char const *)"Expected %.16s, got %.200s"), ((char *)"a mapping"), Py_TYPE(__pyx_v_obj)->tp_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_vec4(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  }

  /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":17
 * 
 *     try:
 *         value = obj['x']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_value = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":18
 *     try:
 *         value = obj['x']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 18, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":19
 *         value = obj['x']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")             # <<<<<<<<<<<<<<
 *     result.x = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 19, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 19, __pyx_L6_except_error)
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L9_try_end:;
  }

  /* "FromPyStructUtility":20
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['y']
 */
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(1, 20, __pyx_L1_error)
  __pyx_v_result.x = __pyx_t_10;

  /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":22
 *     result.x = value
 *     try:
 *         value = obj['y']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 22, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":23
 *     try:
 *         value = obj['y']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 23, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":24
 *         value = obj['y']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")             # <<<<<<<<<<<<<<
 *     result.y = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 24, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 24, __pyx_L14_except_error)
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L17_try_end:;
  }

  /* "FromPyStructUtility":25
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['z']
 */
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(1, 25, __pyx_L1_error)
  __pyx_v_result.y = __pyx_t_10;

  /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['z']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":27
 *     result.y = value
 *     try:
 *         value = obj['z']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'z'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 27, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['z']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L25_try_end;
    __pyx_L20_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":28
 *     try:
 *         value = obj['z']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 28, __pyx_L22_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":29
 *         value = obj['z']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'z'")             # <<<<<<<<<<<<<<
 *     result.z = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 29, __pyx_L22_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 29, __pyx_L22_except_error)
    }
    goto __pyx_L22_except_error;
    __pyx_L22_except_error:;

    /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['z']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L25_try_end:;
  }

  /* "FromPyStructUtility":30
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['w']
 */
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L1_error)
  __pyx_v_result.z = __pyx_t_10;

  /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['w']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":32
 *     result.z = value
 *     try:
 *         value = obj['w']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'w'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_w); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 32, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['w']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":33
 *     try:
 *         value = obj['w']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'w'")
 *     result.w = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 33, __pyx_L30_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":34
 *         value = obj['w']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'w'")             # <<<<<<<<<<<<<<
 *     result.w = value
 *     return result
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 34, __pyx_L30_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 34, __pyx_L30_except_error)
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['w']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L33_try_end:;
  }

  /* "FromPyStructUtility":35
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'w'")
 *     result.w = value             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_10 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_float)-1)) && PyErr_Occurred())) __PYX_ERR(1, 35, __pyx_L1_error)
  __pyx_v_result.w = __pyx_t_10;

  /* "FromPyStructUtility":36
 *         raise ValueError("No value specified for struct attribute 'w'")
 *     result.w = value
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "FromPyStructUtility":11
 * 
 * @cname("__pyx_convert__from_py_struct__CGL_vec4")
 * cdef struct_type __pyx_convert__from_py_struct__CGL_vec4(obj) except *:             # <<<<<<<<<<<<<<
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_vec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":112
 * 
 * @cname("__Pyx_carray_to_py_CGL_float")
 * cdef inline list __Pyx_carray_to_py_CGL_float(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_py_CGL_float(CGL_float *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_l = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_py_CGL_float", 0);

  /* "carray.to_py":115
 *     cdef size_t i
 *     cdef object value
 *     l = PyList_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyList_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 115, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_l = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":116
 *     cdef object value
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "carray.to_py":117
 *     l = PyList_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 */
    __pyx_t_1 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 117, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":118
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyList_SET_ITEM(l, i, value)
 *     return l
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":119
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)             # <<<<<<<<<<<<<<
 *     return l
 * 
 */
    PyList_SET_ITEM(__pyx_v_l, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":120
 *         Py_INCREF(value)
 *         PyList_SET_ITEM(l, i, value)
 *     return l             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_l);
  __pyx_r = __pyx_v_l;
  goto __pyx_L0;

  /* "carray.to_py":112
 * 
 * @cname("__Pyx_carray_to_py_CGL_float")
 * cdef inline list __Pyx_carray_to_py_CGL_float(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_py_CGL_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_l);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "carray.to_py":124
 * 
 * @cname("__Pyx_carray_to_tuple_CGL_float")
 * cdef inline tuple __Pyx_carray_to_tuple_CGL_float(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

static CYTHON_INLINE PyObject *__Pyx_carray_to_tuple_CGL_float(CGL_float *__pyx_v_v, Py_ssize_t __pyx_v_length) {
  size_t __pyx_v_i;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_t = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  size_t __pyx_t_2;
  size_t __pyx_t_3;
  size_t __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_carray_to_tuple_CGL_float", 0);

  /* "carray.to_py":127
 *     cdef size_t i
 *     cdef object value
 *     t = PyTuple_New(length)             # <<<<<<<<<<<<<<
 *     for i in range(<size_t>length):
 *         value = v[i]
 */
  __pyx_t_1 = PyTuple_New(__pyx_v_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 127, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_t = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "carray.to_py":128
 *     cdef object value
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):             # <<<<<<<<<<<<<<
 *         value = v[i]
 *         Py_INCREF(value)
 */
  __pyx_t_2 = ((size_t)__pyx_v_length);
  __pyx_t_3 = __pyx_t_2;
  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
    __pyx_v_i = __pyx_t_4;

    /* "carray.to_py":129
 *     t = PyTuple_New(length)
 *     for i in range(<size_t>length):
 *         value = v[i]             # <<<<<<<<<<<<<<
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 */
    __pyx_t_1 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "carray.to_py":130
 *     for i in range(<size_t>length):
 *         value = v[i]
 *         Py_INCREF(value)             # <<<<<<<<<<<<<<
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t
 */
    Py_INCREF(__pyx_v_value);

    /* "carray.to_py":131
 *         value = v[i]
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)             # <<<<<<<<<<<<<<
 *     return t
 */
    PyTuple_SET_ITEM(__pyx_v_t, __pyx_v_i, __pyx_v_value);
  }

  /* "carray.to_py":132
 *         Py_INCREF(value)
 *         PyTuple_SET_ITEM(t, i, value)
 *     return t             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_t);
  __pyx_r = __pyx_v_t;
  goto __pyx_L0;

  /* "carray.to_py":124
 * 
 * @cname("__Pyx_carray_to_tuple_CGL_float")
 * cdef inline tuple __Pyx_carray_to_tuple_CGL_float(base_type *v, Py_ssize_t length):             # <<<<<<<<<<<<<<
 *     cdef size_t i
 *     cdef object value
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("carray.to_py.__Pyx_carray_to_tuple_CGL_float", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_t);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "FromPyStructUtility":11
 * 
 * @cname("__pyx_convert__from_py_struct__CGL_ivec4")
 * cdef struct_type __pyx_convert__from_py_struct__CGL_ivec4(obj) except *:             # <<<<<<<<<<<<<<
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 */

static struct CGL_ivec4 __pyx_convert__from_py_struct__CGL_ivec4(PyObject *__pyx_v_obj) {
  struct CGL_ivec4 __pyx_v_result;
  PyObject *__pyx_v_value = NULL;
  struct CGL_ivec4 __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  CGL_int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert__from_py_struct__CGL_ivec4", 0);

  /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_ivec4(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  __pyx_t_1 = ((!(PyMapping_Check(__pyx_v_obj) != 0)) != 0);
  if (__pyx_t_1) {

    /* "FromPyStructUtility":14
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
    __pyx_t_2 = PyErr_Format(__pyx_builtin_TypeError, ((char const *)"Expected %.16s, got %.200s"), ((char *)"a mapping"), Py_TYPE(__pyx_v_obj)->tp_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_ivec4(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  }

  /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":17
 * 
 *     try:
 *         value = obj['x']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_value = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":18
 *     try:
 *         value = obj['x']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_ivec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 18, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":19
 *         value = obj['x']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")             # <<<<<<<<<<<<<<
 *     result.x = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__87, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 19, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 19, __pyx_L6_except_error)
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['x']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L9_try_end:;
  }

  /* "FromPyStructUtility":20
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['y']
 */
  __pyx_t_10 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(1, 20, __pyx_L1_error)
  __pyx_v_result.x = __pyx_t_10;

  /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":22
 *     result.x = value
 *     try:
 *         value = obj['y']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_y); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 22, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":23
 *     try:
 *         value = obj['y']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_ivec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 23, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":24
 *         value = obj['y']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")             # <<<<<<<<<<<<<<
 *     result.y = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__88, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 24, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 24, __pyx_L14_except_error)
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'x'")
 *     result.x = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['y']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L17_try_end:;
  }

  /* "FromPyStructUtility":25
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['z']
 */
  __pyx_t_10 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(1, 25, __pyx_L1_error)
  __pyx_v_result.y = __pyx_t_10;

  /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['z']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":27
 *     result.y = value
 *     try:
 *         value = obj['z']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'z'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_z); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 27, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['z']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L25_try_end;
    __pyx_L20_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":28
 *     try:
 *         value = obj['z']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_ivec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 28, __pyx_L22_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":29
 *         value = obj['z']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'z'")             # <<<<<<<<<<<<<<
 *     result.z = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__99, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 29, __pyx_L22_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 29, __pyx_L22_except_error)
    }
    goto __pyx_L22_except_error;
    __pyx_L22_except_error:;

    /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'y'")
 *     result.y = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['z']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L25_try_end:;
  }

  /* "FromPyStructUtility":30
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['w']
 */
  __pyx_t_10 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L1_error)
  __pyx_v_result.z = __pyx_t_10;

  /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['w']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":32
 *     result.z = value
 *     try:
 *         value = obj['w']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'w'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_w); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 32, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['w']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":33
 *     try:
 *         value = obj['w']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'w'")
 *     result.w = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_ivec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 33, __pyx_L30_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":34
 *         value = obj['w']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'w'")             # <<<<<<<<<<<<<<
 *     result.w = value
 *     return result
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__100, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 34, __pyx_L30_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 34, __pyx_L30_except_error)
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'z'")
 *     result.z = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['w']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L33_try_end:;
  }

  /* "FromPyStructUtility":35
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'w'")
 *     result.w = value             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_10 = __Pyx_PyInt_As_CGL_int(__pyx_v_value); if (unlikely((__pyx_t_10 == ((CGL_int)-1)) && PyErr_Occurred())) __PYX_ERR(1, 35, __pyx_L1_error)
  __pyx_v_result.w = __pyx_t_10;

  /* "FromPyStructUtility":36
 *         raise ValueError("No value specified for struct attribute 'w'")
 *     result.w = value
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "FromPyStructUtility":11
 * 
 * @cname("__pyx_convert__from_py_struct__CGL_ivec4")
 * cdef struct_type __pyx_convert__from_py_struct__CGL_ivec4(obj) except *:             # <<<<<<<<<<<<<<
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_ivec4", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static struct CGL_mesh_vertex __pyx_convert__from_py_struct__CGL_mesh_vertex(PyObject *__pyx_v_obj) {
  struct CGL_mesh_vertex __pyx_v_result;
  PyObject *__pyx_v_value = NULL;
  struct CGL_mesh_vertex __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  struct CGL_vec4 __pyx_t_10;
  struct CGL_ivec4 __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__pyx_convert__from_py_struct__CGL_mesh_vertex", 0);

  /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_mesh_vertex(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  __pyx_t_1 = ((!(PyMapping_Check(__pyx_v_obj) != 0)) != 0);
  if (__pyx_t_1) {

    /* "FromPyStructUtility":14
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)             # <<<<<<<<<<<<<<
 * 
 *     try:
 */
    __pyx_t_2 = PyErr_Format(__pyx_builtin_TypeError, ((char const *)"Expected %.16s, got %.200s"), ((char *)"a mapping"), Py_TYPE(__pyx_v_obj)->tp_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 14, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":13
 * cdef struct_type __pyx_convert__from_py_struct__CGL_mesh_vertex(obj) except *:
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):             # <<<<<<<<<<<<<<
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 */
  }

  /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['position']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":17
 * 
 *     try:
 *         value = obj['position']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'position'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 17, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_value = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['position']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "FromPyStructUtility":18
 *     try:
 *         value = obj['position']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'position'")
 *     result.position = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_mesh_vertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 18, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":19
 *         value = obj['position']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'position'")             # <<<<<<<<<<<<<<
 *     result.position = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__101, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 19, __pyx_L6_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 19, __pyx_L6_except_error)
    }
    goto __pyx_L6_except_error;
    __pyx_L6_except_error:;

    /* "FromPyStructUtility":16
 *         PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name)
 * 
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['position']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L9_try_end:;
  }

  /* "FromPyStructUtility":20
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'position'")
 *     result.position = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['normal']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec4(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 20, __pyx_L1_error)
  __pyx_v_result.position = __pyx_t_10;

  /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'position'")
 *     result.position = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['normal']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":22
 *     result.position = value
 *     try:
 *         value = obj['normal']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normal'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_normal); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 22, __pyx_L12_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'position'")
 *     result.position = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['normal']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L17_try_end;
    __pyx_L12_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":23
 *     try:
 *         value = obj['normal']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'normal'")
 *     result.normal = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_mesh_vertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 23, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":24
 *         value = obj['normal']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normal'")             # <<<<<<<<<<<<<<
 *     result.normal = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__102, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 24, __pyx_L14_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 24, __pyx_L14_except_error)
    }
    goto __pyx_L14_except_error;
    __pyx_L14_except_error:;

    /* "FromPyStructUtility":21
 *         raise ValueError("No value specified for struct attribute 'position'")
 *     result.position = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['normal']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L17_try_end:;
  }

  /* "FromPyStructUtility":25
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normal'")
 *     result.normal = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['texture_coordinates']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec4(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 25, __pyx_L1_error)
  __pyx_v_result.normal = __pyx_t_10;

  /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'normal'")
 *     result.normal = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['texture_coordinates']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":27
 *     result.normal = value
 *     try:
 *         value = obj['texture_coordinates']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'texture_coordinates'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_texture_coordinates); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 27, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'normal'")
 *     result.normal = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['texture_coordinates']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L25_try_end;
    __pyx_L20_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":28
 *     try:
 *         value = obj['texture_coordinates']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'texture_coordinates'")
 *     result.texture_coordinates = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_mesh_vertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 28, __pyx_L22_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":29
 *         value = obj['texture_coordinates']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'texture_coordinates'")             # <<<<<<<<<<<<<<
 *     result.texture_coordinates = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__103, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 29, __pyx_L22_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 29, __pyx_L22_except_error)
    }
    goto __pyx_L22_except_error;
    __pyx_L22_except_error:;

    /* "FromPyStructUtility":26
 *         raise ValueError("No value specified for struct attribute 'normal'")
 *     result.normal = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['texture_coordinates']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L25_try_end:;
  }

  /* "FromPyStructUtility":30
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'texture_coordinates'")
 *     result.texture_coordinates = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['bone_wieghts']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec4(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 30, __pyx_L1_error)
  __pyx_v_result.texture_coordinates = __pyx_t_10;

  /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'texture_coordinates'")
 *     result.texture_coordinates = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bone_wieghts']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_4, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "FromPyStructUtility":32
 *     result.texture_coordinates = value
 *     try:
 *         value = obj['bone_wieghts']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bone_wieghts'")
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_bone_wieghts); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 32, __pyx_L28_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'texture_coordinates'")
 *     result.texture_coordinates = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bone_wieghts']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L33_try_end;
    __pyx_L28_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":33
 *     try:
 *         value = obj['bone_wieghts']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'bone_wieghts'")
 *     result.bone_wieghts = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_mesh_vertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(1, 33, __pyx_L30_except_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_2);

      /* "FromPyStructUtility":34
 *         value = obj['bone_wieghts']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bone_wieghts'")             # <<<<<<<<<<<<<<
 *     result.bone_wieghts = value
 *     try:
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__104, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 34, __pyx_L30_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 34, __pyx_L30_except_error)
    }
    goto __pyx_L30_except_error;
    __pyx_L30_except_error:;

    /* "FromPyStructUtility":31
 *         raise ValueError("No value specified for struct attribute 'texture_coordinates'")
 *     result.texture_coordinates = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bone_wieghts']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_4, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L33_try_end:;
  }

  /* "FromPyStructUtility":35
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bone_wieghts'")
 *     result.bone_wieghts = value             # <<<<<<<<<<<<<<
 *     try:
 *         value = obj['bone_ids']
 */
  __pyx_t_10 = __pyx_convert__from_py_struct__CGL_vec4(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 35, __pyx_L1_error)
  __pyx_v_result.bone_wieghts = __pyx_t_10;

  /* "FromPyStructUtility":36
 *         raise ValueError("No value specified for struct attribute 'bone_wieghts'")
 *     result.bone_wieghts = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bone_ids']
 *     except KeyError:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "FromPyStructUtility":37
 *     result.bone_wieghts = value
 *     try:
 *         value = obj['bone_ids']             # <<<<<<<<<<<<<<
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bone_ids'")
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_obj, __pyx_n_s_bone_ids); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "FromPyStructUtility":36
 *         raise ValueError("No value specified for struct attribute 'bone_wieghts'")
 *     result.bone_wieghts = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bone_ids']
 *     except KeyError:
 */
    }
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L41_try_end;
    __pyx_L36_error:;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "FromPyStructUtility":38
 *     try:
 *         value = obj['bone_ids']
 *     except KeyError:             # <<<<<<<<<<<<<<
 *         raise ValueError("No value specified for struct attribute 'bone_ids'")
 *     result.bone_ids = value
 */
    __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_mesh_vertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 38, __pyx_L38_except_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "FromPyStructUtility":39
 *         value = obj['bone_ids']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bone_ids'")             # <<<<<<<<<<<<<<
 *     result.bone_ids = value
 *     return result
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__105, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 39, __pyx_L38_except_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __PYX_ERR(1, 39, __pyx_L38_except_error)
    }
    goto __pyx_L38_except_error;
    __pyx_L38_except_error:;

    /* "FromPyStructUtility":36
 *         raise ValueError("No value specified for struct attribute 'bone_wieghts'")
 *     result.bone_wieghts = value
 *     try:             # <<<<<<<<<<<<<<
 *         value = obj['bone_ids']
 *     except KeyError:
 */
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L41_try_end:;
  }

  /* "FromPyStructUtility":40
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bone_ids'")
 *     result.bone_ids = value             # <<<<<<<<<<<<<<
 *     return result
 * 
 */
  __pyx_t_11 = __pyx_convert__from_py_struct__CGL_ivec4(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 40, __pyx_L1_error)
  __pyx_v_result.bone_ids = __pyx_t_11;

  /* "FromPyStructUtility":41
 *         raise ValueError("No value specified for struct attribute 'bone_ids'")
 *     result.bone_ids = value
 *     return result             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_result;
  goto __pyx_L0;

  /* "FromPyStructUtility":11
 * 
 * @cname("__pyx_convert__from_py_struct__CGL_mesh_vertex")
 * cdef struct_type __pyx_convert__from_py_struct__CGL_mesh_vertex(obj) except *:             # <<<<<<<<<<<<<<
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("FromPyStructUtility.__pyx_convert__from_py_struct__CGL_mesh_vertex", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_pretend_to_initialize(&__pyx_r);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_tp_new_3cgl_vec2(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_vec2(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_3cgl_vec2(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_3cgl_vec2(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_3cgl_4vec2_13__setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_3cgl_vec2(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_3cgl_4vec2_21__getattr__(o, n);
  }
  return v;
}

static int __pyx_tp_setattro_3cgl_vec2(PyObject *o, PyObject *n, PyObject *v) {
  if (v) {
    return __pyx_pw_3cgl_4vec2_23__setattr__(o, n, v);
  }
  else {
    return PyObject_GenericSetAttr(o, n, 0);
  }
}

static PyObject *__pyx_tp_richcompare_3cgl_vec2(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_3cgl_4vec2_15__eq__(o1, o2);
    }
    case Py_NE: {
      return __pyx_pw_3cgl_4vec2_17__ne__(o1, o2);
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyMethodDef __pyx_methods_3cgl_vec2[] = {
  {"__bytes__", (PyCFunction)__pyx_pw_3cgl_4vec2_7__bytes__, METH_NOARGS, 0},
  {"__getattr__", (PyCFunction)__pyx_pw_3cgl_4vec2_21__getattr__, METH_O|METH_COEXIST, 0},
  {"dot", (PyCFunction)__pyx_pw_3cgl_4vec2_35dot, METH_O, 0},
  {"cross", (PyCFunction)__pyx_pw_3cgl_4vec2_37cross, METH_O, 0},
  {"length", (PyCFunction)__pyx_pw_3cgl_4vec2_39length, METH_NOARGS, 0},
  {"length_squared", (PyCFunction)__pyx_pw_3cgl_4vec2_41length_squared, METH_NOARGS, 0},
  {"normalized", (PyCFunction)__pyx_pw_3cgl_4vec2_43normalized, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_4vec2_45__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_4vec2_47__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_vec2 = {
  __pyx_pw_3cgl_4vec2_25__add__, /*nb_add*/
  __pyx_pw_3cgl_4vec2_27__sub__, /*nb_subtract*/
  __pyx_pw_3cgl_4vec2_29__mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  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*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  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*/
  __pyx_pw_3cgl_4vec2_33__floordiv__, /*nb_floor_divide*/
  __pyx_pw_3cgl_4vec2_31__truediv__, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_vec2 = {
  __pyx_pw_3cgl_4vec2_9__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_3cgl_vec2, /*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_vec2 = {
  __pyx_pw_3cgl_4vec2_9__len__, /*mp_length*/
  __pyx_pw_3cgl_4vec2_11__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_3cgl_vec2, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_3cgl_vec2 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.vec2", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_vec2), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_vec2, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_4vec2_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number_vec2, /*tp_as_number*/
  &__pyx_tp_as_sequence_vec2, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_vec2, /*tp_as_mapping*/
  __pyx_pw_3cgl_4vec2_19__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_4vec2_5__str__, /*tp_str*/
  __pyx_tp_getattro_3cgl_vec2, /*tp_getattro*/
  __pyx_tp_setattro_3cgl_vec2, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_tp_richcompare_3cgl_vec2, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_vec2, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_4vec2_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_vec2, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_vec3(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_vec3(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_3cgl_vec3(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_3cgl_vec3(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_3cgl_4vec3_13__setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_3cgl_vec3(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_3cgl_4vec3_21__getattr__(o, n);
  }
  return v;
}

static int __pyx_tp_setattro_3cgl_vec3(PyObject *o, PyObject *n, PyObject *v) {
  if (v) {
    return __pyx_pw_3cgl_4vec3_23__setattr__(o, n, v);
  }
  else {
    return PyObject_GenericSetAttr(o, n, 0);
  }
}

static PyObject *__pyx_tp_richcompare_3cgl_vec3(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_3cgl_4vec3_15__eq__(o1, o2);
    }
    case Py_NE: {
      return __pyx_pw_3cgl_4vec3_17__ne__(o1, o2);
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyMethodDef __pyx_methods_3cgl_vec3[] = {
  {"__bytes__", (PyCFunction)__pyx_pw_3cgl_4vec3_7__bytes__, METH_NOARGS, 0},
  {"__getattr__", (PyCFunction)__pyx_pw_3cgl_4vec3_21__getattr__, METH_O|METH_COEXIST, 0},
  {"dot", (PyCFunction)__pyx_pw_3cgl_4vec3_35dot, METH_O, 0},
  {"cross", (PyCFunction)__pyx_pw_3cgl_4vec3_37cross, METH_O, 0},
  {"length", (PyCFunction)__pyx_pw_3cgl_4vec3_39length, METH_NOARGS, 0},
  {"length_squared", (PyCFunction)__pyx_pw_3cgl_4vec3_41length_squared, METH_NOARGS, 0},
  {"normalized", (PyCFunction)__pyx_pw_3cgl_4vec3_43normalized, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_4vec3_45__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_4vec3_47__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_vec3 = {
  __pyx_pw_3cgl_4vec3_25__add__, /*nb_add*/
  __pyx_pw_3cgl_4vec3_27__sub__, /*nb_subtract*/
  __pyx_pw_3cgl_4vec3_29__mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  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*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  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*/
  __pyx_pw_3cgl_4vec3_33__floordiv__, /*nb_floor_divide*/
  __pyx_pw_3cgl_4vec3_31__truediv__, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_vec3 = {
  __pyx_pw_3cgl_4vec3_9__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_3cgl_vec3, /*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_vec3 = {
  __pyx_pw_3cgl_4vec3_9__len__, /*mp_length*/
  __pyx_pw_3cgl_4vec3_11__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_3cgl_vec3, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_3cgl_vec3 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.vec3", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_vec3), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_vec3, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_4vec3_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number_vec3, /*tp_as_number*/
  &__pyx_tp_as_sequence_vec3, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_vec3, /*tp_as_mapping*/
  __pyx_pw_3cgl_4vec3_19__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_4vec3_5__str__, /*tp_str*/
  __pyx_tp_getattro_3cgl_vec3, /*tp_getattro*/
  __pyx_tp_setattro_3cgl_vec3, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_tp_richcompare_3cgl_vec3, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_vec3, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_4vec3_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_vec3, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_vec4(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_vec4(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_3cgl_vec4(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_3cgl_vec4(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_3cgl_4vec4_13__setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_3cgl_vec4(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_3cgl_4vec4_21__getattr__(o, n);
  }
  return v;
}

static int __pyx_tp_setattro_3cgl_vec4(PyObject *o, PyObject *n, PyObject *v) {
  if (v) {
    return __pyx_pw_3cgl_4vec4_23__setattr__(o, n, v);
  }
  else {
    return PyObject_GenericSetAttr(o, n, 0);
  }
}

static PyObject *__pyx_tp_richcompare_3cgl_vec4(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_3cgl_4vec4_15__eq__(o1, o2);
    }
    case Py_NE: {
      return __pyx_pw_3cgl_4vec4_17__ne__(o1, o2);
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyMethodDef __pyx_methods_3cgl_vec4[] = {
  {"__bytes__", (PyCFunction)__pyx_pw_3cgl_4vec4_7__bytes__, METH_NOARGS, 0},
  {"__getattr__", (PyCFunction)__pyx_pw_3cgl_4vec4_21__getattr__, METH_O|METH_COEXIST, 0},
  {"dot", (PyCFunction)__pyx_pw_3cgl_4vec4_35dot, METH_O, 0},
  {"cross", (PyCFunction)__pyx_pw_3cgl_4vec4_37cross, METH_O, 0},
  {"length", (PyCFunction)__pyx_pw_3cgl_4vec4_39length, METH_NOARGS, 0},
  {"length_squared", (PyCFunction)__pyx_pw_3cgl_4vec4_41length_squared, METH_NOARGS, 0},
  {"normalized", (PyCFunction)__pyx_pw_3cgl_4vec4_43normalized, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_4vec4_45__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_4vec4_47__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_vec4 = {
  __pyx_pw_3cgl_4vec4_25__add__, /*nb_add*/
  __pyx_pw_3cgl_4vec4_27__sub__, /*nb_subtract*/
  __pyx_pw_3cgl_4vec4_29__mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  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*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  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*/
  __pyx_pw_3cgl_4vec4_33__floordiv__, /*nb_floor_divide*/
  __pyx_pw_3cgl_4vec4_31__truediv__, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_vec4 = {
  __pyx_pw_3cgl_4vec4_9__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_3cgl_vec4, /*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_vec4 = {
  __pyx_pw_3cgl_4vec4_9__len__, /*mp_length*/
  __pyx_pw_3cgl_4vec4_11__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_3cgl_vec4, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_3cgl_vec4 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.vec4", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_vec4), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_vec4, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_4vec4_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number_vec4, /*tp_as_number*/
  &__pyx_tp_as_sequence_vec4, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_vec4, /*tp_as_mapping*/
  __pyx_pw_3cgl_4vec4_19__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_4vec4_5__str__, /*tp_str*/
  __pyx_tp_getattro_3cgl_vec4, /*tp_getattro*/
  __pyx_tp_setattro_3cgl_vec4, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_tp_richcompare_3cgl_vec4, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_vec4, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_4vec4_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_vec4, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_ivec4(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_ivec4(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_3cgl_ivec4(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_3cgl_ivec4(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_3cgl_5ivec4_9__setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_tp_getattro_3cgl_ivec4(PyObject *o, PyObject *n) {
  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
    PyErr_Clear();
    v = __pyx_pw_3cgl_5ivec4_13__getattr__(o, n);
  }
  return v;
}

static int __pyx_tp_setattro_3cgl_ivec4(PyObject *o, PyObject *n, PyObject *v) {
  if (v) {
    return __pyx_pw_3cgl_5ivec4_15__setattr__(o, n, v);
  }
  else {
    return PyObject_GenericSetAttr(o, n, 0);
  }
}

static PyMethodDef __pyx_methods_3cgl_ivec4[] = {
  {"__getattr__", (PyCFunction)__pyx_pw_3cgl_5ivec4_13__getattr__, METH_O|METH_COEXIST, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_5ivec4_17__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_5ivec4_19__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_ivec4 = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_3cgl_ivec4, /*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_ivec4 = {
  0, /*mp_length*/
  __pyx_pw_3cgl_5ivec4_7__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_3cgl_ivec4, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_3cgl_ivec4 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.ivec4", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_ivec4), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_ivec4, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_5ivec4_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_ivec4, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_ivec4, /*tp_as_mapping*/
  __pyx_pw_3cgl_5ivec4_11__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_5ivec4_5__str__, /*tp_str*/
  __pyx_tp_getattro_3cgl_ivec4, /*tp_getattro*/
  __pyx_tp_setattro_3cgl_ivec4, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_ivec4, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_5ivec4_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_ivec4, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_3cgl_mat4 __pyx_vtable_3cgl_mat4;

static PyObject *__pyx_tp_new_3cgl_mat4(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3cgl_mat4 *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3cgl_mat4 *)o);
  p->__pyx_vtab = __pyx_vtabptr_3cgl_mat4;
  return o;
}

static void __pyx_tp_dealloc_3cgl_mat4(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_3cgl_mat4[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_4mat4_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_4mat4_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_mat4 = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  __pyx_pw_3cgl_4mat4_7__mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  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*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  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*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PyTypeObject __pyx_type_3cgl_mat4 = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.mat4", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_mat4), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_mat4, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_4mat4_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number_mat4, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_4mat4_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_4mat4_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_mat4, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_4mat4_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_mat4, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_transform(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  if (unlikely(__pyx_pw_3cgl_9transform_1__cinit__(o, __pyx_empty_tuple, NULL) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_3cgl_transform(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_tp_richcompare_3cgl_transform(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_3cgl_9transform_9__eq__(o1, o2);
    }
    case Py_NE: {
      PyObject *ret;
      ret = __pyx_pw_3cgl_9transform_9__eq__(o1, o2);
      if (likely(ret && ret != Py_NotImplemented)) {
        int b = __Pyx_PyObject_IsTrue(ret); Py_DECREF(ret);
        if (unlikely(b < 0)) return NULL;
        ret = (b) ? Py_False : Py_True;
        Py_INCREF(ret);
      }
      return ret;
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyObject *__pyx_getprop_3cgl_9transform_position(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_9transform_8position_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_9transform_rotation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_9transform_8rotation_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_9transform_scale(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_9transform_5scale_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_9transform_matrix(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_9transform_6matrix_1__get__(o);
}

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

static PyMethodDef __pyx_methods_3cgl_transform[] = {
  {"load_matrix", (PyCFunction)__pyx_pw_3cgl_9transform_13load_matrix, METH_O, 0},
  {"set_parent", (PyCFunction)__pyx_pw_3cgl_9transform_15set_parent, METH_O, 0},
  {"update", (PyCFunction)__pyx_pw_3cgl_9transform_17update, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_9transform_19__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_9transform_21__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_transform[] = {
  {(char *)"position", __pyx_getprop_3cgl_9transform_position, __pyx_setprop_3cgl_9transform_position, (char *)0, 0},
  {(char *)"rotation", __pyx_getprop_3cgl_9transform_rotation, __pyx_setprop_3cgl_9transform_rotation, (char *)0, 0},
  {(char *)"scale", __pyx_getprop_3cgl_9transform_scale, __pyx_setprop_3cgl_9transform_scale, (char *)0, 0},
  {(char *)"matrix", __pyx_getprop_3cgl_9transform_matrix, __pyx_setprop_3cgl_9transform_matrix, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_transform = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.transform", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_transform), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_transform, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_9transform_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_9transform_5__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_9transform_11__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_tp_richcompare_3cgl_transform, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_transform, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_transform, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_9transform_3__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_transform, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_matrix(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_matrix(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_6matrix_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_3cgl_matrix(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_3cgl_matrix(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_3cgl_6matrix_25__setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_tp_richcompare_3cgl_matrix(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_3cgl_6matrix_33__eq__(o1, o2);
    }
    case Py_NE: {
      PyObject *ret;
      ret = __pyx_pw_3cgl_6matrix_33__eq__(o1, o2);
      if (likely(ret && ret != Py_NotImplemented)) {
        int b = __Pyx_PyObject_IsTrue(ret); Py_DECREF(ret);
        if (unlikely(b < 0)) return NULL;
        ret = (b) ? Py_False : Py_True;
        Py_INCREF(ret);
      }
      return ret;
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyObject *__pyx_getprop_3cgl_6matrix_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6matrix_4size_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6matrix_trace(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6matrix_5trace_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6matrix_determinant(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6matrix_11determinant_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6matrix_inverse(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6matrix_7inverse_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6matrix_transpose(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6matrix_9transpose_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6matrix_adjugate(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6matrix_8adjugate_1__get__(o);
}

static PyMethodDef __pyx_methods_3cgl_matrix[] = {
  {"load_array", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6matrix_5load_array, METH_VARARGS|METH_KEYWORDS, 0},
  {"scaled", (PyCFunction)__pyx_pw_3cgl_6matrix_13scaled, METH_O, 0},
  {"scale", (PyCFunction)__pyx_pw_3cgl_6matrix_15scale, METH_O, 0},
  {"calc_transpose", (PyCFunction)__pyx_pw_3cgl_6matrix_17calc_transpose, METH_NOARGS, 0},
  {"transpose_inplace", (PyCFunction)__pyx_pw_3cgl_6matrix_19transpose_inplace, METH_NOARGS, 0},
  {"load_identity", (PyCFunction)__pyx_pw_3cgl_6matrix_21load_identity, METH_NOARGS, 0},
  {"set_row", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6matrix_31set_row, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_row", (PyCFunction)__pyx_pw_3cgl_6matrix_35get_row, METH_O, 0},
  {"set_column", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6matrix_37set_column, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_column", (PyCFunction)__pyx_pw_3cgl_6matrix_39get_column, METH_O, 0},
  {"is_square", (PyCFunction)__pyx_pw_3cgl_6matrix_41is_square, METH_NOARGS, 0},
  {"is_symmetric", (PyCFunction)__pyx_pw_3cgl_6matrix_43is_symmetric, METH_NOARGS, 0},
  {"is_ortho", (PyCFunction)__pyx_pw_3cgl_6matrix_45is_ortho, METH_NOARGS, 0},
  {"is_identity", (PyCFunction)__pyx_pw_3cgl_6matrix_47is_identity, METH_NOARGS, 0},
  {"is_zero", (PyCFunction)__pyx_pw_3cgl_6matrix_49is_zero, METH_NOARGS, 0},
  {"calc_inverse", (PyCFunction)__pyx_pw_3cgl_6matrix_51calc_inverse, METH_NOARGS, 0},
  {"clone", (PyCFunction)__pyx_pw_3cgl_6matrix_53clone, METH_NOARGS, 0},
  {"print_mat", (PyCFunction)__pyx_pw_3cgl_6matrix_55print_mat, METH_NOARGS, 0},
  {"gaus_jordan", (PyCFunction)__pyx_pw_3cgl_6matrix_57gaus_jordan, METH_NOARGS, 0},
  {"submatrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6matrix_59submatrix, METH_VARARGS|METH_KEYWORDS, 0},
  {"calc_adjugate", (PyCFunction)__pyx_pw_3cgl_6matrix_61calc_adjugate, METH_NOARGS, 0},
  {"make_zero", (PyCFunction)__pyx_pw_3cgl_6matrix_63make_zero, METH_NOARGS, 0},
  {"randomize", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6matrix_65randomize, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_6matrix_67__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_6matrix_69__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_matrix[] = {
  {(char *)"size", __pyx_getprop_3cgl_6matrix_size, 0, (char *)0, 0},
  {(char *)"trace", __pyx_getprop_3cgl_6matrix_trace, 0, (char *)0, 0},
  {(char *)"determinant", __pyx_getprop_3cgl_6matrix_determinant, 0, (char *)0, 0},
  {(char *)"inverse", __pyx_getprop_3cgl_6matrix_inverse, 0, (char *)0, 0},
  {(char *)"transpose", __pyx_getprop_3cgl_6matrix_transpose, 0, (char *)0, 0},
  {(char *)"adjugate", __pyx_getprop_3cgl_6matrix_adjugate, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_matrix = {
  __pyx_pw_3cgl_6matrix_7__add__, /*nb_add*/
  __pyx_pw_3cgl_6matrix_9__sub__, /*nb_subtract*/
  __pyx_pw_3cgl_6matrix_11__mul__, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_divide*/
  #endif
  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*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3 || (CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x03050000)
  0, /*nb_inplace_divide*/
  #endif
  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*/
  0, /*nb_index*/
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_matrix_multiply*/
  #endif
  #if PY_VERSION_HEX >= 0x03050000
  0, /*nb_inplace_matrix_multiply*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_matrix = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_3cgl_matrix, /*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_matrix = {
  0, /*mp_length*/
  __pyx_pw_3cgl_6matrix_23__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_3cgl_matrix, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_3cgl_matrix = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.matrix", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_matrix), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_matrix, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_6matrix_27__repr__, /*tp_repr*/
  &__pyx_tp_as_number_matrix, /*tp_as_number*/
  &__pyx_tp_as_sequence_matrix, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_matrix, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_6matrix_29__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_tp_richcompare_3cgl_matrix, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_matrix, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_matrix, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_6matrix_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_matrix, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_window(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3cgl_window *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3cgl_window *)o);
  p->title = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->key_callback = Py_None; Py_INCREF(Py_None);
  p->mouse_button_callback = Py_None; Py_INCREF(Py_None);
  p->mouse_position_callback = Py_None; Py_INCREF(Py_None);
  p->mouse_scroll_callback = Py_None; Py_INCREF(Py_None);
  p->framebuffer_size_callback = Py_None; Py_INCREF(Py_None);
  p->close_callback = Py_None; Py_INCREF(Py_None);
  p->drag_n_drop_callback = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_3cgl_window(PyObject *o) {
  struct __pyx_obj_3cgl_window *p = (struct __pyx_obj_3cgl_window *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_6window_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->title);
  Py_CLEAR(p->key_callback);
  Py_CLEAR(p->mouse_button_callback);
  Py_CLEAR(p->mouse_position_callback);
  Py_CLEAR(p->mouse_scroll_callback);
  Py_CLEAR(p->framebuffer_size_callback);
  Py_CLEAR(p->close_callback);
  Py_CLEAR(p->drag_n_drop_callback);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_3cgl_window(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_3cgl_window *p = (struct __pyx_obj_3cgl_window *)o;
  if (p->key_callback) {
    e = (*v)(p->key_callback, a); if (e) return e;
  }
  if (p->mouse_button_callback) {
    e = (*v)(p->mouse_button_callback, a); if (e) return e;
  }
  if (p->mouse_position_callback) {
    e = (*v)(p->mouse_position_callback, a); if (e) return e;
  }
  if (p->mouse_scroll_callback) {
    e = (*v)(p->mouse_scroll_callback, a); if (e) return e;
  }
  if (p->framebuffer_size_callback) {
    e = (*v)(p->framebuffer_size_callback, a); if (e) return e;
  }
  if (p->close_callback) {
    e = (*v)(p->close_callback, a); if (e) return e;
  }
  if (p->drag_n_drop_callback) {
    e = (*v)(p->drag_n_drop_callback, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_3cgl_window(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3cgl_window *p = (struct __pyx_obj_3cgl_window *)o;
  tmp = ((PyObject*)p->key_callback);
  p->key_callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->mouse_button_callback);
  p->mouse_button_callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->mouse_position_callback);
  p->mouse_position_callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->mouse_scroll_callback);
  p->mouse_scroll_callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->framebuffer_size_callback);
  p->framebuffer_size_callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->close_callback);
  p->close_callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->drag_n_drop_callback);
  p->drag_n_drop_callback = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_3cgl_6window_close_callback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_14close_callback_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6window_key_callback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_12key_callback_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6window_mouse_button_callback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_21mouse_button_callback_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6window_mouse_position_callback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_23mouse_position_callback_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6window_mouse_scroll_callback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_21mouse_scroll_callback_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6window_framebuffer_size_callback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_25framebuffer_size_callback_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6window_drag_n_drop_callback(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_20drag_n_drop_callback_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6window_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_5width_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6window_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_6height_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6window_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_1x_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_6window_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6window_1y_1__get__(o);
}

static PyMethodDef __pyx_methods_3cgl_window[] = {
  {"destroy", (PyCFunction)__pyx_pw_3cgl_6window_7destroy, METH_NOARGS, 0},
  {"get_id", (PyCFunction)__pyx_pw_3cgl_6window_9get_id, METH_NOARGS, 0},
  {"poll_events", (PyCFunction)__pyx_pw_3cgl_6window_11poll_events, METH_NOARGS, 0},
  {"should_close", (PyCFunction)__pyx_pw_3cgl_6window_13should_close, METH_NOARGS, 0},
  {"swap_buffers", (PyCFunction)__pyx_pw_3cgl_6window_15swap_buffers, METH_NOARGS, 0},
  {"set_title", (PyCFunction)__pyx_pw_3cgl_6window_17set_title, METH_O, 0},
  {"set_size", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6window_19set_size, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_position", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6window_21set_position, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_hidden", (PyCFunction)__pyx_pw_3cgl_6window_23set_hidden, METH_O, 0},
  {"set_user_data", (PyCFunction)__pyx_pw_3cgl_6window_25set_user_data, METH_O, 0},
  {"get_user_data", (PyCFunction)__pyx_pw_3cgl_6window_27get_user_data, METH_NOARGS, 0},
  {"get_size", (PyCFunction)__pyx_pw_3cgl_6window_29get_size, METH_NOARGS, 0},
  {"set_close_callback", (PyCFunction)__pyx_pw_3cgl_6window_31set_close_callback, METH_O, 0},
  {"set_key_callback", (PyCFunction)__pyx_pw_3cgl_6window_33set_key_callback, METH_O, 0},
  {"set_mouse_button_callback", (PyCFunction)__pyx_pw_3cgl_6window_35set_mouse_button_callback, METH_O, 0},
  {"set_mouse_position_callback", (PyCFunction)__pyx_pw_3cgl_6window_37set_mouse_position_callback, METH_O, 0},
  {"set_mouse_scroll_callback", (PyCFunction)__pyx_pw_3cgl_6window_39set_mouse_scroll_callback, METH_O, 0},
  {"set_framebuffer_size_callback", (PyCFunction)__pyx_pw_3cgl_6window_41set_framebuffer_size_callback, METH_O, 0},
  {"set_drag_n_drop_callback", (PyCFunction)__pyx_pw_3cgl_6window_43set_drag_n_drop_callback, METH_O, 0},
  {"get_position", (PyCFunction)__pyx_pw_3cgl_6window_45get_position, METH_NOARGS, 0},
  {"get_framebuffer_size", (PyCFunction)__pyx_pw_3cgl_6window_47get_framebuffer_size, METH_NOARGS, 0},
  {"resecure_callbaks", (PyCFunction)__pyx_pw_3cgl_6window_49resecure_callbaks, METH_NOARGS, 0},
  {"make_context_current", (PyCFunction)__pyx_pw_3cgl_6window_51make_context_current, METH_NOARGS, 0},
  {"get_glfw_handle", (PyCFunction)__pyx_pw_3cgl_6window_53get_glfw_handle, METH_NOARGS, 0},
  {"get_key", (PyCFunction)__pyx_pw_3cgl_6window_55get_key, METH_O, 0},
  {"is_key_pressed", (PyCFunction)__pyx_pw_3cgl_6window_57is_key_pressed, METH_O, 0},
  {"get_mouse_button", (PyCFunction)__pyx_pw_3cgl_6window_59get_mouse_button, METH_O, 0},
  {"get_cursor_pos", (PyCFunction)__pyx_pw_3cgl_6window_61get_cursor_pos, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_6window_67__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_6window_69__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_window[] = {
  {(char *)"close_callback", __pyx_getprop_3cgl_6window_close_callback, 0, (char *)0, 0},
  {(char *)"key_callback", __pyx_getprop_3cgl_6window_key_callback, 0, (char *)0, 0},
  {(char *)"mouse_button_callback", __pyx_getprop_3cgl_6window_mouse_button_callback, 0, (char *)0, 0},
  {(char *)"mouse_position_callback", __pyx_getprop_3cgl_6window_mouse_position_callback, 0, (char *)0, 0},
  {(char *)"mouse_scroll_callback", __pyx_getprop_3cgl_6window_mouse_scroll_callback, 0, (char *)0, 0},
  {(char *)"framebuffer_size_callback", __pyx_getprop_3cgl_6window_framebuffer_size_callback, 0, (char *)0, 0},
  {(char *)"drag_n_drop_callback", __pyx_getprop_3cgl_6window_drag_n_drop_callback, 0, (char *)0, 0},
  {(char *)"width", __pyx_getprop_3cgl_6window_width, 0, (char *)0, 0},
  {(char *)"height", __pyx_getprop_3cgl_6window_height, 0, (char *)0, 0},
  {(char *)"x", __pyx_getprop_3cgl_6window_x, 0, (char *)0, 0},
  {(char *)"y", __pyx_getprop_3cgl_6window_y, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_window = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.window", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_window), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_window, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_6window_63__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_6window_5__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_6window_65__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_3cgl_window, /*tp_traverse*/
  __pyx_tp_clear_3cgl_window, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_window, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_window, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_6window_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_window, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_image(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3cgl_image *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3cgl_image *)o);
  p->image_data = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_3cgl_image(PyObject *o) {
  struct __pyx_obj_3cgl_image *p = (struct __pyx_obj_3cgl_image *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->image_data);
  (*Py_TYPE(o)->tp_free)(o);
}

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

static int __pyx_tp_clear_3cgl_image(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3cgl_image *p = (struct __pyx_obj_3cgl_image *)o;
  tmp = ((PyObject*)p->image_data);
  p->image_data = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_3cgl_5image_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5image_5width_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_5image_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5image_6height_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_5image_channels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5image_8channels_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_5image_data(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5image_4data_1__get__(o);
}

static PyMethodDef __pyx_methods_3cgl_image[] = {
  {"load_image", (PyCFunction)__pyx_pw_3cgl_5image_9load_image, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_5image_11__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_5image_13__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_image[] = {
  {(char *)"width", __pyx_getprop_3cgl_5image_width, 0, (char *)0, 0},
  {(char *)"height", __pyx_getprop_3cgl_5image_height, 0, (char *)0, 0},
  {(char *)"channels", __pyx_getprop_3cgl_5image_channels, 0, (char *)0, 0},
  {(char *)"data", __pyx_getprop_3cgl_5image_data, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_image = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.image", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_image), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_image, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_5image_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_5image_3__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_5image_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_3cgl_image, /*tp_traverse*/
  __pyx_tp_clear_3cgl_image, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_image, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_image, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_5image_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_image, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_mesh_vertex(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_mesh_vertex(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3cgl_11mesh_vertex_position(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_11mesh_vertex_8position_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_11mesh_vertex_normal(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_11mesh_vertex_6normal_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_11mesh_vertex_texture_coordinates(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_11mesh_vertex_19texture_coordinates_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_11mesh_vertex_bone_wieghts(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_11mesh_vertex_12bone_wieghts_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_11mesh_vertex_bone_ids(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_11mesh_vertex_8bone_ids_1__get__(o);
}

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

static PyMethodDef __pyx_methods_3cgl_mesh_vertex[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_11mesh_vertex_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_11mesh_vertex_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_mesh_vertex[] = {
  {(char *)"position", __pyx_getprop_3cgl_11mesh_vertex_position, __pyx_setprop_3cgl_11mesh_vertex_position, (char *)0, 0},
  {(char *)"normal", __pyx_getprop_3cgl_11mesh_vertex_normal, __pyx_setprop_3cgl_11mesh_vertex_normal, (char *)0, 0},
  {(char *)"texture_coordinates", __pyx_getprop_3cgl_11mesh_vertex_texture_coordinates, __pyx_setprop_3cgl_11mesh_vertex_texture_coordinates, (char *)0, 0},
  {(char *)"bone_wieghts", __pyx_getprop_3cgl_11mesh_vertex_bone_wieghts, __pyx_setprop_3cgl_11mesh_vertex_bone_wieghts, (char *)0, 0},
  {(char *)"bone_ids", __pyx_getprop_3cgl_11mesh_vertex_bone_ids, __pyx_setprop_3cgl_11mesh_vertex_bone_ids, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_mesh_vertex = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.mesh_vertex", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_mesh_vertex), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_mesh_vertex, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_11mesh_vertex_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_11mesh_vertex_3__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_11mesh_vertex_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_mesh_vertex, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_mesh_vertex, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_11mesh_vertex_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_mesh_vertex, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_3cgl_mesh_cpu __pyx_vtable_3cgl_mesh_cpu;

static PyObject *__pyx_tp_new_3cgl_mesh_cpu(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3cgl_mesh_cpu *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3cgl_mesh_cpu *)o);
  p->__pyx_vtab = __pyx_vtabptr_3cgl_mesh_cpu;
  return o;
}

static void __pyx_tp_dealloc_3cgl_mesh_cpu(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_8mesh_cpu_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3cgl_8mesh_cpu_index_count(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_8mesh_cpu_11index_count_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_8mesh_cpu_index_count_used(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_8mesh_cpu_16index_count_used_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_8mesh_cpu_indices(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_8mesh_cpu_7indices_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_8mesh_cpu_vertex_count(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_8mesh_cpu_12vertex_count_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_8mesh_cpu_vertex_count_used(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_8mesh_cpu_17vertex_count_used_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_8mesh_cpu_vertices(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_8mesh_cpu_8vertices_1__get__(o);
}

static PyMethodDef __pyx_methods_3cgl_mesh_cpu[] = {
  {"destroy", (PyCFunction)__pyx_pw_3cgl_8mesh_cpu_11destroy, METH_NOARGS, 0},
  {"recalculate_normals", (PyCFunction)__pyx_pw_3cgl_8mesh_cpu_13recalculate_normals, METH_NOARGS, 0},
  {"load_obj", (PyCFunction)__pyx_pw_3cgl_8mesh_cpu_15load_obj, METH_O, 0},
  {"add_mesh", (PyCFunction)__pyx_pw_3cgl_8mesh_cpu_17add_mesh, METH_O, 0},
  {"add_cube", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_8mesh_cpu_19add_cube, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_triangle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_8mesh_cpu_21add_triangle, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_quad", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_8mesh_cpu_23add_quad, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_sphere", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_8mesh_cpu_25add_sphere, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_cylinder", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_8mesh_cpu_27add_cylinder, METH_VARARGS|METH_KEYWORDS, 0},
  {"offset_vetices", (PyCFunction)__pyx_pw_3cgl_8mesh_cpu_29offset_vetices, METH_O, 0},
  {"scale_vertices", (PyCFunction)__pyx_pw_3cgl_8mesh_cpu_31scale_vertices, METH_O, 0},
  {"transform_vertices", (PyCFunction)__pyx_pw_3cgl_8mesh_cpu_33transform_vertices, METH_O, 0},
  {"get_c_initialization_code", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_8mesh_cpu_35get_c_initialization_code, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_8mesh_cpu_37__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_8mesh_cpu_39__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_mesh_cpu[] = {
  {(char *)"index_count", __pyx_getprop_3cgl_8mesh_cpu_index_count, 0, (char *)0, 0},
  {(char *)"index_count_used", __pyx_getprop_3cgl_8mesh_cpu_index_count_used, 0, (char *)0, 0},
  {(char *)"indices", __pyx_getprop_3cgl_8mesh_cpu_indices, __pyx_setprop_3cgl_8mesh_cpu_indices, (char *)0, 0},
  {(char *)"vertex_count", __pyx_getprop_3cgl_8mesh_cpu_vertex_count, 0, (char *)0, 0},
  {(char *)"vertex_count_used", __pyx_getprop_3cgl_8mesh_cpu_vertex_count_used, 0, (char *)0, 0},
  {(char *)"vertices", __pyx_getprop_3cgl_8mesh_cpu_vertices, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_mesh_cpu = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.mesh_cpu", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_mesh_cpu), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_mesh_cpu, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_8mesh_cpu_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_8mesh_cpu_5__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_8mesh_cpu_9__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_mesh_cpu, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_mesh_cpu, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_8mesh_cpu_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_mesh_cpu, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_3cgl_texture __pyx_vtable_3cgl_texture;

static PyObject *__pyx_tp_new_3cgl_texture(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3cgl_texture *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3cgl_texture *)o);
  p->__pyx_vtab = __pyx_vtabptr_3cgl_texture;
  return o;
}

static void __pyx_tp_dealloc_3cgl_texture(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_7texture_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_tp_richcompare_3cgl_texture(PyObject *o1, PyObject *o2, int op) {
  switch (op) {
    case Py_EQ: {
      return __pyx_pw_3cgl_7texture_9__eq__(o1, o2);
    }
    case Py_NE: {
      PyObject *ret;
      ret = __pyx_pw_3cgl_7texture_9__eq__(o1, o2);
      if (likely(ret && ret != Py_NotImplemented)) {
        int b = __Pyx_PyObject_IsTrue(ret); Py_DECREF(ret);
        if (unlikely(b < 0)) return NULL;
        ret = (b) ? Py_False : Py_True;
        Py_INCREF(ret);
      }
      return ret;
    }
    default: {
      return __Pyx_NewRef(Py_NotImplemented);
    }
  }
}

static PyObject *__pyx_getprop_3cgl_7texture_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_7texture_5width_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_7texture_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_7texture_6height_1__get__(o);
}

static PyMethodDef __pyx_methods_3cgl_texture[] = {
  {"destroy", (PyCFunction)__pyx_pw_3cgl_7texture_13destroy, METH_NOARGS, 0},
  {"load_image", (PyCFunction)__pyx_pw_3cgl_7texture_15load_image, METH_O, 0},
  {"bind", (PyCFunction)__pyx_pw_3cgl_7texture_17bind, METH_O, 0},
  {"cubemap_set_face", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7texture_19cubemap_set_face, METH_VARARGS|METH_KEYWORDS, 0},
  {"array_set_layer_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7texture_21array_set_layer_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_data", (PyCFunction)__pyx_pw_3cgl_7texture_23set_data, METH_O, 0},
  {"set_sub_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7texture_25set_sub_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_pixel_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7texture_27set_pixel_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_user_data", (PyCFunction)__pyx_pw_3cgl_7texture_29set_user_data, METH_O, 0},
  {"get_user_data", (PyCFunction)__pyx_pw_3cgl_7texture_31get_user_data, METH_NOARGS, 0},
  {"get_internal_handle", (PyCFunction)__pyx_pw_3cgl_7texture_33get_internal_handle, METH_NOARGS, 0},
  {"get_size", (PyCFunction)__pyx_pw_3cgl_7texture_35get_size, METH_NOARGS, 0},
  {"set_scaling_method", (PyCFunction)__pyx_pw_3cgl_7texture_37set_scaling_method, METH_O, 0},
  {"set_wrapping_method", (PyCFunction)__pyx_pw_3cgl_7texture_39set_wrapping_method, METH_O, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_7texture_41__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_7texture_43__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_texture[] = {
  {(char *)"width", __pyx_getprop_3cgl_7texture_width, 0, (char *)0, 0},
  {(char *)"height", __pyx_getprop_3cgl_7texture_height, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_texture = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.texture", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_texture), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_texture, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_7texture_7__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_7texture_5__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_7texture_11__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  __pyx_tp_richcompare_3cgl_texture, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_texture, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_texture, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_7texture_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_texture, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_3cgl_framebuffer __pyx_vtable_3cgl_framebuffer;

static PyObject *__pyx_tp_new_3cgl_framebuffer(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3cgl_framebuffer *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3cgl_framebuffer *)o);
  p->__pyx_vtab = __pyx_vtabptr_3cgl_framebuffer;
  return o;
}

static void __pyx_tp_dealloc_3cgl_framebuffer(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_11framebuffer_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_3cgl_framebuffer[] = {
  {"destroy", (PyCFunction)__pyx_pw_3cgl_11framebuffer_11destroy, METH_NOARGS, 0},
  {"get_id", (PyCFunction)__pyx_pw_3cgl_11framebuffer_13get_id, METH_NOARGS, 0},
  {"add_color_attachment", (PyCFunction)__pyx_pw_3cgl_11framebuffer_15add_color_attachment, METH_O, 0},
  {"get_color_attacment", (PyCFunction)__pyx_pw_3cgl_11framebuffer_17get_color_attacment, METH_O, 0},
  {"bind", (PyCFunction)__pyx_pw_3cgl_11framebuffer_19bind, METH_NOARGS, 0},
  {"set_user_data", (PyCFunction)__pyx_pw_3cgl_11framebuffer_21set_user_data, METH_O, 0},
  {"get_user_data", (PyCFunction)__pyx_pw_3cgl_11framebuffer_23get_user_data, METH_NOARGS, 0},
  {"read_pixels", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_11framebuffer_25read_pixels, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_mouse_pick_id", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_11framebuffer_27get_mouse_pick_id, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_color_texture", (PyCFunction)__pyx_pw_3cgl_11framebuffer_29get_color_texture, METH_NOARGS, 0},
  {"get_depth_texture", (PyCFunction)__pyx_pw_3cgl_11framebuffer_31get_depth_texture, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_11framebuffer_33__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_11framebuffer_35__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_framebuffer = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.framebuffer", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_framebuffer), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_framebuffer, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_11framebuffer_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_11framebuffer_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_11framebuffer_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_framebuffer, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_11framebuffer_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_framebuffer, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_3cgl_mesh_gpu __pyx_vtable_3cgl_mesh_gpu;

static PyObject *__pyx_tp_new_3cgl_mesh_gpu(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3cgl_mesh_gpu *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3cgl_mesh_gpu *)o);
  p->__pyx_vtab = __pyx_vtabptr_3cgl_mesh_gpu;
  p->name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_3cgl_mesh_gpu(PyObject *o) {
  struct __pyx_obj_3cgl_mesh_gpu *p = (struct __pyx_obj_3cgl_mesh_gpu *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_8mesh_gpu_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->name);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3cgl_8mesh_gpu_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_8mesh_gpu_4name_1__get__(o);
}

static PyMethodDef __pyx_methods_3cgl_mesh_gpu[] = {
  {"destroy", (PyCFunction)__pyx_pw_3cgl_8mesh_gpu_11destroy, METH_NOARGS, 0},
  {"get_id", (PyCFunction)__pyx_pw_3cgl_8mesh_gpu_13get_id, METH_NOARGS, 0},
  {"render", (PyCFunction)__pyx_pw_3cgl_8mesh_gpu_15render, METH_NOARGS, 0},
  {"render_instanced", (PyCFunction)__pyx_pw_3cgl_8mesh_gpu_17render_instanced, METH_O, 0},
  {"set_user_data", (PyCFunction)__pyx_pw_3cgl_8mesh_gpu_19set_user_data, METH_O, 0},
  {"get_user_data", (PyCFunction)__pyx_pw_3cgl_8mesh_gpu_21get_user_data, METH_NOARGS, 0},
  {"upload_mesh_cpu", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_8mesh_gpu_23upload_mesh_cpu, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_8mesh_gpu_25__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_8mesh_gpu_27__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_mesh_gpu[] = {
  {(char *)"name", __pyx_getprop_3cgl_8mesh_gpu_name, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_mesh_gpu = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.mesh_gpu", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_mesh_gpu), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_mesh_gpu, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_8mesh_gpu_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_8mesh_gpu_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_8mesh_gpu_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_mesh_gpu, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_mesh_gpu, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_8mesh_gpu_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_mesh_gpu, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};
static struct __pyx_vtabstruct_3cgl_shader __pyx_vtable_3cgl_shader;

static PyObject *__pyx_tp_new_3cgl_shader(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3cgl_shader *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3cgl_shader *)o);
  p->__pyx_vtab = __pyx_vtabptr_3cgl_shader;
  p->name = ((PyObject*)Py_None); Py_INCREF(Py_None);
  p->uniform_map = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_3cgl_shader(PyObject *o) {
  struct __pyx_obj_3cgl_shader *p = (struct __pyx_obj_3cgl_shader *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_6shader_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->name);
  Py_CLEAR(p->uniform_map);
  (*Py_TYPE(o)->tp_free)(o);
}

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

static int __pyx_tp_clear_3cgl_shader(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_3cgl_shader *p = (struct __pyx_obj_3cgl_shader *)o;
  tmp = ((PyObject*)p->uniform_map);
  p->uniform_map = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_3cgl_6shader_name(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_6shader_4name_1__get__(o);
}

static PyMethodDef __pyx_methods_3cgl_shader[] = {
  {"destroy", (PyCFunction)__pyx_pw_3cgl_6shader_11destroy, METH_NOARGS, 0},
  {"get_id", (PyCFunction)__pyx_pw_3cgl_6shader_13get_id, METH_NOARGS, 0},
  {"set_user_data", (PyCFunction)__pyx_pw_3cgl_6shader_15set_user_data, METH_O, 0},
  {"get_user_data", (PyCFunction)__pyx_pw_3cgl_6shader_17get_user_data, METH_NOARGS, 0},
  {"load_from_file", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_19load_from_file, METH_VARARGS|METH_KEYWORDS, 0},
  {"load", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_21load, METH_VARARGS|METH_KEYWORDS, 0},
  {"load_compute_from_file", (PyCFunction)__pyx_pw_3cgl_6shader_23load_compute_from_file, METH_O, 0},
  {"load_compute", (PyCFunction)__pyx_pw_3cgl_6shader_25load_compute, METH_O, 0},
  {"bind", (PyCFunction)__pyx_pw_3cgl_6shader_27bind, METH_NOARGS, 0},
  {"get_uniform_location", (PyCFunction)__pyx_pw_3cgl_6shader_29get_uniform_location, METH_O, 0},
  {"set_uniform_mat4", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_31set_uniform_mat4, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_vec4", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_33set_uniform_vec4, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_vec3", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_35set_uniform_vec3, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_vec2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_37set_uniform_vec2, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_float", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_39set_uniform_float, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_int", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_41set_uniform_int, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_bool", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_43set_uniform_bool, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_doublt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_45set_uniform_doublt, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_vec2v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_47set_uniform_vec2v, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_vec3v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_49set_uniform_vec3v, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_vec4v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_51set_uniform_vec4v, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_ivec2v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_53set_uniform_ivec2v, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_ivec3v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_55set_uniform_ivec3v, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_uniform_ivec4v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_57set_uniform_ivec4v, METH_VARARGS|METH_KEYWORDS, 0},
  {"compute_dispatch", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_6shader_59compute_dispatch, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_6shader_61__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_6shader_63__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_shader[] = {
  {(char *)"name", __pyx_getprop_3cgl_6shader_name, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_shader = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.shader", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_shader), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_shader, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_6shader_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_6shader_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_6shader_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_3cgl_shader, /*tp_traverse*/
  __pyx_tp_clear_3cgl_shader, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_shader, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_shader, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_6shader_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_shader, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_ssbo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_ssbo(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_4ssbo_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3cgl_4ssbo_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_4ssbo_4size_1__get__(o);
}

static PyMethodDef __pyx_methods_3cgl_ssbo[] = {
  {"bind", (PyCFunction)__pyx_pw_3cgl_4ssbo_11bind, METH_NOARGS, 0},
  {"bind_base", (PyCFunction)__pyx_pw_3cgl_4ssbo_13bind_base, METH_O, 0},
  {"set_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_4ssbo_15set_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_sub_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_4ssbo_17set_sub_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_4ssbo_19get_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_sub_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_4ssbo_21get_sub_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_size", (PyCFunction)__pyx_pw_3cgl_4ssbo_23get_size, METH_NOARGS, 0},
  {"set_user_data", (PyCFunction)__pyx_pw_3cgl_4ssbo_25set_user_data, METH_O, 0},
  {"get_user_data", (PyCFunction)__pyx_pw_3cgl_4ssbo_27get_user_data, METH_NOARGS, 0},
  {"get_id", (PyCFunction)__pyx_pw_3cgl_4ssbo_29get_id, METH_NOARGS, 0},
  {"destroy", (PyCFunction)__pyx_pw_3cgl_4ssbo_31destroy, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_4ssbo_33__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_4ssbo_35__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_ssbo[] = {
  {(char *)"size", __pyx_getprop_3cgl_4ssbo_size, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_ssbo = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.ssbo", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_ssbo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_ssbo, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_4ssbo_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_4ssbo_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_4ssbo_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_ssbo, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_ssbo, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_4ssbo_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_ssbo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_ubo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_ubo(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_3ubo_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3cgl_3ubo_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_3ubo_4size_1__get__(o);
}

static PyMethodDef __pyx_methods_3cgl_ubo[] = {
  {"destroy", (PyCFunction)__pyx_pw_3cgl_3ubo_11destroy, METH_NOARGS, 0},
  {"bind", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_3ubo_13bind, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_3ubo_15set_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_sub_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_3ubo_17set_sub_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_3ubo_19get_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_sub_data", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_3ubo_21get_sub_data, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_size", (PyCFunction)__pyx_pw_3cgl_3ubo_23get_size, METH_NOARGS, 0},
  {"set_user_data", (PyCFunction)__pyx_pw_3cgl_3ubo_25set_user_data, METH_O, 0},
  {"get_user_data", (PyCFunction)__pyx_pw_3cgl_3ubo_27get_user_data, METH_NOARGS, 0},
  {"get_id", (PyCFunction)__pyx_pw_3cgl_3ubo_29get_id, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_3ubo_31__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_3ubo_33__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_ubo[] = {
  {(char *)"size", __pyx_getprop_3cgl_3ubo_size, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_ubo = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.ubo", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_ubo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_ubo, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_3ubo_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_3ubo_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_3ubo_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_ubo, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_ubo, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_3ubo_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_ubo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_shape(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_shape(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_5shape_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_3cgl_shape(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_3cgl_shape(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_3cgl_5shape_11__setitem__(o, i, v);
  }
  else {
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_getprop_3cgl_5shape_vertices_count(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5shape_14vertices_count_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_5shape_vertices(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5shape_8vertices_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_5shape_position(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5shape_8position_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_5shape_rotation(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5shape_8rotation_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_5shape_scale(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5shape_5scale_1__get__(o);
}

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

static PyMethodDef __pyx_methods_3cgl_shape[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_5shape_15__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_5shape_17__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_shape[] = {
  {(char *)"vertices_count", __pyx_getprop_3cgl_5shape_vertices_count, 0, (char *)0, 0},
  {(char *)"vertices", __pyx_getprop_3cgl_5shape_vertices, 0, (char *)0, 0},
  {(char *)"position", __pyx_getprop_3cgl_5shape_position, __pyx_setprop_3cgl_5shape_position, (char *)0, 0},
  {(char *)"rotation", __pyx_getprop_3cgl_5shape_rotation, __pyx_setprop_3cgl_5shape_rotation, (char *)0, 0},
  {(char *)"scale", __pyx_getprop_3cgl_5shape_scale, __pyx_setprop_3cgl_5shape_scale, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_shape = {
  __pyx_pw_3cgl_5shape_13__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_3cgl_shape, /*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_shape = {
  __pyx_pw_3cgl_5shape_13__len__, /*mp_length*/
  __pyx_pw_3cgl_5shape_9__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_3cgl_shape, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_3cgl_shape = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.shape", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_shape), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_shape, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_5shape_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_shape, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_shape, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_5shape_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_shape, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_shape, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_5shape_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_shape, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_bloom(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_bloom(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_5bloom_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3cgl_5bloom_width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5bloom_5width_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_5bloom_height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5bloom_6height_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_5bloom_iterations(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5bloom_10iterations_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_5bloom_threshold(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5bloom_9threshold_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_5bloom_knee(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_5bloom_4knee_1__get__(o);
}

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

static PyMethodDef __pyx_methods_3cgl_bloom[] = {
  {"set_threshold", (PyCFunction)__pyx_pw_3cgl_5bloom_11set_threshold, METH_O, 0},
  {"get_threshold", (PyCFunction)__pyx_pw_3cgl_5bloom_13get_threshold, METH_NOARGS, 0},
  {"set_knee", (PyCFunction)__pyx_pw_3cgl_5bloom_15set_knee, METH_O, 0},
  {"get_knee", (PyCFunction)__pyx_pw_3cgl_5bloom_17get_knee, METH_NOARGS, 0},
  {"set_offset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_5bloom_19set_offset, METH_VARARGS|METH_KEYWORDS, 0},
  {"apply", (PyCFunction)__pyx_pw_3cgl_5bloom_21apply, METH_O, 0},
  {"apply2", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_5bloom_23apply2, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_lod_texture", (PyCFunction)__pyx_pw_3cgl_5bloom_25get_lod_texture, METH_O, 0},
  {"get_prefiltered_texture", (PyCFunction)__pyx_pw_3cgl_5bloom_27get_prefiltered_texture, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_5bloom_29__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_5bloom_31__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_bloom[] = {
  {(char *)"width", __pyx_getprop_3cgl_5bloom_width, 0, (char *)0, 0},
  {(char *)"height", __pyx_getprop_3cgl_5bloom_height, 0, (char *)0, 0},
  {(char *)"iterations", __pyx_getprop_3cgl_5bloom_iterations, 0, (char *)0, 0},
  {(char *)"threshold", __pyx_getprop_3cgl_5bloom_threshold, __pyx_setprop_3cgl_5bloom_threshold, (char *)0, 0},
  {(char *)"knee", __pyx_getprop_3cgl_5bloom_knee, __pyx_setprop_3cgl_5bloom_knee, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_bloom = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.bloom", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_bloom), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_bloom, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_5bloom_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_5bloom_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_5bloom_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_bloom, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_bloom, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_5bloom_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_bloom, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_tilemap(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_tilemap(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_7tilemap_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3cgl_7tilemap_tile_count_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_7tilemap_12tile_count_x_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_7tilemap_tile_count_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_7tilemap_12tile_count_y_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_7tilemap_tile_size_x(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_7tilemap_11tile_size_x_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_7tilemap_tile_size_y(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_7tilemap_11tile_size_y_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_7tilemap_ssbo_binding(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_7tilemap_12ssbo_binding_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_7tilemap_auto_upload(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_7tilemap_11auto_upload_1__get__(o);
}

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

static PyMethodDef __pyx_methods_3cgl_tilemap[] = {
  {"set_auto_upload", (PyCFunction)__pyx_pw_3cgl_7tilemap_11set_auto_upload, METH_O, 0},
  {"get_auto_upload", (PyCFunction)__pyx_pw_3cgl_7tilemap_13get_auto_upload, METH_NOARGS, 0},
  {"upload", (PyCFunction)__pyx_pw_3cgl_7tilemap_15upload, METH_NOARGS, 0},
  {"set_tile_color", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7tilemap_17set_tile_color, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_tile_texture_from_array", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7tilemap_19set_tile_texture_from_array, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_tile_texture_from_tileset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7tilemap_21set_tile_texture_from_tileset, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_all_tile_color", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7tilemap_23set_all_tile_color, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_all_tile_texture_from_array", (PyCFunction)__pyx_pw_3cgl_7tilemap_25set_all_tile_texture_from_array, METH_O, 0},
  {"set_all_tile_texture_from_tileset", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7tilemap_27set_all_tile_texture_from_tileset, METH_VARARGS|METH_KEYWORDS, 0},
  {"clear_tile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7tilemap_29clear_tile, METH_VARARGS|METH_KEYWORDS, 0},
  {"clear_all_tile", (PyCFunction)__pyx_pw_3cgl_7tilemap_31clear_all_tile, METH_NOARGS, 0},
  {"render", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7tilemap_33render, METH_VARARGS|METH_KEYWORDS, 0},
  {"reset", (PyCFunction)__pyx_pw_3cgl_7tilemap_35reset, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_7tilemap_37__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_7tilemap_39__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_tilemap[] = {
  {(char *)"tile_count_x", __pyx_getprop_3cgl_7tilemap_tile_count_x, 0, (char *)0, 0},
  {(char *)"tile_count_y", __pyx_getprop_3cgl_7tilemap_tile_count_y, 0, (char *)0, 0},
  {(char *)"tile_size_x", __pyx_getprop_3cgl_7tilemap_tile_size_x, 0, (char *)0, 0},
  {(char *)"tile_size_y", __pyx_getprop_3cgl_7tilemap_tile_size_y, 0, (char *)0, 0},
  {(char *)"ssbo_binding", __pyx_getprop_3cgl_7tilemap_ssbo_binding, 0, (char *)0, 0},
  {(char *)"auto_upload", __pyx_getprop_3cgl_7tilemap_auto_upload, __pyx_setprop_3cgl_7tilemap_auto_upload, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_tilemap = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.tilemap", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_tilemap), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_tilemap, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_7tilemap_5__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_7tilemap_9__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_7tilemap_7__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_tilemap, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_tilemap, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_7tilemap_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_tilemap, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_font_character(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_font_character(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3cgl_14font_character_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_14font_character_4size_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_14font_character_bearing(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_14font_character_7bearing_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_14font_character_advance(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_14font_character_7advance_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_14font_character_normalized_size(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_14font_character_15normalized_size_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_14font_character_normalized_offset(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_14font_character_17normalized_offset_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_14font_character_bearing_normalized(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_14font_character_18bearing_normalized_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_14font_character_advance_normalized(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_14font_character_18advance_normalized_1__get__(o);
}

static PyObject *__pyx_getprop_3cgl_14font_character_character(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_14font_character_9character_1__get__(o);
}

static PyMethodDef __pyx_methods_3cgl_font_character[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_14font_character_9__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_14font_character_11__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_font_character[] = {
  {(char *)"size", __pyx_getprop_3cgl_14font_character_size, 0, (char *)0, 0},
  {(char *)"bearing", __pyx_getprop_3cgl_14font_character_bearing, 0, (char *)0, 0},
  {(char *)"advance", __pyx_getprop_3cgl_14font_character_advance, 0, (char *)0, 0},
  {(char *)"normalized_size", __pyx_getprop_3cgl_14font_character_normalized_size, 0, (char *)0, 0},
  {(char *)"normalized_offset", __pyx_getprop_3cgl_14font_character_normalized_offset, 0, (char *)0, 0},
  {(char *)"bearing_normalized", __pyx_getprop_3cgl_14font_character_bearing_normalized, 0, (char *)0, 0},
  {(char *)"advance_normalized", __pyx_getprop_3cgl_14font_character_advance_normalized, 0, (char *)0, 0},
  {(char *)"character", __pyx_getprop_3cgl_14font_character_character, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_font_character = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.font_character", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_font_character), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_font_character, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_14font_character_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  __pyx_pw_3cgl_14font_character_7__hash__, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_14font_character_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_font_character, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_font_character, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_14font_character_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_font_character, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_font(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_3cgl_font *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_3cgl_font *)o);
  p->meta_data = ((PyObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_3cgl_font(PyObject *o) {
  struct __pyx_obj_3cgl_font *p = (struct __pyx_obj_3cgl_font *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
    __pyx_pw_3cgl_4font_3__dealloc__(o);
    __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
    PyErr_Restore(etype, eval, etb);
  }
  Py_CLEAR(p->meta_data);
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_3cgl_font[] = {
  {"destroy", (PyCFunction)__pyx_pw_3cgl_4font_5destroy, METH_NOARGS, 0},
  {"load_from_memory", (PyCFunction)__pyx_pw_3cgl_4font_7load_from_memory, METH_O, 0},
  {"load", (PyCFunction)__pyx_pw_3cgl_4font_9load, METH_O, 0},
  {"get_atlas", (PyCFunction)__pyx_pw_3cgl_4font_11get_atlas, METH_NOARGS, 0},
  {"build_atlas", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_4font_13build_atlas, METH_VARARGS|METH_KEYWORDS, 0},
  {"bake_to_texture", (PyCFunction)__pyx_pw_3cgl_4font_15bake_to_texture, METH_O, 0},
  {"get_characters", (PyCFunction)__pyx_pw_3cgl_4font_17get_characters, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_4font_19__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_4font_21__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_font = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.font", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_font), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_font, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_font, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_4font_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_font, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_widgets(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_widgets(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_3cgl_widgets[] = {
  {"create_context", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_3create_context, METH_VARARGS|METH_KEYWORDS, 0},
  {"destroy_context", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_5destroy_context, METH_VARARGS|METH_KEYWORDS, 0},
  {"get_current_context", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_7get_current_context, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_current_context", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_9set_current_context, METH_VARARGS|METH_KEYWORDS, 0},
  {"init", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_11init, METH_VARARGS|METH_KEYWORDS, 0},
  {"shutdown", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_13shutdown, METH_VARARGS|METH_KEYWORDS, 0},
  {"begin", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_15begin, METH_VARARGS|METH_KEYWORDS, 0},
  {"begin_int", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_17begin_int, METH_VARARGS|METH_KEYWORDS, 0},
  {"end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_19end, METH_VARARGS|METH_KEYWORDS, 0},
  {"flush", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_21flush, METH_VARARGS|METH_KEYWORDS, 0},
  {"flush_if_required", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_23flush_if_required, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_vertex", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_25add_vertex, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_mesh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_27add_mesh, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_vertex_p", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_29add_vertex_p, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_vertex_p3f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_31add_vertex_p3f, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_vertex_pt", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_33add_vertex_pt, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_vertex_p3ft", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_35add_vertex_p3ft, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_vertex_pt2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_37add_vertex_pt2f, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_vertex_p3ft2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_39add_vertex_p3ft2f, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_stroke_color", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_41set_stroke_color, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_stroke_colorf", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_43set_stroke_colorf, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_stroke_thickness", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_45set_stroke_thickness, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_fill_color", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_47set_fill_color, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_fill_colorf", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_49set_fill_colorf, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_fill_mode", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_51set_fill_mode, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_projection_matrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_53set_projection_matrix, METH_VARARGS|METH_KEYWORDS, 0},
  {"enable_diffuse_shading", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_55enable_diffuse_shading, METH_VARARGS|METH_KEYWORDS, 0},
  {"disable_diffuse_shading", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_57disable_diffuse_shading, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_view_matrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_59set_view_matrix, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_model_matrix", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_61set_model_matrix, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_texture", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_63set_texture, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_font_texture", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_65set_font_texture, METH_VARARGS|METH_KEYWORDS, 0},
  {"set_texture_coordinate_so", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_67set_texture_coordinate_so, METH_VARARGS|METH_KEYWORDS, 0},
  {"apply_transformations_on_cpu", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_69apply_transformations_on_cpu, METH_VARARGS|METH_KEYWORDS, 0},
  {"apply_transformations_on_gpu", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_71apply_transformations_on_gpu, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_triangle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_73add_triangle, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_quad", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_75add_quad, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_quad_8f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_77add_quad_8f, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_line", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_79add_line, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_line2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_81add_line2f, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_rect", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_83add_rect, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_rect2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_85add_rect2f, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_circle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_87add_circle, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_circle2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_89add_circle2f, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_circler", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_91add_circler, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_circler2fr", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_93add_circler2fr, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_oval", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_95add_oval, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_oval2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_97add_oval2f, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_arc2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_99add_arc2f, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_character", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_101add_character, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_string", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_103add_string, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_cubic_bazier", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_105add_cubic_bazier, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_cubic_bazier2v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_107add_cubic_bazier2v, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_cubic_bazier2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_109add_cubic_bazier2f, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_cubic_bazier_points", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_111add_cubic_bazier_points, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_cubic_bazier_points2v", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_113add_cubic_bazier_points2v, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_cubic_bazier_points2f", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_115add_cubic_bazier_points2f, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_shape_out_line", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_117add_shape_out_line, METH_VARARGS|METH_KEYWORDS, 0},
  {"add_string_with_font", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_3cgl_7widgets_119add_string_with_font, METH_VARARGS|METH_KEYWORDS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_7widgets_121__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_7widgets_123__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_widgets = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.widgets", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_widgets), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_widgets, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_widgets, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_7widgets_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_widgets, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

static PyObject *__pyx_tp_new_3cgl_noise_params(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_3cgl_noise_params(PyObject *o) {
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_3cgl_12noise_params_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_12noise_params_4type_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_12noise_params_fractal_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_12noise_params_12fractal_type_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_12noise_params_octaves(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_12noise_params_7octaves_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_12noise_params_lacunarity(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_12noise_params_10lacunarity_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_12noise_params_gain(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_12noise_params_4gain_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_12noise_params_frequency(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_12noise_params_9frequency_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_12noise_params_weighted_strength(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_12noise_params_17weighted_strength_1__get__(o);
}

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

static PyObject *__pyx_getprop_3cgl_12noise_params_ping_pong_strength(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_3cgl_12noise_params_18ping_pong_strength_1__get__(o);
}

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

static PyMethodDef __pyx_methods_3cgl_noise_params[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_3cgl_12noise_params_7__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_3cgl_12noise_params_9__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_3cgl_noise_params[] = {
  {(char *)"type", __pyx_getprop_3cgl_12noise_params_type, __pyx_setprop_3cgl_12noise_params_type, (char *)0, 0},
  {(char *)"fractal_type", __pyx_getprop_3cgl_12noise_params_fractal_type, __pyx_setprop_3cgl_12noise_params_fractal_type, (char *)0, 0},
  {(char *)"octaves", __pyx_getprop_3cgl_12noise_params_octaves, __pyx_setprop_3cgl_12noise_params_octaves, (char *)0, 0},
  {(char *)"lacunarity", __pyx_getprop_3cgl_12noise_params_lacunarity, __pyx_setprop_3cgl_12noise_params_lacunarity, (char *)0, 0},
  {(char *)"gain", __pyx_getprop_3cgl_12noise_params_gain, __pyx_setprop_3cgl_12noise_params_gain, (char *)0, 0},
  {(char *)"frequency", __pyx_getprop_3cgl_12noise_params_frequency, __pyx_setprop_3cgl_12noise_params_frequency, (char *)0, 0},
  {(char *)"weighted_strength", __pyx_getprop_3cgl_12noise_params_weighted_strength, __pyx_setprop_3cgl_12noise_params_weighted_strength, (char *)0, 0},
  {(char *)"ping_pong_strength", __pyx_getprop_3cgl_12noise_params_ping_pong_strength, __pyx_setprop_3cgl_12noise_params_ping_pong_strength, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_3cgl_noise_params = {
  PyVarObject_HEAD_INIT(0, 0)
  "cgl.noise_params", /*tp_name*/
  sizeof(struct __pyx_obj_3cgl_noise_params), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_3cgl_noise_params, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_3cgl_12noise_params_3__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_3cgl_12noise_params_5__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_3cgl_noise_params, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_3cgl_noise_params, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_3cgl_12noise_params_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_3cgl_noise_params, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000
  0, /*tp_print*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000
  0, /*tp_pypy_flags*/
  #endif
};

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

#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_cgl(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_cgl},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "cgl",
    0, /* m_doc */
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    0, /* m_size */
  #else
    -1, /* m_size */
  #endif
    __pyx_methods /* m_methods */,
  #if CYTHON_PEP489_MULTI_PHASE_INIT
    __pyx_moduledef_slots, /* m_slots */
  #else
    NULL, /* m_reload */
  #endif
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif
#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
  {&__pyx_n_s_BLOOM_SHADER_MODE_COMPOSITE, __pyx_k_BLOOM_SHADER_MODE_COMPOSITE, sizeof(__pyx_k_BLOOM_SHADER_MODE_COMPOSITE), 0, 0, 1, 1},
  {&__pyx_n_s_BLOOM_SHADER_MODE_DOWNSAMPLE, __pyx_k_BLOOM_SHADER_MODE_DOWNSAMPLE, sizeof(__pyx_k_BLOOM_SHADER_MODE_DOWNSAMPLE), 0, 0, 1, 1},
  {&__pyx_n_s_BLOOM_SHADER_MODE_PREFILTER, __pyx_k_BLOOM_SHADER_MODE_PREFILTER, sizeof(__pyx_k_BLOOM_SHADER_MODE_PREFILTER), 0, 0, 1, 1},
  {&__pyx_n_s_BLOOM_SHADER_MODE_UPSAMPLE, __pyx_k_BLOOM_SHADER_MODE_UPSAMPLE, sizeof(__pyx_k_BLOOM_SHADER_MODE_UPSAMPLE), 0, 0, 1, 1},
  {&__pyx_n_s_CGL_FALSE, __pyx_k_CGL_FALSE, sizeof(__pyx_k_CGL_FALSE), 0, 0, 1, 1},
  {&__pyx_n_s_CGL_TRUE, __pyx_k_CGL_TRUE, sizeof(__pyx_k_CGL_TRUE), 0, 0, 1, 1},
  {&__pyx_kp_s_CGL_Window, __pyx_k_CGL_Window, sizeof(__pyx_k_CGL_Window), 0, 0, 1, 0},
  {&__pyx_n_s_CONSOLE_COLOR_BLUE, __pyx_k_CONSOLE_COLOR_BLUE, sizeof(__pyx_k_CONSOLE_COLOR_BLUE), 0, 0, 1, 1},
  {&__pyx_n_s_CONSOLE_COLOR_GRAY, __pyx_k_CONSOLE_COLOR_GRAY, sizeof(__pyx_k_CONSOLE_COLOR_GRAY), 0, 0, 1, 1},
  {&__pyx_n_s_CONSOLE_COLOR_GREEN, __pyx_k_CONSOLE_COLOR_GREEN, sizeof(__pyx_k_CONSOLE_COLOR_GREEN), 0, 0, 1, 1},
  {&__pyx_n_s_CONSOLE_COLOR_RED, __pyx_k_CONSOLE_COLOR_RED, sizeof(__pyx_k_CONSOLE_COLOR_RED), 0, 0, 1, 1},
  {&__pyx_n_s_CONSOLE_COLOR_RESET, __pyx_k_CONSOLE_COLOR_RESET, sizeof(__pyx_k_CONSOLE_COLOR_RESET), 0, 0, 1, 1},
  {&__pyx_n_s_CUBEMAP_NEGATIVE_X, __pyx_k_CUBEMAP_NEGATIVE_X, sizeof(__pyx_k_CUBEMAP_NEGATIVE_X), 0, 0, 1, 1},
  {&__pyx_n_s_CUBEMAP_NEGATIVE_Y, __pyx_k_CUBEMAP_NEGATIVE_Y, sizeof(__pyx_k_CUBEMAP_NEGATIVE_Y), 0, 0, 1, 1},
  {&__pyx_n_s_CUBEMAP_NEGATIVE_Z, __pyx_k_CUBEMAP_NEGATIVE_Z, sizeof(__pyx_k_CUBEMAP_NEGATIVE_Z), 0, 0, 1, 1},
  {&__pyx_n_s_CUBEMAP_POSITIVE_X, __pyx_k_CUBEMAP_POSITIVE_X, sizeof(__pyx_k_CUBEMAP_POSITIVE_X), 0, 0, 1, 1},
  {&__pyx_n_s_CUBEMAP_POSITIVE_Y, __pyx_k_CUBEMAP_POSITIVE_Y, sizeof(__pyx_k_CUBEMAP_POSITIVE_Y), 0, 0, 1, 1},
  {&__pyx_n_s_CUBEMAP_POSITIVE_Z, __pyx_k_CUBEMAP_POSITIVE_Z, sizeof(__pyx_k_CUBEMAP_POSITIVE_Z), 0, 0, 1, 1},
  {&__pyx_n_s_Callable, __pyx_k_Callable, sizeof(__pyx_k_Callable), 0, 0, 1, 1},
  {&__pyx_n_s_E, __pyx_k_E, sizeof(__pyx_k_E), 0, 0, 1, 1},
  {&__pyx_kp_s_Failed_to_create_3d_texture, __pyx_k_Failed_to_create_3d_texture, sizeof(__pyx_k_Failed_to_create_3d_texture), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_basic_framebuff, __pyx_k_Failed_to_create_basic_framebuff, sizeof(__pyx_k_Failed_to_create_basic_framebuff), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_blank_texture, __pyx_k_Failed_to_create_blank_texture, sizeof(__pyx_k_Failed_to_create_blank_texture), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_cube_mesh, __pyx_k_Failed_to_create_cube_mesh, sizeof(__pyx_k_Failed_to_create_cube_mesh), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_cubemap_texture, __pyx_k_Failed_to_create_cubemap_texture, sizeof(__pyx_k_Failed_to_create_cubemap_texture), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_cylinder_mesh, __pyx_k_Failed_to_create_cylinder_mesh, sizeof(__pyx_k_Failed_to_create_cylinder_mesh), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_framebuffer, __pyx_k_Failed_to_create_framebuffer, sizeof(__pyx_k_Failed_to_create_framebuffer), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_framebuffer_fro, __pyx_k_Failed_to_create_framebuffer_fro, sizeof(__pyx_k_Failed_to_create_framebuffer_fro), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_mesh, __pyx_k_Failed_to_create_mesh, sizeof(__pyx_k_Failed_to_create_mesh), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_plane_mesh, __pyx_k_Failed_to_create_plane_mesh, sizeof(__pyx_k_Failed_to_create_plane_mesh), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_quad_mesh, __pyx_k_Failed_to_create_quad_mesh, sizeof(__pyx_k_Failed_to_create_quad_mesh), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_shader, __pyx_k_Failed_to_create_shader, sizeof(__pyx_k_Failed_to_create_shader), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_sphere_mesh, __pyx_k_Failed_to_create_sphere_mesh, sizeof(__pyx_k_Failed_to_create_sphere_mesh), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_texture_array, __pyx_k_Failed_to_create_texture_array, sizeof(__pyx_k_Failed_to_create_texture_array), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_texture_from_im, __pyx_k_Failed_to_create_texture_from_im, sizeof(__pyx_k_Failed_to_create_texture_from_im), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_triangle_mesh, __pyx_k_Failed_to_create_triangle_mesh, sizeof(__pyx_k_Failed_to_create_triangle_mesh), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_create_window, __pyx_k_Failed_to_create_window, sizeof(__pyx_k_Failed_to_create_window), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_get_color_attachment, __pyx_k_Failed_to_get_color_attachment, sizeof(__pyx_k_Failed_to_get_color_attachment), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_get_color_texture, __pyx_k_Failed_to_get_color_texture, sizeof(__pyx_k_Failed_to_get_color_texture), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_get_depth_texture, __pyx_k_Failed_to_get_depth_texture, sizeof(__pyx_k_Failed_to_get_depth_texture), 0, 0, 1, 0},
  {&__pyx_kp_s_Failed_to_load_mesh_from_obj_fil, __pyx_k_Failed_to_load_mesh_from_obj_fil, sizeof(__pyx_k_Failed_to_load_mesh_from_obj_fil), 0, 0, 1, 0},
  {&__pyx_kp_s_GPU_Mesh, __pyx_k_GPU_Mesh, sizeof(__pyx_k_GPU_Mesh), 0, 0, 1, 0},
  {&__pyx_n_s_Image, __pyx_k_Image, sizeof(__pyx_k_Image), 0, 0, 1, 1},
  {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_0, __pyx_k_KEY_0, sizeof(__pyx_k_KEY_0), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_1, __pyx_k_KEY_1, sizeof(__pyx_k_KEY_1), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_2, __pyx_k_KEY_2, sizeof(__pyx_k_KEY_2), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_3, __pyx_k_KEY_3, sizeof(__pyx_k_KEY_3), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_4, __pyx_k_KEY_4, sizeof(__pyx_k_KEY_4), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_5, __pyx_k_KEY_5, sizeof(__pyx_k_KEY_5), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_6, __pyx_k_KEY_6, sizeof(__pyx_k_KEY_6), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_7, __pyx_k_KEY_7, sizeof(__pyx_k_KEY_7), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_8, __pyx_k_KEY_8, sizeof(__pyx_k_KEY_8), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_9, __pyx_k_KEY_9, sizeof(__pyx_k_KEY_9), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_A, __pyx_k_KEY_A, sizeof(__pyx_k_KEY_A), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_APOSTROPHE, __pyx_k_KEY_APOSTROPHE, sizeof(__pyx_k_KEY_APOSTROPHE), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_B, __pyx_k_KEY_B, sizeof(__pyx_k_KEY_B), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_BACKSLASH, __pyx_k_KEY_BACKSLASH, sizeof(__pyx_k_KEY_BACKSLASH), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_BACKSPACE, __pyx_k_KEY_BACKSPACE, sizeof(__pyx_k_KEY_BACKSPACE), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_C, __pyx_k_KEY_C, sizeof(__pyx_k_KEY_C), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_CAPS_LOCK, __pyx_k_KEY_CAPS_LOCK, sizeof(__pyx_k_KEY_CAPS_LOCK), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_COMMA, __pyx_k_KEY_COMMA, sizeof(__pyx_k_KEY_COMMA), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_D, __pyx_k_KEY_D, sizeof(__pyx_k_KEY_D), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_DELETE, __pyx_k_KEY_DELETE, sizeof(__pyx_k_KEY_DELETE), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_DOWN, __pyx_k_KEY_DOWN, sizeof(__pyx_k_KEY_DOWN), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_E, __pyx_k_KEY_E, sizeof(__pyx_k_KEY_E), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_END, __pyx_k_KEY_END, sizeof(__pyx_k_KEY_END), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_ENTER, __pyx_k_KEY_ENTER, sizeof(__pyx_k_KEY_ENTER), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_EQUAL, __pyx_k_KEY_EQUAL, sizeof(__pyx_k_KEY_EQUAL), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_ESCAPE, __pyx_k_KEY_ESCAPE, sizeof(__pyx_k_KEY_ESCAPE), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F, __pyx_k_KEY_F, sizeof(__pyx_k_KEY_F), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F1, __pyx_k_KEY_F1, sizeof(__pyx_k_KEY_F1), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F10, __pyx_k_KEY_F10, sizeof(__pyx_k_KEY_F10), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F11, __pyx_k_KEY_F11, sizeof(__pyx_k_KEY_F11), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F12, __pyx_k_KEY_F12, sizeof(__pyx_k_KEY_F12), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F13, __pyx_k_KEY_F13, sizeof(__pyx_k_KEY_F13), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F14, __pyx_k_KEY_F14, sizeof(__pyx_k_KEY_F14), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F15, __pyx_k_KEY_F15, sizeof(__pyx_k_KEY_F15), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F16, __pyx_k_KEY_F16, sizeof(__pyx_k_KEY_F16), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F17, __pyx_k_KEY_F17, sizeof(__pyx_k_KEY_F17), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F18, __pyx_k_KEY_F18, sizeof(__pyx_k_KEY_F18), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F19, __pyx_k_KEY_F19, sizeof(__pyx_k_KEY_F19), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F2, __pyx_k_KEY_F2, sizeof(__pyx_k_KEY_F2), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F20, __pyx_k_KEY_F20, sizeof(__pyx_k_KEY_F20), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F21, __pyx_k_KEY_F21, sizeof(__pyx_k_KEY_F21), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F22, __pyx_k_KEY_F22, sizeof(__pyx_k_KEY_F22), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F23, __pyx_k_KEY_F23, sizeof(__pyx_k_KEY_F23), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F24, __pyx_k_KEY_F24, sizeof(__pyx_k_KEY_F24), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F25, __pyx_k_KEY_F25, sizeof(__pyx_k_KEY_F25), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F3, __pyx_k_KEY_F3, sizeof(__pyx_k_KEY_F3), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F4, __pyx_k_KEY_F4, sizeof(__pyx_k_KEY_F4), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F5, __pyx_k_KEY_F5, sizeof(__pyx_k_KEY_F5), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F6, __pyx_k_KEY_F6, sizeof(__pyx_k_KEY_F6), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F7, __pyx_k_KEY_F7, sizeof(__pyx_k_KEY_F7), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F8, __pyx_k_KEY_F8, sizeof(__pyx_k_KEY_F8), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_F9, __pyx_k_KEY_F9, sizeof(__pyx_k_KEY_F9), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_G, __pyx_k_KEY_G, sizeof(__pyx_k_KEY_G), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_GRAVE_ACCENT, __pyx_k_KEY_GRAVE_ACCENT, sizeof(__pyx_k_KEY_GRAVE_ACCENT), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_H, __pyx_k_KEY_H, sizeof(__pyx_k_KEY_H), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_HOME, __pyx_k_KEY_HOME, sizeof(__pyx_k_KEY_HOME), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_I, __pyx_k_KEY_I, sizeof(__pyx_k_KEY_I), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_INSERT, __pyx_k_KEY_INSERT, sizeof(__pyx_k_KEY_INSERT), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_J, __pyx_k_KEY_J, sizeof(__pyx_k_KEY_J), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_K, __pyx_k_KEY_K, sizeof(__pyx_k_KEY_K), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_0, __pyx_k_KEY_KP_0, sizeof(__pyx_k_KEY_KP_0), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_1, __pyx_k_KEY_KP_1, sizeof(__pyx_k_KEY_KP_1), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_2, __pyx_k_KEY_KP_2, sizeof(__pyx_k_KEY_KP_2), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_3, __pyx_k_KEY_KP_3, sizeof(__pyx_k_KEY_KP_3), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_4, __pyx_k_KEY_KP_4, sizeof(__pyx_k_KEY_KP_4), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_5, __pyx_k_KEY_KP_5, sizeof(__pyx_k_KEY_KP_5), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_6, __pyx_k_KEY_KP_6, sizeof(__pyx_k_KEY_KP_6), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_7, __pyx_k_KEY_KP_7, sizeof(__pyx_k_KEY_KP_7), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_8, __pyx_k_KEY_KP_8, sizeof(__pyx_k_KEY_KP_8), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_9, __pyx_k_KEY_KP_9, sizeof(__pyx_k_KEY_KP_9), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_ADD, __pyx_k_KEY_KP_ADD, sizeof(__pyx_k_KEY_KP_ADD), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_DECIMAL, __pyx_k_KEY_KP_DECIMAL, sizeof(__pyx_k_KEY_KP_DECIMAL), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_DIVIDE, __pyx_k_KEY_KP_DIVIDE, sizeof(__pyx_k_KEY_KP_DIVIDE), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_ENTER, __pyx_k_KEY_KP_ENTER, sizeof(__pyx_k_KEY_KP_ENTER), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_EQUAL, __pyx_k_KEY_KP_EQUAL, sizeof(__pyx_k_KEY_KP_EQUAL), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_MULTIPLY, __pyx_k_KEY_KP_MULTIPLY, sizeof(__pyx_k_KEY_KP_MULTIPLY), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_KP_SUBTRACT, __pyx_k_KEY_KP_SUBTRACT, sizeof(__pyx_k_KEY_KP_SUBTRACT), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_L, __pyx_k_KEY_L, sizeof(__pyx_k_KEY_L), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_LEFT, __pyx_k_KEY_LEFT, sizeof(__pyx_k_KEY_LEFT), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_LEFT_ALT, __pyx_k_KEY_LEFT_ALT, sizeof(__pyx_k_KEY_LEFT_ALT), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_LEFT_BRACKET, __pyx_k_KEY_LEFT_BRACKET, sizeof(__pyx_k_KEY_LEFT_BRACKET), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_LEFT_CONTROL, __pyx_k_KEY_LEFT_CONTROL, sizeof(__pyx_k_KEY_LEFT_CONTROL), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_LEFT_SHIFT, __pyx_k_KEY_LEFT_SHIFT, sizeof(__pyx_k_KEY_LEFT_SHIFT), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_LEFT_SUPER, __pyx_k_KEY_LEFT_SUPER, sizeof(__pyx_k_KEY_LEFT_SUPER), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_M, __pyx_k_KEY_M, sizeof(__pyx_k_KEY_M), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_MENU, __pyx_k_KEY_MENU, sizeof(__pyx_k_KEY_MENU), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_MINUS, __pyx_k_KEY_MINUS, sizeof(__pyx_k_KEY_MINUS), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_N, __pyx_k_KEY_N, sizeof(__pyx_k_KEY_N), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_NUM_LOCK, __pyx_k_KEY_NUM_LOCK, sizeof(__pyx_k_KEY_NUM_LOCK), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_O, __pyx_k_KEY_O, sizeof(__pyx_k_KEY_O), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_P, __pyx_k_KEY_P, sizeof(__pyx_k_KEY_P), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_PAGE_DOWN, __pyx_k_KEY_PAGE_DOWN, sizeof(__pyx_k_KEY_PAGE_DOWN), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_PAGE_UP, __pyx_k_KEY_PAGE_UP, sizeof(__pyx_k_KEY_PAGE_UP), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_PAUSE, __pyx_k_KEY_PAUSE, sizeof(__pyx_k_KEY_PAUSE), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_PERIOD, __pyx_k_KEY_PERIOD, sizeof(__pyx_k_KEY_PERIOD), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_PRINT_SCREEN, __pyx_k_KEY_PRINT_SCREEN, sizeof(__pyx_k_KEY_PRINT_SCREEN), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_Q, __pyx_k_KEY_Q, sizeof(__pyx_k_KEY_Q), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_R, __pyx_k_KEY_R, sizeof(__pyx_k_KEY_R), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_RIGHT, __pyx_k_KEY_RIGHT, sizeof(__pyx_k_KEY_RIGHT), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_RIGHT_ALT, __pyx_k_KEY_RIGHT_ALT, sizeof(__pyx_k_KEY_RIGHT_ALT), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_RIGHT_BRACKET, __pyx_k_KEY_RIGHT_BRACKET, sizeof(__pyx_k_KEY_RIGHT_BRACKET), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_RIGHT_CONTROL, __pyx_k_KEY_RIGHT_CONTROL, sizeof(__pyx_k_KEY_RIGHT_CONTROL), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_RIGHT_SHIFT, __pyx_k_KEY_RIGHT_SHIFT, sizeof(__pyx_k_KEY_RIGHT_SHIFT), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_RIGHT_SUPER, __pyx_k_KEY_RIGHT_SUPER, sizeof(__pyx_k_KEY_RIGHT_SUPER), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_S, __pyx_k_KEY_S, sizeof(__pyx_k_KEY_S), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_SCROLL_LOCK, __pyx_k_KEY_SCROLL_LOCK, sizeof(__pyx_k_KEY_SCROLL_LOCK), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_SEMICOLON, __pyx_k_KEY_SEMICOLON, sizeof(__pyx_k_KEY_SEMICOLON), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_SLASH, __pyx_k_KEY_SLASH, sizeof(__pyx_k_KEY_SLASH), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_SPACE, __pyx_k_KEY_SPACE, sizeof(__pyx_k_KEY_SPACE), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_T, __pyx_k_KEY_T, sizeof(__pyx_k_KEY_T), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_TAB, __pyx_k_KEY_TAB, sizeof(__pyx_k_KEY_TAB), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_U, __pyx_k_KEY_U, sizeof(__pyx_k_KEY_U), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_UNKNOWN, __pyx_k_KEY_UNKNOWN, sizeof(__pyx_k_KEY_UNKNOWN), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_UP, __pyx_k_KEY_UP, sizeof(__pyx_k_KEY_UP), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_V, __pyx_k_KEY_V, sizeof(__pyx_k_KEY_V), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_W, __pyx_k_KEY_W, sizeof(__pyx_k_KEY_W), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_WORLD_1, __pyx_k_KEY_WORLD_1, sizeof(__pyx_k_KEY_WORLD_1), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_WORLD_2, __pyx_k_KEY_WORLD_2, sizeof(__pyx_k_KEY_WORLD_2), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_X, __pyx_k_KEY_X, sizeof(__pyx_k_KEY_X), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_Y, __pyx_k_KEY_Y, sizeof(__pyx_k_KEY_Y), 0, 0, 1, 1},
  {&__pyx_n_s_KEY_Z, __pyx_k_KEY_Z, sizeof(__pyx_k_KEY_Z), 0, 0, 1, 1},
  {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
  {&__pyx_n_s_LOGGER_LOG_BUFFER_SIZE, __pyx_k_LOGGER_LOG_BUFFER_SIZE, sizeof(__pyx_k_LOGGER_LOG_BUFFER_SIZE), 0, 0, 1, 1},
  {&__pyx_n_s_LOGGER_MAX_LOG_FILES, __pyx_k_LOGGER_MAX_LOG_FILES, sizeof(__pyx_k_LOGGER_MAX_LOG_FILES), 0, 0, 1, 1},
  {&__pyx_n_s_LOG_LEVEL_ERROR, __pyx_k_LOG_LEVEL_ERROR, sizeof(__pyx_k_LOG_LEVEL_ERROR), 0, 0, 1, 1},
  {&__pyx_n_s_LOG_LEVEL_INFO, __pyx_k_LOG_LEVEL_INFO, sizeof(__pyx_k_LOG_LEVEL_INFO), 0, 0, 1, 1},
  {&__pyx_n_s_LOG_LEVEL_INTERNAL, __pyx_k_LOG_LEVEL_INTERNAL, sizeof(__pyx_k_LOG_LEVEL_INTERNAL), 0, 0, 1, 1},
  {&__pyx_n_s_LOG_LEVEL_TRACE, __pyx_k_LOG_LEVEL_TRACE, sizeof(__pyx_k_LOG_LEVEL_TRACE), 0, 0, 1, 1},
  {&__pyx_n_s_LOG_LEVEL_WARN, __pyx_k_LOG_LEVEL_WARN, sizeof(__pyx_k_LOG_LEVEL_WARN), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_1, __pyx_k_MOUSE_BUTTON_1, sizeof(__pyx_k_MOUSE_BUTTON_1), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_2, __pyx_k_MOUSE_BUTTON_2, sizeof(__pyx_k_MOUSE_BUTTON_2), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_3, __pyx_k_MOUSE_BUTTON_3, sizeof(__pyx_k_MOUSE_BUTTON_3), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_4, __pyx_k_MOUSE_BUTTON_4, sizeof(__pyx_k_MOUSE_BUTTON_4), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_5, __pyx_k_MOUSE_BUTTON_5, sizeof(__pyx_k_MOUSE_BUTTON_5), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_6, __pyx_k_MOUSE_BUTTON_6, sizeof(__pyx_k_MOUSE_BUTTON_6), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_7, __pyx_k_MOUSE_BUTTON_7, sizeof(__pyx_k_MOUSE_BUTTON_7), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_8, __pyx_k_MOUSE_BUTTON_8, sizeof(__pyx_k_MOUSE_BUTTON_8), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_LAST, __pyx_k_MOUSE_BUTTON_LAST, sizeof(__pyx_k_MOUSE_BUTTON_LAST), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_LEFT, __pyx_k_MOUSE_BUTTON_LEFT, sizeof(__pyx_k_MOUSE_BUTTON_LEFT), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_MIDDLE, __pyx_k_MOUSE_BUTTON_MIDDLE, sizeof(__pyx_k_MOUSE_BUTTON_MIDDLE), 0, 0, 1, 1},
  {&__pyx_n_s_MOUSE_BUTTON_RIGHT, __pyx_k_MOUSE_BUTTON_RIGHT, sizeof(__pyx_k_MOUSE_BUTTON_RIGHT), 0, 0, 1, 1},
  {&__pyx_kp_s_Matrices_must_have_the_same_size, __pyx_k_Matrices_must_have_the_same_size, sizeof(__pyx_k_Matrices_must_have_the_same_size), 0, 0, 1, 0},
  {&__pyx_kp_s_Matrix_index_must_be_a_tuple_of, __pyx_k_Matrix_index_must_be_a_tuple_of, sizeof(__pyx_k_Matrix_index_must_be_a_tuple_of), 0, 0, 1, 0},
  {&__pyx_kp_s_Matrix_must_be_square, __pyx_k_Matrix_must_be_square, sizeof(__pyx_k_Matrix_must_be_square), 0, 0, 1, 0},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_FRACTAL_TYPE_BILLOW, __pyx_k_NOISE_FRACTAL_TYPE_BILLOW, sizeof(__pyx_k_NOISE_FRACTAL_TYPE_BILLOW), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_FRACTAL_TYPE_COUNT, __pyx_k_NOISE_FRACTAL_TYPE_COUNT, sizeof(__pyx_k_NOISE_FRACTAL_TYPE_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_FRACTAL_TYPE_FBM, __pyx_k_NOISE_FRACTAL_TYPE_FBM, sizeof(__pyx_k_NOISE_FRACTAL_TYPE_FBM), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_FRACTAL_TYPE_NONE, __pyx_k_NOISE_FRACTAL_TYPE_NONE, sizeof(__pyx_k_NOISE_FRACTAL_TYPE_NONE), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_FRACTAL_TYPE_PINGPONG, __pyx_k_NOISE_FRACTAL_TYPE_PINGPONG, sizeof(__pyx_k_NOISE_FRACTAL_TYPE_PINGPONG), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_FRACTAL_TYPE_RIGID, __pyx_k_NOISE_FRACTAL_TYPE_RIGID, sizeof(__pyx_k_NOISE_FRACTAL_TYPE_RIGID), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_TYPE_COUNT, __pyx_k_NOISE_TYPE_COUNT, sizeof(__pyx_k_NOISE_TYPE_COUNT), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_TYPE_OPENSIMPLEX, __pyx_k_NOISE_TYPE_OPENSIMPLEX, sizeof(__pyx_k_NOISE_TYPE_OPENSIMPLEX), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_TYPE_OPENSIMPLEX2S, __pyx_k_NOISE_TYPE_OPENSIMPLEX2S, sizeof(__pyx_k_NOISE_TYPE_OPENSIMPLEX2S), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_TYPE_PERLIN, __pyx_k_NOISE_TYPE_PERLIN, sizeof(__pyx_k_NOISE_TYPE_PERLIN), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_TYPE_VALUE, __pyx_k_NOISE_TYPE_VALUE, sizeof(__pyx_k_NOISE_TYPE_VALUE), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_TYPE_VALUECUBIC, __pyx_k_NOISE_TYPE_VALUECUBIC, sizeof(__pyx_k_NOISE_TYPE_VALUECUBIC), 0, 0, 1, 1},
  {&__pyx_n_s_NOISE_TYPE_WORLEY, __pyx_k_NOISE_TYPE_WORLEY, sizeof(__pyx_k_NOISE_TYPE_WORLEY), 0, 0, 1, 1},
  {&__pyx_kp_s_No_value_specified_for_struct_at, __pyx_k_No_value_specified_for_struct_at, sizeof(__pyx_k_No_value_specified_for_struct_at), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_10, __pyx_k_No_value_specified_for_struct_at_10, sizeof(__pyx_k_No_value_specified_for_struct_at_10), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_11, __pyx_k_No_value_specified_for_struct_at_11, sizeof(__pyx_k_No_value_specified_for_struct_at_11), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_12, __pyx_k_No_value_specified_for_struct_at_12, sizeof(__pyx_k_No_value_specified_for_struct_at_12), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_13, __pyx_k_No_value_specified_for_struct_at_13, sizeof(__pyx_k_No_value_specified_for_struct_at_13), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_14, __pyx_k_No_value_specified_for_struct_at_14, sizeof(__pyx_k_No_value_specified_for_struct_at_14), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_15, __pyx_k_No_value_specified_for_struct_at_15, sizeof(__pyx_k_No_value_specified_for_struct_at_15), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_16, __pyx_k_No_value_specified_for_struct_at_16, sizeof(__pyx_k_No_value_specified_for_struct_at_16), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_17, __pyx_k_No_value_specified_for_struct_at_17, sizeof(__pyx_k_No_value_specified_for_struct_at_17), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_18, __pyx_k_No_value_specified_for_struct_at_18, sizeof(__pyx_k_No_value_specified_for_struct_at_18), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_19, __pyx_k_No_value_specified_for_struct_at_19, sizeof(__pyx_k_No_value_specified_for_struct_at_19), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_2, __pyx_k_No_value_specified_for_struct_at_2, sizeof(__pyx_k_No_value_specified_for_struct_at_2), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_3, __pyx_k_No_value_specified_for_struct_at_3, sizeof(__pyx_k_No_value_specified_for_struct_at_3), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_4, __pyx_k_No_value_specified_for_struct_at_4, sizeof(__pyx_k_No_value_specified_for_struct_at_4), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_5, __pyx_k_No_value_specified_for_struct_at_5, sizeof(__pyx_k_No_value_specified_for_struct_at_5), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_6, __pyx_k_No_value_specified_for_struct_at_6, sizeof(__pyx_k_No_value_specified_for_struct_at_6), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_7, __pyx_k_No_value_specified_for_struct_at_7, sizeof(__pyx_k_No_value_specified_for_struct_at_7), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_8, __pyx_k_No_value_specified_for_struct_at_8, sizeof(__pyx_k_No_value_specified_for_struct_at_8), 0, 0, 1, 0},
  {&__pyx_kp_s_No_value_specified_for_struct_at_9, __pyx_k_No_value_specified_for_struct_at_9, sizeof(__pyx_k_No_value_specified_for_struct_at_9), 0, 0, 1, 0},
  {&__pyx_n_s_PI, __pyx_k_PI, sizeof(__pyx_k_PI), 0, 0, 1, 1},
  {&__pyx_n_s_PIL, __pyx_k_PIL, sizeof(__pyx_k_PIL), 0, 0, 1, 1},
  {&__pyx_n_s_PI_2, __pyx_k_PI_2, sizeof(__pyx_k_PI_2), 0, 0, 1, 1},
  {&__pyx_n_s_PRESS, __pyx_k_PRESS, sizeof(__pyx_k_PRESS), 0, 0, 1, 1},
  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
  {&__pyx_kp_s_Pickling_of_struct_members_such, __pyx_k_Pickling_of_struct_members_such, sizeof(__pyx_k_Pickling_of_struct_members_such), 0, 0, 1, 0},
  {&__pyx_kp_s_Pickling_of_struct_members_such_2, __pyx_k_Pickling_of_struct_members_such_2, sizeof(__pyx_k_Pickling_of_struct_members_such_2), 0, 0, 1, 0},
  {&__pyx_kp_s_Pickling_of_struct_members_such_3, __pyx_k_Pickling_of_struct_members_such_3, sizeof(__pyx_k_Pickling_of_struct_members_such_3), 0, 0, 1, 0},
  {&__pyx_kp_s_Pickling_of_struct_members_such_4, __pyx_k_Pickling_of_struct_members_such_4, sizeof(__pyx_k_Pickling_of_struct_members_such_4), 0, 0, 1, 0},
  {&__pyx_kp_s_Pickling_of_struct_members_such_5, __pyx_k_Pickling_of_struct_members_such_5, sizeof(__pyx_k_Pickling_of_struct_members_such_5), 0, 0, 1, 0},
  {&__pyx_kp_s_Pickling_of_struct_members_such_6, __pyx_k_Pickling_of_struct_members_such_6, sizeof(__pyx_k_Pickling_of_struct_members_such_6), 0, 0, 1, 0},
  {&__pyx_kp_s_Pickling_of_struct_members_such_7, __pyx_k_Pickling_of_struct_members_such_7, sizeof(__pyx_k_Pickling_of_struct_members_such_7), 0, 0, 1, 0},
  {&__pyx_kp_s_Pickling_of_struct_members_such_8, __pyx_k_Pickling_of_struct_members_such_8, sizeof(__pyx_k_Pickling_of_struct_members_such_8), 0, 0, 1, 0},
  {&__pyx_n_s_RELEASE, __pyx_k_RELEASE, sizeof(__pyx_k_RELEASE), 0, 0, 1, 1},
  {&__pyx_n_s_REPEAT, __pyx_k_REPEAT, sizeof(__pyx_k_REPEAT), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_SQRT2, __pyx_k_SQRT2, sizeof(__pyx_k_SQRT2), 0, 0, 1, 1},
  {&__pyx_n_s_SQRT3, __pyx_k_SQRT3, sizeof(__pyx_k_SQRT3), 0, 0, 1, 1},
  {&__pyx_n_s_SQRT5, __pyx_k_SQRT5, sizeof(__pyx_k_SQRT5), 0, 0, 1, 1},
  {&__pyx_n_s_SQRT6, __pyx_k_SQRT6, sizeof(__pyx_k_SQRT6), 0, 0, 1, 1},
  {&__pyx_n_s_SQRT7, __pyx_k_SQRT7, sizeof(__pyx_k_SQRT7), 0, 0, 1, 1},
  {&__pyx_n_s_SQRT8, __pyx_k_SQRT8, sizeof(__pyx_k_SQRT8), 0, 0, 1, 1},
  {&__pyx_n_s_Shader, __pyx_k_Shader, sizeof(__pyx_k_Shader), 0, 0, 1, 1},
  {&__pyx_kp_s_Submatrix_must_be_inside_the_mat, __pyx_k_Submatrix_must_be_inside_the_mat, sizeof(__pyx_k_Submatrix_must_be_inside_the_mat), 0, 0, 1, 0},
  {&__pyx_n_s_TWO_PI, __pyx_k_TWO_PI, sizeof(__pyx_k_TWO_PI), 0, 0, 1, 1},
  {&__pyx_kp_s_The_number_of_indices_is_greater, __pyx_k_The_number_of_indices_is_greater, sizeof(__pyx_k_The_number_of_indices_is_greater), 0, 0, 1, 0},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_kp_s_Values_must_have_the_same_size_a, __pyx_k_Values_must_have_the_same_size_a, sizeof(__pyx_k_Values_must_have_the_same_size_a), 0, 0, 1, 0},
  {&__pyx_n_s_WINDOW_TABLE, __pyx_k_WINDOW_TABLE, sizeof(__pyx_k_WINDOW_TABLE), 0, 0, 1, 1},
  {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
  {&__pyx_kp_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 0},
  {&__pyx_n_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 1},
  {&__pyx_kp_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 0},
  {&__pyx_kp_s__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 1, 0},
  {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
  {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0},
  {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
  {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0},
  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
  {&__pyx_n_s_a_x, __pyx_k_a_x, sizeof(__pyx_k_a_x), 0, 0, 1, 1},
  {&__pyx_n_s_a_y, __pyx_k_a_y, sizeof(__pyx_k_a_y), 0, 0, 1, 1},
  {&__pyx_n_s_aabb_contains_point, __pyx_k_aabb_contains_point, sizeof(__pyx_k_aabb_contains_point), 0, 0, 1, 1},
  {&__pyx_n_s_aabb_intersects_aabb, __pyx_k_aabb_intersects_aabb, sizeof(__pyx_k_aabb_intersects_aabb), 0, 0, 1, 1},
  {&__pyx_n_s_aabb_max, __pyx_k_aabb_max, sizeof(__pyx_k_aabb_max), 0, 0, 1, 1},
  {&__pyx_n_s_aabb_max_a, __pyx_k_aabb_max_a, sizeof(__pyx_k_aabb_max_a), 0, 0, 1, 1},
  {&__pyx_n_s_aabb_max_b, __pyx_k_aabb_max_b, sizeof(__pyx_k_aabb_max_b), 0, 0, 1, 1},
  {&__pyx_n_s_aabb_min, __pyx_k_aabb_min, sizeof(__pyx_k_aabb_min), 0, 0, 1, 1},
  {&__pyx_n_s_aabb_min_a, __pyx_k_aabb_min_a, sizeof(__pyx_k_aabb_min_a), 0, 0, 1, 1},
  {&__pyx_n_s_aabb_min_b, __pyx_k_aabb_min_b, sizeof(__pyx_k_aabb_min_b), 0, 0, 1, 1},
  {&__pyx_n_s_add_arc2f, __pyx_k_add_arc2f, sizeof(__pyx_k_add_arc2f), 0, 0, 1, 1},
  {&__pyx_n_s_add_character, __pyx_k_add_character, sizeof(__pyx_k_add_character), 0, 0, 1, 1},
  {&__pyx_n_s_add_circle, __pyx_k_add_circle, sizeof(__pyx_k_add_circle), 0, 0, 1, 1},
  {&__pyx_n_s_add_circle2f, __pyx_k_add_circle2f, sizeof(__pyx_k_add_circle2f), 0, 0, 1, 1},
  {&__pyx_n_s_add_circler, __pyx_k_add_circler, sizeof(__pyx_k_add_circler), 0, 0, 1, 1},
  {&__pyx_n_s_add_circler2fr, __pyx_k_add_circler2fr, sizeof(__pyx_k_add_circler2fr), 0, 0, 1, 1},
  {&__pyx_n_s_add_cubic_bazier, __pyx_k_add_cubic_bazier, sizeof(__pyx_k_add_cubic_bazier), 0, 0, 1, 1},
  {&__pyx_n_s_add_cubic_bazier2f, __pyx_k_add_cubic_bazier2f, sizeof(__pyx_k_add_cubic_bazier2f), 0, 0, 1, 1},
  {&__pyx_n_s_add_cubic_bazier2v, __pyx_k_add_cubic_bazier2v, sizeof(__pyx_k_add_cubic_bazier2v), 0, 0, 1, 1},
  {&__pyx_n_s_add_cubic_bazier_points, __pyx_k_add_cubic_bazier_points, sizeof(__pyx_k_add_cubic_bazier_points), 0, 0, 1, 1},
  {&__pyx_n_s_add_cubic_bazier_points2f, __pyx_k_add_cubic_bazier_points2f, sizeof(__pyx_k_add_cubic_bazier_points2f), 0, 0, 1, 1},
  {&__pyx_n_s_add_cubic_bazier_points2v, __pyx_k_add_cubic_bazier_points2v, sizeof(__pyx_k_add_cubic_bazier_points2v), 0, 0, 1, 1},
  {&__pyx_n_s_add_line, __pyx_k_add_line, sizeof(__pyx_k_add_line), 0, 0, 1, 1},
  {&__pyx_n_s_add_line2f, __pyx_k_add_line2f, sizeof(__pyx_k_add_line2f), 0, 0, 1, 1},
  {&__pyx_n_s_add_mesh, __pyx_k_add_mesh, sizeof(__pyx_k_add_mesh), 0, 0, 1, 1},
  {&__pyx_n_s_add_oval, __pyx_k_add_oval, sizeof(__pyx_k_add_oval), 0, 0, 1, 1},
  {&__pyx_n_s_add_oval2f, __pyx_k_add_oval2f, sizeof(__pyx_k_add_oval2f), 0, 0, 1, 1},
  {&__pyx_n_s_add_quad, __pyx_k_add_quad, sizeof(__pyx_k_add_quad), 0, 0, 1, 1},
  {&__pyx_n_s_add_quad_8f, __pyx_k_add_quad_8f, sizeof(__pyx_k_add_quad_8f), 0, 0, 1, 1},
  {&__pyx_n_s_add_rect, __pyx_k_add_rect, sizeof(__pyx_k_add_rect), 0, 0, 1, 1},
  {&__pyx_n_s_add_rect2f, __pyx_k_add_rect2f, sizeof(__pyx_k_add_rect2f), 0, 0, 1, 1},
  {&__pyx_n_s_add_shape_out_line, __pyx_k_add_shape_out_line, sizeof(__pyx_k_add_shape_out_line), 0, 0, 1, 1},
  {&__pyx_n_s_add_string, __pyx_k_add_string, sizeof(__pyx_k_add_string), 0, 0, 1, 1},
  {&__pyx_n_s_add_string_with_font, __pyx_k_add_string_with_font, sizeof(__pyx_k_add_string_with_font), 0, 0, 1, 1},
  {&__pyx_n_s_add_triangle, __pyx_k_add_triangle, sizeof(__pyx_k_add_triangle), 0, 0, 1, 1},
  {&__pyx_n_s_add_vertex, __pyx_k_add_vertex, sizeof(__pyx_k_add_vertex), 0, 0, 1, 1},
  {&__pyx_n_s_add_vertex_p, __pyx_k_add_vertex_p, sizeof(__pyx_k_add_vertex_p), 0, 0, 1, 1},
  {&__pyx_n_s_add_vertex_p3f, __pyx_k_add_vertex_p3f, sizeof(__pyx_k_add_vertex_p3f), 0, 0, 1, 1},
  {&__pyx_n_s_add_vertex_p3ft, __pyx_k_add_vertex_p3ft, sizeof(__pyx_k_add_vertex_p3ft), 0, 0, 1, 1},
  {&__pyx_n_s_add_vertex_p3ft2f, __pyx_k_add_vertex_p3ft2f, sizeof(__pyx_k_add_vertex_p3ft2f), 0, 0, 1, 1},
  {&__pyx_n_s_add_vertex_pt, __pyx_k_add_vertex_pt, sizeof(__pyx_k_add_vertex_pt), 0, 0, 1, 1},
  {&__pyx_n_s_add_vertex_pt2f, __pyx_k_add_vertex_pt2f, sizeof(__pyx_k_add_vertex_pt2f), 0, 0, 1, 1},
  {&__pyx_n_s_advance, __pyx_k_advance, sizeof(__pyx_k_advance), 0, 0, 1, 1},
  {&__pyx_n_s_advance_normalized, __pyx_k_advance_normalized, sizeof(__pyx_k_advance_normalized), 0, 0, 1, 1},
  {&__pyx_n_s_angle, __pyx_k_angle, sizeof(__pyx_k_angle), 0, 0, 1, 1},
  {&__pyx_n_s_apply_transformations_on_cpu, __pyx_k_apply_transformations_on_cpu, sizeof(__pyx_k_apply_transformations_on_cpu), 0, 0, 1, 1},
  {&__pyx_n_s_apply_transformations_on_gpu, __pyx_k_apply_transformations_on_gpu, sizeof(__pyx_k_apply_transformations_on_gpu), 0, 0, 1, 1},
  {&__pyx_n_s_array, __pyx_k_array, sizeof(__pyx_k_array), 0, 0, 1, 1},
  {&__pyx_n_s_aspect, __pyx_k_aspect, sizeof(__pyx_k_aspect), 0, 0, 1, 1},
  {&__pyx_n_s_axes, __pyx_k_axes, sizeof(__pyx_k_axes), 0, 0, 1, 1},
  {&__pyx_n_s_axes_count, __pyx_k_axes_count, sizeof(__pyx_k_axes_count), 0, 0, 1, 1},
  {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_n_s_b_x, __pyx_k_b_x, sizeof(__pyx_k_b_x), 0, 0, 1, 1},
  {&__pyx_n_s_b_y, __pyx_k_b_y, sizeof(__pyx_k_b_y), 0, 0, 1, 1},
  {&__pyx_n_s_bearing, __pyx_k_bearing, sizeof(__pyx_k_bearing), 0, 0, 1, 1},
  {&__pyx_n_s_bearing_normalized, __pyx_k_bearing_normalized, sizeof(__pyx_k_bearing_normalized), 0, 0, 1, 1},
  {&__pyx_n_s_begin, __pyx_k_begin, sizeof(__pyx_k_begin), 0, 0, 1, 1},
  {&__pyx_n_s_begin_int, __pyx_k_begin_int, sizeof(__pyx_k_begin_int), 0, 0, 1, 1},
  {&__pyx_n_s_binding, __pyx_k_binding, sizeof(__pyx_k_binding), 0, 0, 1, 1},
  {&__pyx_n_s_bitmap, __pyx_k_bitmap, sizeof(__pyx_k_bitmap), 0, 0, 1, 1},
  {&__pyx_kp_u_bloom, __pyx_k_bloom, sizeof(__pyx_k_bloom), 0, 1, 0, 0},
  {&__pyx_n_s_bloom_2, __pyx_k_bloom_2, sizeof(__pyx_k_bloom_2), 0, 0, 1, 1},
  {&__pyx_n_s_bone_ids, __pyx_k_bone_ids, sizeof(__pyx_k_bone_ids), 0, 0, 1, 1},
  {&__pyx_n_s_bone_wieghts, __pyx_k_bone_wieghts, sizeof(__pyx_k_bone_wieghts), 0, 0, 1, 1},
  {&__pyx_n_s_bottom, __pyx_k_bottom, sizeof(__pyx_k_bottom), 0, 0, 1, 1},
  {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1},
  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
  {&__pyx_n_s_c_font_character, __pyx_k_c_font_character, sizeof(__pyx_k_c_font_character), 0, 0, 1, 1},
  {&__pyx_n_s_c_framebuffer, __pyx_k_c_framebuffer, sizeof(__pyx_k_c_framebuffer), 0, 0, 1, 1},
  {&__pyx_n_s_c_indices, __pyx_k_c_indices, sizeof(__pyx_k_c_indices), 0, 0, 1, 1},
  {&__pyx_n_s_c_mesh, __pyx_k_c_mesh, sizeof(__pyx_k_c_mesh), 0, 0, 1, 1},
  {&__pyx_n_s_c_num_indices, __pyx_k_c_num_indices, sizeof(__pyx_k_c_num_indices), 0, 0, 1, 1},
  {&__pyx_n_s_c_points, __pyx_k_c_points, sizeof(__pyx_k_c_points), 0, 0, 1, 1},
  {&__pyx_n_s_c_probabilities, __pyx_k_c_probabilities, sizeof(__pyx_k_c_probabilities), 0, 0, 1, 1},
  {&__pyx_n_s_c_texture, __pyx_k_c_texture, sizeof(__pyx_k_c_texture), 0, 0, 1, 1},
  {&__pyx_n_s_c_vertex, __pyx_k_c_vertex, sizeof(__pyx_k_c_vertex), 0, 0, 1, 1},
  {&__pyx_n_s_c_vertices, __pyx_k_c_vertices, sizeof(__pyx_k_c_vertices), 0, 0, 1, 1},
  {&__pyx_n_s_c_x, __pyx_k_c_x, sizeof(__pyx_k_c_x), 0, 0, 1, 1},
  {&__pyx_n_s_c_y, __pyx_k_c_y, sizeof(__pyx_k_c_y), 0, 0, 1, 1},
  {&__pyx_n_s_calc_adjugate, __pyx_k_calc_adjugate, sizeof(__pyx_k_calc_adjugate), 0, 0, 1, 1},
  {&__pyx_n_s_calc_inverse, __pyx_k_calc_inverse, sizeof(__pyx_k_calc_inverse), 0, 0, 1, 1},
  {&__pyx_n_s_calc_transpose, __pyx_k_calc_transpose, sizeof(__pyx_k_calc_transpose), 0, 0, 1, 1},
  {&__pyx_n_s_calculate_bounding_box, __pyx_k_calculate_bounding_box, sizeof(__pyx_k_calculate_bounding_box), 0, 0, 1, 1},
  {&__pyx_n_s_calculate_bounding_square, __pyx_k_calculate_bounding_square, sizeof(__pyx_k_calculate_bounding_square), 0, 0, 1, 1},
  {&__pyx_n_s_calculate_circumcircle, __pyx_k_calculate_circumcircle, sizeof(__pyx_k_calculate_circumcircle), 0, 0, 1, 1},
  {&__pyx_n_s_calculate_super_triangle, __pyx_k_calculate_super_triangle, sizeof(__pyx_k_calculate_super_triangle), 0, 0, 1, 1},
  {&__pyx_n_s_center, __pyx_k_center, sizeof(__pyx_k_center), 0, 0, 1, 1},
  {&__pyx_n_s_cgl, __pyx_k_cgl, sizeof(__pyx_k_cgl), 0, 0, 1, 1},
  {&__pyx_kp_s_cgl_wrapper_pyx, __pyx_k_cgl_wrapper_pyx, sizeof(__pyx_k_cgl_wrapper_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_ch, __pyx_k_ch, sizeof(__pyx_k_ch), 0, 0, 1, 1},
  {&__pyx_n_s_channels, __pyx_k_channels, sizeof(__pyx_k_channels), 0, 0, 1, 1},
  {&__pyx_n_s_circle_radius, __pyx_k_circle_radius, sizeof(__pyx_k_circle_radius), 0, 0, 1, 1},
  {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1},
  {&__pyx_n_s_clear_console, __pyx_k_clear_console, sizeof(__pyx_k_clear_console), 0, 0, 1, 1},
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
  {&__pyx_n_s_close_callback, __pyx_k_close_callback, sizeof(__pyx_k_close_callback), 0, 0, 1, 1},
  {&__pyx_n_s_cls, __pyx_k_cls, sizeof(__pyx_k_cls), 0, 0, 1, 1},
  {&__pyx_n_s_color, __pyx_k_color, sizeof(__pyx_k_color), 0, 0, 1, 1},
  {&__pyx_n_s_column, __pyx_k_column, sizeof(__pyx_k_column), 0, 0, 1, 1},
  {&__pyx_n_s_complete_char, __pyx_k_complete_char, sizeof(__pyx_k_complete_char), 0, 0, 1, 1},
  {&__pyx_n_s_console_progress_bar, __pyx_k_console_progress_bar, sizeof(__pyx_k_console_progress_bar), 0, 0, 1, 1},
  {&__pyx_n_s_console_set_color, __pyx_k_console_set_color, sizeof(__pyx_k_console_set_color), 0, 0, 1, 1},
  {&__pyx_n_s_control_1, __pyx_k_control_1, sizeof(__pyx_k_control_1), 0, 0, 1, 1},
  {&__pyx_n_s_control_1_x, __pyx_k_control_1_x, sizeof(__pyx_k_control_1_x), 0, 0, 1, 1},
  {&__pyx_n_s_control_1_y, __pyx_k_control_1_y, sizeof(__pyx_k_control_1_y), 0, 0, 1, 1},
  {&__pyx_n_s_control_2, __pyx_k_control_2, sizeof(__pyx_k_control_2), 0, 0, 1, 1},
  {&__pyx_n_s_control_2_x, __pyx_k_control_2_x, sizeof(__pyx_k_control_2_x), 0, 0, 1, 1},
  {&__pyx_n_s_control_2_y, __pyx_k_control_2_y, sizeof(__pyx_k_control_2_y), 0, 0, 1, 1},
  {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
  {&__pyx_n_s_create_context, __pyx_k_create_context, sizeof(__pyx_k_create_context), 0, 0, 1, 1},
  {&__pyx_n_s_ctx, __pyx_k_ctx, sizeof(__pyx_k_ctx), 0, 0, 1, 1},
  {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
  {&__pyx_n_s_d_x, __pyx_k_d_x, sizeof(__pyx_k_d_x), 0, 0, 1, 1},
  {&__pyx_n_s_d_y, __pyx_k_d_y, sizeof(__pyx_k_d_y), 0, 0, 1, 1},
  {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_decorated, __pyx_k_decorated, sizeof(__pyx_k_decorated), 0, 0, 1, 1},
  {&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1},
  {&__pyx_n_s_deg, __pyx_k_deg, sizeof(__pyx_k_deg), 0, 0, 1, 1},
  {&__pyx_n_s_deg_to_rad, __pyx_k_deg_to_rad, sizeof(__pyx_k_deg_to_rad), 0, 0, 1, 1},
  {&__pyx_n_s_depth, __pyx_k_depth, sizeof(__pyx_k_depth), 0, 0, 1, 1},
  {&__pyx_n_s_destroy, __pyx_k_destroy, sizeof(__pyx_k_destroy), 0, 0, 1, 1},
  {&__pyx_n_s_destroy_context, __pyx_k_destroy_context, sizeof(__pyx_k_destroy_context), 0, 0, 1, 1},
  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
  {&__pyx_n_s_disable_diffuse_shading, __pyx_k_disable_diffuse_shading, sizeof(__pyx_k_disable_diffuse_shading), 0, 0, 1, 1},
  {&__pyx_n_s_drag_n_drop_callback, __pyx_k_drag_n_drop_callback, sizeof(__pyx_k_drag_n_drop_callback), 0, 0, 1, 1},
  {&__pyx_n_s_dst, __pyx_k_dst, sizeof(__pyx_k_dst), 0, 0, 1, 1},
  {&__pyx_n_s_dst_offset, __pyx_k_dst_offset, sizeof(__pyx_k_dst_offset), 0, 0, 1, 1},
  {&__pyx_n_s_enable_console_logging, __pyx_k_enable_console_logging, sizeof(__pyx_k_enable_console_logging), 0, 0, 1, 1},
  {&__pyx_n_s_enable_diffuse_shading, __pyx_k_enable_diffuse_shading, sizeof(__pyx_k_enable_diffuse_shading), 0, 0, 1, 1},
  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
  {&__pyx_n_s_end_angle, __pyx_k_end_angle, sizeof(__pyx_k_end_angle), 0, 0, 1, 1},
  {&__pyx_n_s_end_x, __pyx_k_end_x, sizeof(__pyx_k_end_x), 0, 0, 1, 1},
  {&__pyx_n_s_end_y, __pyx_k_end_y, sizeof(__pyx_k_end_y), 0, 0, 1, 1},
  {&__pyx_n_s_enebled, __pyx_k_enebled, sizeof(__pyx_k_enebled), 0, 0, 1, 1},
  {&__pyx_n_s_eye, __pyx_k_eye, sizeof(__pyx_k_eye), 0, 0, 1, 1},
  {&__pyx_n_s_f_radius, __pyx_k_f_radius, sizeof(__pyx_k_f_radius), 0, 0, 1, 1},
  {&__pyx_n_s_face, __pyx_k_face, sizeof(__pyx_k_face), 0, 0, 1, 1},
  {&__pyx_n_s_far, __pyx_k_far, sizeof(__pyx_k_far), 0, 0, 1, 1},
  {&__pyx_n_u_file_font, __pyx_k_file_font, sizeof(__pyx_k_file_font), 0, 1, 0, 1},
  {&__pyx_n_s_float_cubic_lerp, __pyx_k_float_cubic_lerp, sizeof(__pyx_k_float_cubic_lerp), 0, 0, 1, 1},
  {&__pyx_n_s_float_lerp, __pyx_k_float_lerp, sizeof(__pyx_k_float_lerp), 0, 0, 1, 1},
  {&__pyx_n_s_float_quadratic_lerp, __pyx_k_float_quadratic_lerp, sizeof(__pyx_k_float_quadratic_lerp), 0, 0, 1, 1},
  {&__pyx_n_s_flush, __pyx_k_flush, sizeof(__pyx_k_flush), 0, 0, 1, 1},
  {&__pyx_n_s_flush_if_required, __pyx_k_flush_if_required, sizeof(__pyx_k_flush_if_required), 0, 0, 1, 1},
  {&__pyx_n_s_font, __pyx_k_font, sizeof(__pyx_k_font), 0, 0, 1, 1},
  {&__pyx_kp_u_font_character, __pyx_k_font_character, sizeof(__pyx_k_font_character), 0, 1, 0, 0},
  {&__pyx_n_s_font_character_2, __pyx_k_font_character_2, sizeof(__pyx_k_font_character_2), 0, 0, 1, 1},
  {&__pyx_n_s_font_size, __pyx_k_font_size, sizeof(__pyx_k_font_size), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_formatf, __pyx_k_formatf, sizeof(__pyx_k_formatf), 0, 0, 1, 1},
  {&__pyx_n_s_fov, __pyx_k_fov, sizeof(__pyx_k_fov), 0, 0, 1, 1},
  {&__pyx_kp_u_fractal_type, __pyx_k_fractal_type, sizeof(__pyx_k_fractal_type), 0, 1, 0, 0},
  {&__pyx_n_s_fractal_type_2, __pyx_k_fractal_type_2, sizeof(__pyx_k_fractal_type_2), 0, 0, 1, 1},
  {&__pyx_n_s_fragment_shader_path, __pyx_k_fragment_shader_path, sizeof(__pyx_k_fragment_shader_path), 0, 0, 1, 1},
  {&__pyx_n_s_fragment_shader_source, __pyx_k_fragment_shader_source, sizeof(__pyx_k_fragment_shader_source), 0, 0, 1, 1},
  {&__pyx_kp_u_framebuffer, __pyx_k_framebuffer, sizeof(__pyx_k_framebuffer), 0, 1, 0, 0},
  {&__pyx_n_s_framebuffer_2, __pyx_k_framebuffer_2, sizeof(__pyx_k_framebuffer_2), 0, 0, 1, 1},
  {&__pyx_n_s_framebuffer_create, __pyx_k_framebuffer_create, sizeof(__pyx_k_framebuffer_create), 0, 0, 1, 1},
  {&__pyx_n_s_framebuffer_create_basic, __pyx_k_framebuffer_create_basic, sizeof(__pyx_k_framebuffer_create_basic), 0, 0, 1, 1},
  {&__pyx_n_s_framebuffer_create_from_default, __pyx_k_framebuffer_create_from_default, sizeof(__pyx_k_framebuffer_create_from_default), 0, 0, 1, 1},
  {&__pyx_n_s_framebuffer_size_callback, __pyx_k_framebuffer_size_callback, sizeof(__pyx_k_framebuffer_size_callback), 0, 0, 1, 1},
  {&__pyx_n_s_free, __pyx_k_free, sizeof(__pyx_k_free), 0, 0, 1, 1},
  {&__pyx_kp_u_frequency, __pyx_k_frequency, sizeof(__pyx_k_frequency), 0, 1, 0, 0},
  {&__pyx_n_s_frequency_2, __pyx_k_frequency_2, sizeof(__pyx_k_frequency_2), 0, 0, 1, 1},
  {&__pyx_n_s_front, __pyx_k_front, sizeof(__pyx_k_front), 0, 0, 1, 1},
  {&__pyx_n_s_function_name, __pyx_k_function_name, sizeof(__pyx_k_function_name), 0, 0, 1, 1},
  {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1},
  {&__pyx_kp_u_gain, __pyx_k_gain, sizeof(__pyx_k_gain), 0, 1, 0, 0},
  {&__pyx_n_s_gain_2, __pyx_k_gain_2, sizeof(__pyx_k_gain_2), 0, 0, 1, 1},
  {&__pyx_n_s_get_auto_upload, __pyx_k_get_auto_upload, sizeof(__pyx_k_get_auto_upload), 0, 0, 1, 1},
  {&__pyx_n_s_get_current_context, __pyx_k_get_current_context, sizeof(__pyx_k_get_current_context), 0, 0, 1, 1},
  {&__pyx_n_s_get_id, __pyx_k_get_id, sizeof(__pyx_k_get_id), 0, 0, 1, 1},
  {&__pyx_n_s_get_internal_handle, __pyx_k_get_internal_handle, sizeof(__pyx_k_get_internal_handle), 0, 0, 1, 1},
  {&__pyx_n_s_get_position, __pyx_k_get_position, sizeof(__pyx_k_get_position), 0, 0, 1, 1},
  {&__pyx_n_s_get_size, __pyx_k_get_size, sizeof(__pyx_k_get_size), 0, 0, 1, 1},
  {&__pyx_n_s_get_uniform_location, __pyx_k_get_uniform_location, sizeof(__pyx_k_get_uniform_location), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_gjk_check_collision_2d, __pyx_k_gjk_check_collision_2d, sizeof(__pyx_k_gjk_check_collision_2d), 0, 0, 1, 1},
  {&__pyx_n_s_gjk_default_support, __pyx_k_gjk_default_support, sizeof(__pyx_k_gjk_default_support), 0, 0, 1, 1},
  {&__pyx_n_s_gjk_epa_2d, __pyx_k_gjk_epa_2d, sizeof(__pyx_k_gjk_epa_2d), 0, 0, 1, 1},
  {&__pyx_n_s_gjk_shape_default_support, __pyx_k_gjk_shape_default_support, sizeof(__pyx_k_gjk_shape_default_support), 0, 0, 1, 1},
  {&__pyx_n_s_gl_clear, __pyx_k_gl_clear, sizeof(__pyx_k_gl_clear), 0, 0, 1, 1},
  {&__pyx_n_s_gl_init, __pyx_k_gl_init, sizeof(__pyx_k_gl_init), 0, 0, 1, 1},
  {&__pyx_n_s_gl_render_screen_quad, __pyx_k_gl_render_screen_quad, sizeof(__pyx_k_gl_render_screen_quad), 0, 0, 1, 1},
  {&__pyx_n_s_gl_shutdown, __pyx_k_gl_shutdown, sizeof(__pyx_k_gl_shutdown), 0, 0, 1, 1},
  {&__pyx_n_s_height, __pyx_k_height, sizeof(__pyx_k_height), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_kp_u_image, __pyx_k_image, sizeof(__pyx_k_image), 0, 1, 0, 0},
  {&__pyx_n_s_image_2, __pyx_k_image_2, sizeof(__pyx_k_image_2), 0, 0, 1, 1},
  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_incomplete_char, __pyx_k_incomplete_char, sizeof(__pyx_k_incomplete_char), 0, 0, 1, 1},
  {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
  {&__pyx_n_s_index_count, __pyx_k_index_count, sizeof(__pyx_k_index_count), 0, 0, 1, 1},
  {&__pyx_n_s_index_count_used, __pyx_k_index_count_used, sizeof(__pyx_k_index_count_used), 0, 0, 1, 1},
  {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1},
  {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
  {&__pyx_n_s_internal_format, __pyx_k_internal_format, sizeof(__pyx_k_internal_format), 0, 0, 1, 1},
  {&__pyx_n_s_is_point_in_circle, __pyx_k_is_point_in_circle, sizeof(__pyx_k_is_point_in_circle), 0, 0, 1, 1},
  {&__pyx_n_s_is_point_in_triangle, __pyx_k_is_point_in_triangle, sizeof(__pyx_k_is_point_in_triangle), 0, 0, 1, 1},
  {&__pyx_n_s_is_square, __pyx_k_is_square, sizeof(__pyx_k_is_square), 0, 0, 1, 1},
  {&__pyx_n_s_iterations, __pyx_k_iterations, sizeof(__pyx_k_iterations), 0, 0, 1, 1},
  {&__pyx_kp_u_ivec4, __pyx_k_ivec4, sizeof(__pyx_k_ivec4), 0, 1, 0, 0},
  {&__pyx_n_s_ivec4_2, __pyx_k_ivec4_2, sizeof(__pyx_k_ivec4_2), 0, 0, 1, 1},
  {&__pyx_n_s_key_callback, __pyx_k_key_callback, sizeof(__pyx_k_key_callback), 0, 0, 1, 1},
  {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1},
  {&__pyx_n_s_l_obj, __pyx_k_l_obj, sizeof(__pyx_k_l_obj), 0, 0, 1, 1},
  {&__pyx_kp_u_lacunarity, __pyx_k_lacunarity, sizeof(__pyx_k_lacunarity), 0, 1, 0, 0},
  {&__pyx_n_s_lacunarity_2, __pyx_k_lacunarity_2, sizeof(__pyx_k_lacunarity_2), 0, 0, 1, 1},
  {&__pyx_n_s_layer, __pyx_k_layer, sizeof(__pyx_k_layer), 0, 0, 1, 1},
  {&__pyx_n_s_left, __pyx_k_left, sizeof(__pyx_k_left), 0, 0, 1, 1},
  {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
  {&__pyx_n_s_length_squared, __pyx_k_length_squared, sizeof(__pyx_k_length_squared), 0, 0, 1, 1},
  {&__pyx_n_s_level, __pyx_k_level, sizeof(__pyx_k_level), 0, 0, 1, 1},
  {&__pyx_n_s_light_color, __pyx_k_light_color, sizeof(__pyx_k_light_color), 0, 0, 1, 1},
  {&__pyx_n_s_light_pos, __pyx_k_light_pos, sizeof(__pyx_k_light_pos), 0, 0, 1, 1},
  {&__pyx_n_s_load_object, __pyx_k_load_object, sizeof(__pyx_k_load_object), 0, 0, 1, 1},
  {&__pyx_n_s_log_error, __pyx_k_log_error, sizeof(__pyx_k_log_error), 0, 0, 1, 1},
  {&__pyx_n_s_log_format, __pyx_k_log_format, sizeof(__pyx_k_log_format), 0, 0, 1, 1},
  {&__pyx_n_s_log_info, __pyx_k_log_info, sizeof(__pyx_k_log_info), 0, 0, 1, 1},
  {&__pyx_n_s_log_internal, __pyx_k_log_internal, sizeof(__pyx_k_log_internal), 0, 0, 1, 1},
  {&__pyx_n_s_log_trace, __pyx_k_log_trace, sizeof(__pyx_k_log_trace), 0, 0, 1, 1},
  {&__pyx_n_s_log_warn, __pyx_k_log_warn, sizeof(__pyx_k_log_warn), 0, 0, 1, 1},
  {&__pyx_n_s_logger_attach_log_file, __pyx_k_logger_attach_log_file, sizeof(__pyx_k_logger_attach_log_file), 0, 0, 1, 1},
  {&__pyx_n_s_logger_detach_log_file, __pyx_k_logger_detach_log_file, sizeof(__pyx_k_logger_detach_log_file), 0, 0, 1, 1},
  {&__pyx_n_s_logger_disable_console_logging, __pyx_k_logger_disable_console_logging, sizeof(__pyx_k_logger_disable_console_logging), 0, 0, 1, 1},
  {&__pyx_n_s_logger_enable_console_logging, __pyx_k_logger_enable_console_logging, sizeof(__pyx_k_logger_enable_console_logging), 0, 0, 1, 1},
  {&__pyx_n_s_logger_flush, __pyx_k_logger_flush, sizeof(__pyx_k_logger_flush), 0, 0, 1, 1},
  {&__pyx_n_s_logger_init, __pyx_k_logger_init, sizeof(__pyx_k_logger_init), 0, 0, 1, 1},
  {&__pyx_n_s_logger_log, __pyx_k_logger_log, sizeof(__pyx_k_logger_log), 0, 0, 1, 1},
  {&__pyx_n_s_logger_shutdown, __pyx_k_logger_shutdown, sizeof(__pyx_k_logger_shutdown), 0, 0, 1, 1},
  {&__pyx_n_s_m, __pyx_k_m, sizeof(__pyx_k_m), 0, 0, 1, 1},
  {&__pyx_n_s_maax, __pyx_k_maax, sizeof(__pyx_k_maax), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_mat, __pyx_k_mat, sizeof(__pyx_k_mat), 0, 0, 1, 1},
  {&__pyx_n_s_mat4, __pyx_k_mat4, sizeof(__pyx_k_mat4), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_adjoint, __pyx_k_mat4_adjoint, sizeof(__pyx_k_mat4_adjoint), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_decompose_lu, __pyx_k_mat4_decompose_lu, sizeof(__pyx_k_mat4_decompose_lu), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_det, __pyx_k_mat4_det, sizeof(__pyx_k_mat4_det), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_det_by_gauss, __pyx_k_mat4_det_by_gauss, sizeof(__pyx_k_mat4_det_by_gauss), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_det_by_lu, __pyx_k_mat4_det_by_lu, sizeof(__pyx_k_mat4_det_by_lu), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_gauss_elim, __pyx_k_mat4_gauss_elim, sizeof(__pyx_k_mat4_gauss_elim), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_identity, __pyx_k_mat4_identity, sizeof(__pyx_k_mat4_identity), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_inverse, __pyx_k_mat4_inverse, sizeof(__pyx_k_mat4_inverse), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_lerp, __pyx_k_mat4_lerp, sizeof(__pyx_k_mat4_lerp), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_look_at, __pyx_k_mat4_look_at, sizeof(__pyx_k_mat4_look_at), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_mul, __pyx_k_mat4_mul, sizeof(__pyx_k_mat4_mul), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_mul_vec4, __pyx_k_mat4_mul_vec4, sizeof(__pyx_k_mat4_mul_vec4), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_orthographic, __pyx_k_mat4_orthographic, sizeof(__pyx_k_mat4_orthographic), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_perspective, __pyx_k_mat4_perspective, sizeof(__pyx_k_mat4_perspective), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_rank, __pyx_k_mat4_rank, sizeof(__pyx_k_mat4_rank), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_rotate_about_axis, __pyx_k_mat4_rotate_about_axis, sizeof(__pyx_k_mat4_rotate_about_axis), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_rotate_x, __pyx_k_mat4_rotate_x, sizeof(__pyx_k_mat4_rotate_x), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_rotate_y, __pyx_k_mat4_rotate_y, sizeof(__pyx_k_mat4_rotate_y), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_rotate_z, __pyx_k_mat4_rotate_z, sizeof(__pyx_k_mat4_rotate_z), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_scale, __pyx_k_mat4_scale, sizeof(__pyx_k_mat4_scale), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_trace, __pyx_k_mat4_trace, sizeof(__pyx_k_mat4_trace), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_translate, __pyx_k_mat4_translate, sizeof(__pyx_k_mat4_translate), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_transpose, __pyx_k_mat4_transpose, sizeof(__pyx_k_mat4_transpose), 0, 0, 1, 1},
  {&__pyx_n_s_mat4_zero, __pyx_k_mat4_zero, sizeof(__pyx_k_mat4_zero), 0, 0, 1, 1},
  {&__pyx_kp_s_mat4x4, __pyx_k_mat4x4, sizeof(__pyx_k_mat4x4), 0, 0, 1, 0},
  {&__pyx_kp_s_matrix, __pyx_k_matrix, sizeof(__pyx_k_matrix), 0, 0, 1, 0},
  {&__pyx_n_s_matrix_2, __pyx_k_matrix_2, sizeof(__pyx_k_matrix_2), 0, 0, 1, 1},
  {&__pyx_n_s_max_axes, __pyx_k_max_axes, sizeof(__pyx_k_max_axes), 0, 0, 1, 1},
  {&__pyx_n_s_max_indices, __pyx_k_max_indices, sizeof(__pyx_k_max_indices), 0, 0, 1, 1},
  {&__pyx_n_s_max_size, __pyx_k_max_size, sizeof(__pyx_k_max_size), 0, 0, 1, 1},
  {&__pyx_n_s_max_vertices, __pyx_k_max_vertices, sizeof(__pyx_k_max_vertices), 0, 0, 1, 1},
  {&__pyx_n_s_mean, __pyx_k_mean, sizeof(__pyx_k_mean), 0, 0, 1, 1},
  {&__pyx_n_s_memory_font, __pyx_k_memory_font, sizeof(__pyx_k_memory_font), 0, 0, 1, 1},
  {&__pyx_n_s_mesh, __pyx_k_mesh, sizeof(__pyx_k_mesh), 0, 0, 1, 1},
  {&__pyx_kp_u_mesh_cpu, __pyx_k_mesh_cpu, sizeof(__pyx_k_mesh_cpu), 0, 1, 0, 0},
  {&__pyx_n_s_mesh_cpu_2, __pyx_k_mesh_cpu_2, sizeof(__pyx_k_mesh_cpu_2), 0, 0, 1, 1},
  {&__pyx_n_s_mesh_cpu_create, __pyx_k_mesh_cpu_create, sizeof(__pyx_k_mesh_cpu_create), 0, 0, 1, 1},
  {&__pyx_n_s_mesh_cpu_cube, __pyx_k_mesh_cpu_cube, sizeof(__pyx_k_mesh_cpu_cube), 0, 0, 1, 1},
  {&__pyx_n_s_mesh_cpu_cylinder, __pyx_k_mesh_cpu_cylinder, sizeof(__pyx_k_mesh_cpu_cylinder), 0, 0, 1, 1},
  {&__pyx_n_s_mesh_cpu_load_obj, __pyx_k_mesh_cpu_load_obj, sizeof(__pyx_k_mesh_cpu_load_obj), 0, 0, 1, 1},
  {&__pyx_n_s_mesh_cpu_plane, __pyx_k_mesh_cpu_plane, sizeof(__pyx_k_mesh_cpu_plane), 0, 0, 1, 1},
  {&__pyx_n_s_mesh_cpu_quad, __pyx_k_mesh_cpu_quad, sizeof(__pyx_k_mesh_cpu_quad), 0, 0, 1, 1},
  {&__pyx_n_s_mesh_cpu_sphere, __pyx_k_mesh_cpu_sphere, sizeof(__pyx_k_mesh_cpu_sphere), 0, 0, 1, 1},
  {&__pyx_n_s_mesh_cpu_triangle, __pyx_k_mesh_cpu_triangle, sizeof(__pyx_k_mesh_cpu_triangle), 0, 0, 1, 1},
  {&__pyx_kp_u_mesh_gpu, __pyx_k_mesh_gpu, sizeof(__pyx_k_mesh_gpu), 0, 1, 0, 0},
  {&__pyx_n_s_mesh_gpu_2, __pyx_k_mesh_gpu_2, sizeof(__pyx_k_mesh_gpu_2), 0, 0, 1, 1},
  {&__pyx_kp_u_mesh_vertex, __pyx_k_mesh_vertex, sizeof(__pyx_k_mesh_vertex), 0, 1, 0, 0},
  {&__pyx_n_s_mesh_vertex_2, __pyx_k_mesh_vertex_2, sizeof(__pyx_k_mesh_vertex_2), 0, 0, 1, 1},
  {&__pyx_n_s_mian, __pyx_k_mian, sizeof(__pyx_k_mian), 0, 0, 1, 1},
  {&__pyx_n_s_milliseconds, __pyx_k_milliseconds, sizeof(__pyx_k_milliseconds), 0, 0, 1, 1},
  {&__pyx_n_s_mouse_button_callback, __pyx_k_mouse_button_callback, sizeof(__pyx_k_mouse_button_callback), 0, 0, 1, 1},
  {&__pyx_n_s_mouse_position_callback, __pyx_k_mouse_position_callback, sizeof(__pyx_k_mouse_position_callback), 0, 0, 1, 1},
  {&__pyx_n_s_mouse_scroll_callback, __pyx_k_mouse_scroll_callback, sizeof(__pyx_k_mouse_scroll_callback), 0, 0, 1, 1},
  {&__pyx_n_s_n, __pyx_k_n, sizeof(__pyx_k_n), 0, 0, 1, 1},
  {&__pyx_n_s_n_vector, __pyx_k_n_vector, sizeof(__pyx_k_n_vector), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
  {&__pyx_n_s_near, __pyx_k_near, sizeof(__pyx_k_near), 0, 0, 1, 1},
  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
  {&__pyx_n_s_noise_get, __pyx_k_noise_get, sizeof(__pyx_k_noise_get), 0, 0, 1, 1},
  {&__pyx_n_s_noise_init, __pyx_k_noise_init, sizeof(__pyx_k_noise_init), 0, 0, 1, 1},
  {&__pyx_n_s_noise_opensimplex, __pyx_k_noise_opensimplex, sizeof(__pyx_k_noise_opensimplex), 0, 0, 1, 1},
  {&__pyx_n_s_noise_opensimplex2s, __pyx_k_noise_opensimplex2s, sizeof(__pyx_k_noise_opensimplex2s), 0, 0, 1, 1},
  {&__pyx_n_s_noise_params, __pyx_k_noise_params, sizeof(__pyx_k_noise_params), 0, 0, 1, 1},
  {&__pyx_kp_u_noise_params_type, __pyx_k_noise_params_type, sizeof(__pyx_k_noise_params_type), 0, 1, 0, 0},
  {&__pyx_n_s_noise_perlin, __pyx_k_noise_perlin, sizeof(__pyx_k_noise_perlin), 0, 0, 1, 1},
  {&__pyx_n_s_noise_shutdown, __pyx_k_noise_shutdown, sizeof(__pyx_k_noise_shutdown), 0, 0, 1, 1},
  {&__pyx_n_s_noise_value, __pyx_k_noise_value, sizeof(__pyx_k_noise_value), 0, 0, 1, 1},
  {&__pyx_n_s_noise_valuecubic, __pyx_k_noise_valuecubic, sizeof(__pyx_k_noise_valuecubic), 0, 0, 1, 1},
  {&__pyx_n_s_noise_worley, __pyx_k_noise_worley, sizeof(__pyx_k_noise_worley), 0, 0, 1, 1},
  {&__pyx_n_s_normal, __pyx_k_normal, sizeof(__pyx_k_normal), 0, 0, 1, 1},
  {&__pyx_n_s_normalized_offset, __pyx_k_normalized_offset, sizeof(__pyx_k_normalized_offset), 0, 0, 1, 1},
  {&__pyx_n_s_normalized_size, __pyx_k_normalized_size, sizeof(__pyx_k_normalized_size), 0, 0, 1, 1},
  {&__pyx_n_s_not_loaded, __pyx_k_not_loaded, sizeof(__pyx_k_not_loaded), 0, 0, 1, 1},
  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
  {&__pyx_n_s_nt, __pyx_k_nt, sizeof(__pyx_k_nt), 0, 0, 1, 1},
  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
  {&__pyx_kp_u_octaves, __pyx_k_octaves, sizeof(__pyx_k_octaves), 0, 1, 0, 0},
  {&__pyx_n_s_octaves_2, __pyx_k_octaves_2, sizeof(__pyx_k_octaves_2), 0, 0, 1, 1},
  {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
  {&__pyx_n_s_offset_x, __pyx_k_offset_x, sizeof(__pyx_k_offset_x), 0, 0, 1, 1},
  {&__pyx_n_s_offset_y, __pyx_k_offset_y, sizeof(__pyx_k_offset_y), 0, 0, 1, 1},
  {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
  {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
  {&__pyx_n_s_overlap_amount, __pyx_k_overlap_amount, sizeof(__pyx_k_overlap_amount), 0, 0, 1, 1},
  {&__pyx_n_s_padding, __pyx_k_padding, sizeof(__pyx_k_padding), 0, 0, 1, 1},
  {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
  {&__pyx_kp_u_ping_pong_strength, __pyx_k_ping_pong_strength, sizeof(__pyx_k_ping_pong_strength), 0, 1, 0, 0},
  {&__pyx_n_s_ping_pong_strength_2, __pyx_k_ping_pong_strength_2, sizeof(__pyx_k_ping_pong_strength_2), 0, 0, 1, 1},
  {&__pyx_n_s_point, __pyx_k_point, sizeof(__pyx_k_point), 0, 0, 1, 1},
  {&__pyx_n_s_points, __pyx_k_points, sizeof(__pyx_k_points), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_n_s_position, __pyx_k_position, sizeof(__pyx_k_position), 0, 0, 1, 1},
  {&__pyx_n_s_position_x, __pyx_k_position_x, sizeof(__pyx_k_position_x), 0, 0, 1, 1},
  {&__pyx_n_s_position_y, __pyx_k_position_y, sizeof(__pyx_k_position_y), 0, 0, 1, 1},
  {&__pyx_n_s_prefix, __pyx_k_prefix, sizeof(__pyx_k_prefix), 0, 0, 1, 1},
  {&__pyx_n_s_printf_blue, __pyx_k_printf_blue, sizeof(__pyx_k_printf_blue), 0, 0, 1, 1},
  {&__pyx_n_s_printf_gray, __pyx_k_printf_gray, sizeof(__pyx_k_printf_gray), 0, 0, 1, 1},
  {&__pyx_n_s_printf_green, __pyx_k_printf_green, sizeof(__pyx_k_printf_green), 0, 0, 1, 1},
  {&__pyx_n_s_printf_red, __pyx_k_printf_red, sizeof(__pyx_k_printf_red), 0, 0, 1, 1},
  {&__pyx_n_s_probabilities, __pyx_k_probabilities, sizeof(__pyx_k_probabilities), 0, 0, 1, 1},
  {&__pyx_n_s_progress, __pyx_k_progress, sizeof(__pyx_k_progress), 0, 0, 1, 1},
  {&__pyx_n_s_ptr, __pyx_k_ptr, sizeof(__pyx_k_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_unpickle_widgets, __pyx_k_pyx_unpickle_widgets, sizeof(__pyx_k_pyx_unpickle_widgets), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
  {&__pyx_n_s_r_a, __pyx_k_r_a, sizeof(__pyx_k_r_a), 0, 0, 1, 1},
  {&__pyx_n_s_r_b, __pyx_k_r_b, sizeof(__pyx_k_r_b), 0, 0, 1, 1},
  {&__pyx_n_s_r_c, __pyx_k_r_c, sizeof(__pyx_k_r_c), 0, 0, 1, 1},
  {&__pyx_n_s_r_d, __pyx_k_r_d, sizeof(__pyx_k_r_d), 0, 0, 1, 1},
  {&__pyx_n_s_rad, __pyx_k_rad, sizeof(__pyx_k_rad), 0, 0, 1, 1},
  {&__pyx_n_s_rad_to_deg, __pyx_k_rad_to_deg, sizeof(__pyx_k_rad_to_deg), 0, 0, 1, 1},
  {&__pyx_n_s_radius, __pyx_k_radius, sizeof(__pyx_k_radius), 0, 0, 1, 1},
  {&__pyx_n_s_radius0, __pyx_k_radius0, sizeof(__pyx_k_radius0), 0, 0, 1, 1},
  {&__pyx_n_s_radius1, __pyx_k_radius1, sizeof(__pyx_k_radius1), 0, 0, 1, 1},
  {&__pyx_n_s_radius_x, __pyx_k_radius_x, sizeof(__pyx_k_radius_x), 0, 0, 1, 1},
  {&__pyx_n_s_radius_y, __pyx_k_radius_y, sizeof(__pyx_k_radius_y), 0, 0, 1, 1},
  {&__pyx_n_s_random, __pyx_k_random, sizeof(__pyx_k_random), 0, 0, 1, 1},
  {&__pyx_n_s_random_gaussian, __pyx_k_random_gaussian, sizeof(__pyx_k_random_gaussian), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
  {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
  {&__pyx_n_s_res_u, __pyx_k_res_u, sizeof(__pyx_k_res_u), 0, 0, 1, 1},
  {&__pyx_n_s_res_v, __pyx_k_res_v, sizeof(__pyx_k_res_v), 0, 0, 1, 1},
  {&__pyx_n_s_resolution, __pyx_k_resolution, sizeof(__pyx_k_resolution), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_right, __pyx_k_right, sizeof(__pyx_k_right), 0, 0, 1, 1},
  {&__pyx_n_s_rotation, __pyx_k_rotation, sizeof(__pyx_k_rotation), 0, 0, 1, 1},
  {&__pyx_kp_u_rotation_2, __pyx_k_rotation_2, sizeof(__pyx_k_rotation_2), 0, 1, 0, 0},
  {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
  {&__pyx_n_s_sat_collision_calculate_axes, __pyx_k_sat_collision_calculate_axes, sizeof(__pyx_k_sat_collision_calculate_axes), 0, 0, 1, 1},
  {&__pyx_n_s_sat_collision_detect, __pyx_k_sat_collision_detect, sizeof(__pyx_k_sat_collision_detect), 0, 0, 1, 1},
  {&__pyx_n_s_sat_collison_overlap_on_axis, __pyx_k_sat_collison_overlap_on_axis, sizeof(__pyx_k_sat_collison_overlap_on_axis), 0, 0, 1, 1},
  {&__pyx_n_s_scale, __pyx_k_scale, sizeof(__pyx_k_scale), 0, 0, 1, 1},
  {&__pyx_kp_u_scale_2, __pyx_k_scale_2, sizeof(__pyx_k_scale_2), 0, 1, 0, 0},
  {&__pyx_n_s_scale_x, __pyx_k_scale_x, sizeof(__pyx_k_scale_x), 0, 0, 1, 1},
  {&__pyx_n_s_scale_y, __pyx_k_scale_y, sizeof(__pyx_k_scale_y), 0, 0, 1, 1},
  {&__pyx_n_s_seed, __pyx_k_seed, sizeof(__pyx_k_seed), 0, 0, 1, 1},
  {&__pyx_n_s_segments, __pyx_k_segments, sizeof(__pyx_k_segments), 0, 0, 1, 1},
  {&__pyx_kp_s_self_c_bloom_cannot_be_converted, __pyx_k_self_c_bloom_cannot_be_converted, sizeof(__pyx_k_self_c_bloom_cannot_be_converted), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_font_cannot_be_converted, __pyx_k_self_c_font_cannot_be_converted, sizeof(__pyx_k_self_c_font_cannot_be_converted), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_framebuffer_cannot_be_con, __pyx_k_self_c_framebuffer_cannot_be_con, sizeof(__pyx_k_self_c_framebuffer_cannot_be_con), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_image_cannot_be_converted, __pyx_k_self_c_image_cannot_be_converted, sizeof(__pyx_k_self_c_image_cannot_be_converted), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_matrix_cannot_be_converte, __pyx_k_self_c_matrix_cannot_be_converte, sizeof(__pyx_k_self_c_matrix_cannot_be_converte), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_mesh_cannot_be_converted, __pyx_k_self_c_mesh_cannot_be_converted, sizeof(__pyx_k_self_c_mesh_cannot_be_converted), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_shader_cannot_be_converte, __pyx_k_self_c_shader_cannot_be_converte, sizeof(__pyx_k_self_c_shader_cannot_be_converte), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_shape_cannot_be_converted, __pyx_k_self_c_shape_cannot_be_converted, sizeof(__pyx_k_self_c_shape_cannot_be_converted), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_ssbo_cannot_be_converted, __pyx_k_self_c_ssbo_cannot_be_converted, sizeof(__pyx_k_self_c_ssbo_cannot_be_converted), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_texture_cannot_be_convert, __pyx_k_self_c_texture_cannot_be_convert, sizeof(__pyx_k_self_c_texture_cannot_be_convert), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_tilemap_cannot_be_convert, __pyx_k_self_c_tilemap_cannot_be_convert, sizeof(__pyx_k_self_c_tilemap_cannot_be_convert), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_ubo_cannot_be_converted_t, __pyx_k_self_c_ubo_cannot_be_converted_t, sizeof(__pyx_k_self_c_ubo_cannot_be_converted_t), 0, 0, 1, 0},
  {&__pyx_kp_s_self_c_window_cannot_be_converte, __pyx_k_self_c_window_cannot_be_converte, sizeof(__pyx_k_self_c_window_cannot_be_converte), 0, 0, 1, 0},
  {&__pyx_n_s_set_auto_upload, __pyx_k_set_auto_upload, sizeof(__pyx_k_set_auto_upload), 0, 0, 1, 1},
  {&__pyx_n_s_set_current_context, __pyx_k_set_current_context, sizeof(__pyx_k_set_current_context), 0, 0, 1, 1},
  {&__pyx_n_s_set_fill_color, __pyx_k_set_fill_color, sizeof(__pyx_k_set_fill_color), 0, 0, 1, 1},
  {&__pyx_n_s_set_fill_colorf, __pyx_k_set_fill_colorf, sizeof(__pyx_k_set_fill_colorf), 0, 0, 1, 1},
  {&__pyx_n_s_set_fill_mode, __pyx_k_set_fill_mode, sizeof(__pyx_k_set_fill_mode), 0, 0, 1, 1},
  {&__pyx_n_s_set_font_texture, __pyx_k_set_font_texture, sizeof(__pyx_k_set_font_texture), 0, 0, 1, 1},
  {&__pyx_n_s_set_model_matrix, __pyx_k_set_model_matrix, sizeof(__pyx_k_set_model_matrix), 0, 0, 1, 1},
  {&__pyx_n_s_set_projection_matrix, __pyx_k_set_projection_matrix, sizeof(__pyx_k_set_projection_matrix), 0, 0, 1, 1},
  {&__pyx_n_s_set_stroke_color, __pyx_k_set_stroke_color, sizeof(__pyx_k_set_stroke_color), 0, 0, 1, 1},
  {&__pyx_n_s_set_stroke_colorf, __pyx_k_set_stroke_colorf, sizeof(__pyx_k_set_stroke_colorf), 0, 0, 1, 1},
  {&__pyx_n_s_set_stroke_thickness, __pyx_k_set_stroke_thickness, sizeof(__pyx_k_set_stroke_thickness), 0, 0, 1, 1},
  {&__pyx_n_s_set_texture, __pyx_k_set_texture, sizeof(__pyx_k_set_texture), 0, 0, 1, 1},
  {&__pyx_n_s_set_texture_coordinate_so, __pyx_k_set_texture_coordinate_so, sizeof(__pyx_k_set_texture_coordinate_so), 0, 0, 1, 1},
  {&__pyx_n_s_set_view_matrix, __pyx_k_set_view_matrix, sizeof(__pyx_k_set_view_matrix), 0, 0, 1, 1},
  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
  {&__pyx_kp_u_shader, __pyx_k_shader, sizeof(__pyx_k_shader), 0, 1, 0, 0},
  {&__pyx_n_s_shader_2, __pyx_k_shader_2, sizeof(__pyx_k_shader_2), 0, 0, 1, 1},
  {&__pyx_kp_u_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 1, 0, 0},
  {&__pyx_n_s_shape_2, __pyx_k_shape_2, sizeof(__pyx_k_shape_2), 0, 0, 1, 1},
  {&__pyx_n_s_shd, __pyx_k_shd, sizeof(__pyx_k_shd), 0, 0, 1, 1},
  {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
  {&__pyx_n_s_simplex, __pyx_k_simplex, sizeof(__pyx_k_simplex), 0, 0, 1, 1},
  {&__pyx_n_s_simplex_out, __pyx_k_simplex_out, sizeof(__pyx_k_simplex_out), 0, 0, 1, 1},
  {&__pyx_n_s_simplex_out_ptr, __pyx_k_simplex_out_ptr, sizeof(__pyx_k_simplex_out_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_simplex_ptr, __pyx_k_simplex_ptr, sizeof(__pyx_k_simplex_ptr), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_size_x, __pyx_k_size_x, sizeof(__pyx_k_size_x), 0, 0, 1, 1},
  {&__pyx_n_s_size_y, __pyx_k_size_y, sizeof(__pyx_k_size_y), 0, 0, 1, 1},
  {&__pyx_n_s_src, __pyx_k_src, sizeof(__pyx_k_src), 0, 0, 1, 1},
  {&__pyx_n_s_src_offset, __pyx_k_src_offset, sizeof(__pyx_k_src_offset), 0, 0, 1, 1},
  {&__pyx_kp_u_ssbo, __pyx_k_ssbo, sizeof(__pyx_k_ssbo), 0, 1, 0, 0},
  {&__pyx_n_s_ssbo_2, __pyx_k_ssbo_2, sizeof(__pyx_k_ssbo_2), 0, 0, 1, 1},
  {&__pyx_n_s_ssbo_binding, __pyx_k_ssbo_binding, sizeof(__pyx_k_ssbo_binding), 0, 0, 1, 1},
  {&__pyx_n_s_ssbo_copy, __pyx_k_ssbo_copy, sizeof(__pyx_k_ssbo_copy), 0, 0, 1, 1},
  {&__pyx_n_s_st, __pyx_k_st, sizeof(__pyx_k_st), 0, 0, 1, 1},
  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
  {&__pyx_n_s_start_angle, __pyx_k_start_angle, sizeof(__pyx_k_start_angle), 0, 0, 1, 1},
  {&__pyx_n_s_start_x, __pyx_k_start_x, sizeof(__pyx_k_start_x), 0, 0, 1, 1},
  {&__pyx_n_s_start_y, __pyx_k_start_y, sizeof(__pyx_k_start_y), 0, 0, 1, 1},
  {&__pyx_n_s_static_draw, __pyx_k_static_draw, sizeof(__pyx_k_static_draw), 0, 0, 1, 1},
  {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
  {&__pyx_n_s_std_dev, __pyx_k_std_dev, sizeof(__pyx_k_std_dev), 0, 0, 1, 1},
  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
  {&__pyx_n_s_suffix, __pyx_k_suffix, sizeof(__pyx_k_suffix), 0, 0, 1, 1},
  {&__pyx_n_s_sx, __pyx_k_sx, sizeof(__pyx_k_sx), 0, 0, 1, 1},
  {&__pyx_n_s_sy, __pyx_k_sy, sizeof(__pyx_k_sy), 0, 0, 1, 1},
  {&__pyx_n_s_system, __pyx_k_system, sizeof(__pyx_k_system), 0, 0, 1, 1},
  {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
  {&__pyx_n_s_t0, __pyx_k_t0, sizeof(__pyx_k_t0), 0, 0, 1, 1},
  {&__pyx_n_s_t1, __pyx_k_t1, sizeof(__pyx_k_t1), 0, 0, 1, 1},
  {&__pyx_n_s_target, __pyx_k_target, sizeof(__pyx_k_target), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_tex, __pyx_k_tex, sizeof(__pyx_k_tex), 0, 0, 1, 1},
  {&__pyx_n_s_text_init, __pyx_k_text_init, sizeof(__pyx_k_text_init), 0, 0, 1, 1},
  {&__pyx_n_s_text_shutdown, __pyx_k_text_shutdown, sizeof(__pyx_k_text_shutdown), 0, 0, 1, 1},
  {&__pyx_kp_u_texture, __pyx_k_texture, sizeof(__pyx_k_texture), 0, 1, 0, 0},
  {&__pyx_n_s_texture_2, __pyx_k_texture_2, sizeof(__pyx_k_texture_2), 0, 0, 1, 1},
  {&__pyx_n_s_texture_coordinates, __pyx_k_texture_coordinates, sizeof(__pyx_k_texture_coordinates), 0, 0, 1, 1},
  {&__pyx_n_s_texture_creae_3d, __pyx_k_texture_creae_3d, sizeof(__pyx_k_texture_creae_3d), 0, 0, 1, 1},
  {&__pyx_n_s_texture_create_array, __pyx_k_texture_create_array, sizeof(__pyx_k_texture_create_array), 0, 0, 1, 1},
  {&__pyx_n_s_texture_create_blank, __pyx_k_texture_create_blank, sizeof(__pyx_k_texture_create_blank), 0, 0, 1, 1},
  {&__pyx_n_s_texture_create_cubemap, __pyx_k_texture_create_cubemap, sizeof(__pyx_k_texture_create_cubemap), 0, 0, 1, 1},
  {&__pyx_n_s_texture_create_from_image, __pyx_k_texture_create_from_image, sizeof(__pyx_k_texture_create_from_image), 0, 0, 1, 1},
  {&__pyx_n_s_texture_dst, __pyx_k_texture_dst, sizeof(__pyx_k_texture_dst), 0, 0, 1, 1},
  {&__pyx_n_s_texture_index, __pyx_k_texture_index, sizeof(__pyx_k_texture_index), 0, 0, 1, 1},
  {&__pyx_n_s_texture_src, __pyx_k_texture_src, sizeof(__pyx_k_texture_src), 0, 0, 1, 1},
  {&__pyx_n_s_texture_x_max, __pyx_k_texture_x_max, sizeof(__pyx_k_texture_x_max), 0, 0, 1, 1},
  {&__pyx_n_s_texture_x_min, __pyx_k_texture_x_min, sizeof(__pyx_k_texture_x_min), 0, 0, 1, 1},
  {&__pyx_n_s_texture_y_max, __pyx_k_texture_y_max, sizeof(__pyx_k_texture_y_max), 0, 0, 1, 1},
  {&__pyx_n_s_texture_y_min, __pyx_k_texture_y_min, sizeof(__pyx_k_texture_y_min), 0, 0, 1, 1},
  {&__pyx_n_s_theta, __pyx_k_theta, sizeof(__pyx_k_theta), 0, 0, 1, 1},
  {&__pyx_n_s_tile_count_x, __pyx_k_tile_count_x, sizeof(__pyx_k_tile_count_x), 0, 0, 1, 1},
  {&__pyx_n_s_tile_count_y, __pyx_k_tile_count_y, sizeof(__pyx_k_tile_count_y), 0, 0, 1, 1},
  {&__pyx_n_s_tile_size_x, __pyx_k_tile_size_x, sizeof(__pyx_k_tile_size_x), 0, 0, 1, 1},
  {&__pyx_n_s_tile_size_y, __pyx_k_tile_size_y, sizeof(__pyx_k_tile_size_y), 0, 0, 1, 1},
  {&__pyx_n_s_tile_x, __pyx_k_tile_x, sizeof(__pyx_k_tile_x), 0, 0, 1, 1},
  {&__pyx_n_s_tile_y, __pyx_k_tile_y, sizeof(__pyx_k_tile_y), 0, 0, 1, 1},
  {&__pyx_kp_u_tilemap, __pyx_k_tilemap, sizeof(__pyx_k_tilemap), 0, 1, 0, 0},
  {&__pyx_n_s_tilemap_2, __pyx_k_tilemap_2, sizeof(__pyx_k_tilemap_2), 0, 0, 1, 1},
  {&__pyx_n_s_title, __pyx_k_title, sizeof(__pyx_k_title), 0, 0, 1, 1},
  {&__pyx_n_s_tobytes, __pyx_k_tobytes, sizeof(__pyx_k_tobytes), 0, 0, 1, 1},
  {&__pyx_n_s_top, __pyx_k_top, sizeof(__pyx_k_top), 0, 0, 1, 1},
  {&__pyx_n_s_transform, __pyx_k_transform, sizeof(__pyx_k_transform), 0, 0, 1, 1},
  {&__pyx_kp_u_transform_position, __pyx_k_transform_position, sizeof(__pyx_k_transform_position), 0, 1, 0, 0},
  {&__pyx_n_s_triangulate_points_incremental, __pyx_k_triangulate_points_incremental, sizeof(__pyx_k_triangulate_points_incremental), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_typef, __pyx_k_typef, sizeof(__pyx_k_typef), 0, 0, 1, 1},
  {&__pyx_n_s_typing, __pyx_k_typing, sizeof(__pyx_k_typing), 0, 0, 1, 1},
  {&__pyx_n_s_u, __pyx_k_u, sizeof(__pyx_k_u), 0, 0, 1, 1},
  {&__pyx_n_s_u_obj, __pyx_k_u_obj, sizeof(__pyx_k_u_obj), 0, 0, 1, 1},
  {&__pyx_kp_u_ubo, __pyx_k_ubo, sizeof(__pyx_k_ubo), 0, 1, 0, 0},
  {&__pyx_n_s_ubo_2, __pyx_k_ubo_2, sizeof(__pyx_k_ubo_2), 0, 0, 1, 1},
  {&__pyx_n_s_uniform, __pyx_k_uniform, sizeof(__pyx_k_uniform), 0, 0, 1, 1},
  {&__pyx_n_s_up, __pyx_k_up, sizeof(__pyx_k_up), 0, 0, 1, 1},
  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
  {&__pyx_n_s_use_3d_tex_coords, __pyx_k_use_3d_tex_coords, sizeof(__pyx_k_use_3d_tex_coords), 0, 0, 1, 1},
  {&__pyx_n_s_use_texture_coordinates, __pyx_k_use_texture_coordinates, sizeof(__pyx_k_use_texture_coordinates), 0, 0, 1, 1},
  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
  {&__pyx_n_s_utils_append_file, __pyx_k_utils_append_file, sizeof(__pyx_k_utils_append_file), 0, 0, 1, 1},
  {&__pyx_n_s_utils_big_endian_to_current, __pyx_k_utils_big_endian_to_current, sizeof(__pyx_k_utils_big_endian_to_current), 0, 0, 1, 1},
  {&__pyx_n_s_utils_crc32, __pyx_k_utils_crc32, sizeof(__pyx_k_utils_crc32), 0, 0, 1, 1},
  {&__pyx_n_s_utils_crc64, __pyx_k_utils_crc64, sizeof(__pyx_k_utils_crc64), 0, 0, 1, 1},
  {&__pyx_n_s_utils_fast_rand, __pyx_k_utils_fast_rand, sizeof(__pyx_k_utils_fast_rand), 0, 0, 1, 1},
  {&__pyx_n_s_utils_fast_srand, __pyx_k_utils_fast_srand, sizeof(__pyx_k_utils_fast_srand), 0, 0, 1, 1},
  {&__pyx_n_s_utils_get_file_size, __pyx_k_utils_get_file_size, sizeof(__pyx_k_utils_get_file_size), 0, 0, 1, 1},
  {&__pyx_n_s_utils_get_random_with_probabilit, __pyx_k_utils_get_random_with_probabilit, sizeof(__pyx_k_utils_get_random_with_probabilit), 0, 0, 1, 1},
  {&__pyx_n_s_utils_get_time, __pyx_k_utils_get_time, sizeof(__pyx_k_utils_get_time), 0, 0, 1, 1},
  {&__pyx_n_s_utils_get_timestamp, __pyx_k_utils_get_timestamp, sizeof(__pyx_k_utils_get_timestamp), 0, 0, 1, 1},
  {&__pyx_n_s_utils_is_big_endian, __pyx_k_utils_is_big_endian, sizeof(__pyx_k_utils_is_big_endian), 0, 0, 1, 1},
  {&__pyx_n_s_utils_is_little_endian, __pyx_k_utils_is_little_endian, sizeof(__pyx_k_utils_is_little_endian), 0, 0, 1, 1},
  {&__pyx_n_s_utils_little_endian_to_current, __pyx_k_utils_little_endian_to_current, sizeof(__pyx_k_utils_little_endian_to_current), 0, 0, 1, 1},
  {&__pyx_n_s_utils_rand31, __pyx_k_utils_rand31, sizeof(__pyx_k_utils_rand31), 0, 0, 1, 1},
  {&__pyx_n_s_utils_read_file, __pyx_k_utils_read_file, sizeof(__pyx_k_utils_read_file), 0, 0, 1, 1},
  {&__pyx_n_s_utils_relu, __pyx_k_utils_relu, sizeof(__pyx_k_utils_relu), 0, 0, 1, 1},
  {&__pyx_n_s_utils_relu_derivative, __pyx_k_utils_relu_derivative, sizeof(__pyx_k_utils_relu_derivative), 0, 0, 1, 1},
  {&__pyx_n_s_utils_relu_leaky, __pyx_k_utils_relu_leaky, sizeof(__pyx_k_utils_relu_leaky), 0, 0, 1, 1},
  {&__pyx_n_s_utils_relu_leaky_derivative, __pyx_k_utils_relu_leaky_derivative, sizeof(__pyx_k_utils_relu_leaky_derivative), 0, 0, 1, 1},
  {&__pyx_n_s_utils_relu_smooth, __pyx_k_utils_relu_smooth, sizeof(__pyx_k_utils_relu_smooth), 0, 0, 1, 1},
  {&__pyx_n_s_utils_relu_smooth_derivative, __pyx_k_utils_relu_smooth_derivative, sizeof(__pyx_k_utils_relu_smooth_derivative), 0, 0, 1, 1},
  {&__pyx_n_s_utils_reverse_bytes, __pyx_k_utils_reverse_bytes, sizeof(__pyx_k_utils_reverse_bytes), 0, 0, 1, 1},
  {&__pyx_n_s_utils_rot13, __pyx_k_utils_rot13, sizeof(__pyx_k_utils_rot13), 0, 0, 1, 1},
  {&__pyx_n_s_utils_sigmoid, __pyx_k_utils_sigmoid, sizeof(__pyx_k_utils_sigmoid), 0, 0, 1, 1},
  {&__pyx_n_s_utils_sigmoid_derivative, __pyx_k_utils_sigmoid_derivative, sizeof(__pyx_k_utils_sigmoid_derivative), 0, 0, 1, 1},
  {&__pyx_n_s_utils_sleep, __pyx_k_utils_sleep, sizeof(__pyx_k_utils_sleep), 0, 0, 1, 1},
  {&__pyx_n_s_utils_srand31, __pyx_k_utils_srand31, sizeof(__pyx_k_utils_srand31), 0, 0, 1, 1},
  {&__pyx_n_s_utils_step, __pyx_k_utils_step, sizeof(__pyx_k_utils_step), 0, 0, 1, 1},
  {&__pyx_n_s_utils_step_derivative, __pyx_k_utils_step_derivative, sizeof(__pyx_k_utils_step_derivative), 0, 0, 1, 1},
  {&__pyx_n_s_utils_super_fast_hash, __pyx_k_utils_super_fast_hash, sizeof(__pyx_k_utils_super_fast_hash), 0, 0, 1, 1},
  {&__pyx_n_s_utils_tanh, __pyx_k_utils_tanh, sizeof(__pyx_k_utils_tanh), 0, 0, 1, 1},
  {&__pyx_n_s_utils_tanh_derivative, __pyx_k_utils_tanh_derivative, sizeof(__pyx_k_utils_tanh_derivative), 0, 0, 1, 1},
  {&__pyx_n_s_utils_write_file, __pyx_k_utils_write_file, sizeof(__pyx_k_utils_write_file), 0, 0, 1, 1},
  {&__pyx_n_s_utils_xorshf96, __pyx_k_utils_xorshf96, sizeof(__pyx_k_utils_xorshf96), 0, 0, 1, 1},
  {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
  {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
  {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
  {&__pyx_n_s_vec, __pyx_k_vec, sizeof(__pyx_k_vec), 0, 0, 1, 1},
  {&__pyx_kp_u_vec2, __pyx_k_vec2, sizeof(__pyx_k_vec2), 0, 1, 0, 0},
  {&__pyx_n_s_vec2_2, __pyx_k_vec2_2, sizeof(__pyx_k_vec2_2), 0, 0, 1, 1},
  {&__pyx_n_s_vec2_triple_product, __pyx_k_vec2_triple_product, sizeof(__pyx_k_vec2_triple_product), 0, 0, 1, 1},
  {&__pyx_kp_u_vec3, __pyx_k_vec3, sizeof(__pyx_k_vec3), 0, 1, 0, 0},
  {&__pyx_n_s_vec3_2, __pyx_k_vec3_2, sizeof(__pyx_k_vec3_2), 0, 0, 1, 1},
  {&__pyx_n_s_vec3_reflect, __pyx_k_vec3_reflect, sizeof(__pyx_k_vec3_reflect), 0, 0, 1, 1},
  {&__pyx_n_s_vec3_rotate_about_axis, __pyx_k_vec3_rotate_about_axis, sizeof(__pyx_k_vec3_rotate_about_axis), 0, 0, 1, 1},
  {&__pyx_n_s_vec3_triple_product, __pyx_k_vec3_triple_product, sizeof(__pyx_k_vec3_triple_product), 0, 0, 1, 1},
  {&__pyx_kp_u_vec4, __pyx_k_vec4, sizeof(__pyx_k_vec4), 0, 1, 0, 0},
  {&__pyx_n_s_vec4_2, __pyx_k_vec4_2, sizeof(__pyx_k_vec4_2), 0, 0, 1, 1},
  {&__pyx_n_s_vec4_triple_product, __pyx_k_vec4_triple_product, sizeof(__pyx_k_vec4_triple_product), 0, 0, 1, 1},
  {&__pyx_n_s_vertex_count, __pyx_k_vertex_count, sizeof(__pyx_k_vertex_count), 0, 0, 1, 1},
  {&__pyx_n_s_vertex_count_used, __pyx_k_vertex_count_used, sizeof(__pyx_k_vertex_count_used), 0, 0, 1, 1},
  {&__pyx_n_s_vertex_shader_path, __pyx_k_vertex_shader_path, sizeof(__pyx_k_vertex_shader_path), 0, 0, 1, 1},
  {&__pyx_n_s_vertex_shader_source, __pyx_k_vertex_shader_source, sizeof(__pyx_k_vertex_shader_source), 0, 0, 1, 1},
  {&__pyx_n_s_vertices, __pyx_k_vertices, sizeof(__pyx_k_vertices), 0, 0, 1, 1},
  {&__pyx_n_s_vertices_count, __pyx_k_vertices_count, sizeof(__pyx_k_vertices_count), 0, 0, 1, 1},
  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  {&__pyx_kp_u_weighted_strength, __pyx_k_weighted_strength, sizeof(__pyx_k_weighted_strength), 0, 1, 0, 0},
  {&__pyx_n_s_weighted_strength_2, __pyx_k_weighted_strength_2, sizeof(__pyx_k_weighted_strength_2), 0, 0, 1, 1},
  {&__pyx_n_s_widgets, __pyx_k_widgets, sizeof(__pyx_k_widgets), 0, 0, 1, 1},
  {&__pyx_kp_s_widgets_is_a_static_class, __pyx_k_widgets_is_a_static_class, sizeof(__pyx_k_widgets_is_a_static_class), 0, 0, 1, 0},
  {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1},
  {&__pyx_kp_u_window, __pyx_k_window, sizeof(__pyx_k_window), 0, 1, 0, 0},
  {&__pyx_n_s_window_2, __pyx_k_window_2, sizeof(__pyx_k_window_2), 0, 0, 1, 1},
  {&__pyx_n_s_wnd, __pyx_k_wnd, sizeof(__pyx_k_wnd), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
  {&__pyx_n_s_z, __pyx_k_z, sizeof(__pyx_k_z), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 3459, __pyx_L1_error)
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 665, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 699, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 775, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 906, __pyx_L1_error)
  __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 931, __pyx_L1_error)
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 1965, __pyx_L1_error)
  __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(1, 18, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec2 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec3 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_2); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_3); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vec4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_3); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_4); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_ivec4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_4); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_5); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_mat4 must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_5); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "cgl_wrapper.pyx":1483
 *             rotation = vec3()
 *         if scale is None:
 *             scale = vec3(1.0, 1.0, 1.0)             # <<<<<<<<<<<<<<
 *         self.c_transform = CGL_transform_create(position.c_vec3, rotation.c_vec3, scale.c_vec3)
 * 
 */
  __pyx_tuple__17 = PyTuple_Pack(3, __pyx_float_1_0, __pyx_float_1_0, __pyx_float_1_0); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "(tree fragment)":4
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("no default __reduce__ due to non-trivial __cinit__")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "cgl_wrapper.pyx":1557
 *     def __add__(self: matrix, other: matrix):
 *         if self.size != other.size:
 *             raise ValueError("Matrices must have the same size")             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_add_to(self.c_matrix, other.c_matrix, result.c_matrix)
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Matrices_must_have_the_same_size); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 1557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "cgl_wrapper.pyx":1599
 *     def __getitem__(self: matrix, key: tuple):
 *         if len(key) != 2:
 *             raise ValueError("Matrix index must be a tuple of 2 integers")             # <<<<<<<<<<<<<<
 *         return CGL_matrix_get_elem(self.c_matrix, key[0], key[1])
 * 
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Matrix_index_must_be_a_tuple_of); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 1599, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "cgl_wrapper.pyx":1633
 *     def set_row(self: matrix, row: int, values: list):
 *         if len(values) != self.n:
 *             raise ValueError("Values must have the same size as the matrix")             # <<<<<<<<<<<<<<
 *         cdef float* values_ptr = <float*> stdlib.malloc(self.n * sizeof(float))
 *         for i in range(self.n):
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_Values_must_have_the_same_size_a); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "cgl_wrapper.pyx":1687
 *     def calc_inverse(self: matrix) -> matrix:
 *         if not self.is_square():
 *             raise ValueError("Matrix must be square")             # <<<<<<<<<<<<<<
 *         result = matrix(self.m, self.n)
 *         CGL_matrix_inverse_to(self.c_matrix, result.c_matrix)
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Matrix_must_be_square); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1687, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "cgl_wrapper.pyx":1709
 *     def submatrix(self: matrix, row: int, column: int, m: int, n: int) -> matrix:
 *         if row + m > self.m or column + n > self.n:
 *             raise ValueError("Submatrix must be inside the matrix")             # <<<<<<<<<<<<<<
 *         result = matrix(m, n)
 *         CGL_matrix_submatrix_to(self.c_matrix, row, column, m, n, result.c_matrix)
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Submatrix_must_be_inside_the_mat); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_self_c_matrix_cannot_be_converte); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_matrix cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_self_c_matrix_cannot_be_converte); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "cgl_wrapper.pyx":1965
 *             self.c_window = CGL_window_create_undecorated(width, height, title.encode('utf-8'))
 *         if self.c_window == NULL:
 *             raise RuntimeError("Failed to create window")             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 *         __WINDOW_TABLE[self.get_id()] = self
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_window); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_self_c_window_cannot_be_converte); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_window cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_self_c_window_cannot_be_converte); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_self_c_image_cannot_be_converted); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_image cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_self_c_image_cannot_be_converted); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_6); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_vertex must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_6); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "cgl_wrapper.pyx":2218
 *     def indices(self, value: list):
 *         if len(value) > self.index_count:
 *             raise ValueError("The number of indices is greater than the maximum number of indices")             # <<<<<<<<<<<<<<
 *         self.c_mesh.index_count_used = len(value)
 *         for i in range(self.index_count_used):
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_The_number_of_indices_is_greater); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 2218, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "cgl_wrapper.pyx":2268
 *         self.c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *         if self.c_mesh == NULL:
 *             raise RuntimeError("Failed to load mesh from obj file")             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_load_mesh_from_obj_fil); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 2268, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_self_c_mesh_cannot_be_converted); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_self_c_mesh_cannot_be_converted); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "cgl_wrapper.pyx":2313
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create(index_count, vertex_count)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_mesh); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 2313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "cgl_wrapper.pyx":2329
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create triangle mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_triangle_mesh); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 2329, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "cgl_wrapper.pyx":2337
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create quad mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_quad_mesh); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 2337, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "cgl_wrapper.pyx":2345
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_plane(front.c_vec3, right.c_vec3, resolution, scale)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create plane mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_plane_mesh); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 2345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "cgl_wrapper.pyx":2353
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_cube(use_3d_tex_coords)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create cube mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_cube_mesh); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 2353, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "cgl_wrapper.pyx":2361
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_sphere(res_u, res_v)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create sphere mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_sphere_mesh); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 2361, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "cgl_wrapper.pyx":2369
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create_cylinder(start.c_vec3, end.c_vec3, radius0, radius1, resolution)
 *     if c_mesh == NULL:
 *         raise RuntimeError("Failed to create cylinder mesh")             # <<<<<<<<<<<<<<
 *     res = mesh_cpu()
 *     res.set_c_mesh(c_mesh)
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_cylinder_mesh); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 2369, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "cgl_wrapper.pyx":2428
 *         self.c_texture = CGL_texture_create(&image.c_image)
 *         if self.c_texture == NULL:
 *             raise RuntimeError("Failed to create texture from image")             # <<<<<<<<<<<<<<
 *         self.has_been_destroyed = False
 * 
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_texture_from_im); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 2428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_self_c_texture_cannot_be_convert); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_texture cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_self_c_texture_cannot_be_convert); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "cgl_wrapper.pyx":2483
 *     cdef CGL_texture* c_texture = CGL_texture_create_blank(width, height, formatf, internal_format, typef)
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create blank texture")             # <<<<<<<<<<<<<<
 *     res = texture()
 *     res.set_c_texture(c_texture)
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_blank_texture); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 2483, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "cgl_wrapper.pyx":2491
 *     cdef CGL_texture* c_texture = CGL_texture_create_array(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create texture array")             # <<<<<<<<<<<<<<
 *     res = texture()
 *     res.set_c_texture(c_texture)
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_texture_array); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 2491, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "cgl_wrapper.pyx":2499
 *     cdef CGL_texture* c_texture = CGL_texture_create_3d(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create 3d texture")             # <<<<<<<<<<<<<<
 *     res = texture()
 *     res.set_c_texture(c_texture)
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_3d_texture); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 2499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "cgl_wrapper.pyx":2507
 *     cdef CGL_texture* c_texture = CGL_texture_create_cubemap()
 *     if c_texture == NULL:
 *         raise RuntimeError("Failed to create cubemap texture")             # <<<<<<<<<<<<<<
 *     res = texture()
 *     res.set_c_texture(c_texture)
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_cubemap_texture); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 2507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "cgl_wrapper.pyx":2552
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_attachment(self.c_framebuffer, index)
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get color attachment")             # <<<<<<<<<<<<<<
 *         res = texture()
 *         res.set_c_texture(c_texture)
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_get_color_attachment); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 2552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "cgl_wrapper.pyx":2581
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_color_texture(self.c_framebuffer)
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get color texture")             # <<<<<<<<<<<<<<
 *         res = texture()
 *         res.set_c_texture(c_texture)
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_get_color_texture); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 2581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "cgl_wrapper.pyx":2589
 *         cdef CGL_texture* c_texture = CGL_framebuffer_get_depth_texture(self.c_framebuffer)
 *         if c_texture == NULL:
 *             raise RuntimeError("Failed to get depth texture")             # <<<<<<<<<<<<<<
 *         res = texture()
 *         res.set_c_texture(c_texture)
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_get_depth_texture); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 2589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_self_c_framebuffer_cannot_be_con); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_framebuffer cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_self_c_framebuffer_cannot_be_con); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "cgl_wrapper.pyx":2597
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_from_default(wnd.c_window)
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create framebuffer from default")             # <<<<<<<<<<<<<<
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_framebuffer_fro); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 2597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "cgl_wrapper.pyx":2605
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create(width, height)
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create framebuffer")             # <<<<<<<<<<<<<<
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)
 */
  __pyx_tuple__60 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_framebuffer); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 2605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__60);
  __Pyx_GIVEREF(__pyx_tuple__60);

  /* "cgl_wrapper.pyx":2613
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_basic(width, height)
 *     if c_framebuffer == NULL:
 *         raise RuntimeError("Failed to create basic framebuffer")             # <<<<<<<<<<<<<<
 *     res = framebuffer()
 *     res.set_c_framebuffer(c_framebuffer)
 */
  __pyx_tuple__61 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_basic_framebuff); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 2613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__61);
  __Pyx_GIVEREF(__pyx_tuple__61);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__62 = PyTuple_Pack(1, __pyx_kp_s_self_c_mesh_cannot_be_converted); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__62);
  __Pyx_GIVEREF(__pyx_tuple__62);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_mesh cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__63 = PyTuple_Pack(1, __pyx_kp_s_self_c_mesh_cannot_be_converted); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__63);
  __Pyx_GIVEREF(__pyx_tuple__63);

  /* "cgl_wrapper.pyx":2737
 *         cdef CGL_shader* c_shader = CGL_shader_create_from_files(vertex_shader_path.encode("utf-8"), fragment_shader_path.encode("utf-8"), NULL)
 *         if c_shader == NULL:
 *             raise RuntimeError("Failed to create shader")             # <<<<<<<<<<<<<<
 *         self.set_c_shader(c_shader)
 *         has_been_destroyed = False
 */
  __pyx_tuple__64 = PyTuple_Pack(1, __pyx_kp_s_Failed_to_create_shader); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 2737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__64);
  __Pyx_GIVEREF(__pyx_tuple__64);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__65 = PyTuple_Pack(1, __pyx_kp_s_self_c_shader_cannot_be_converte); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__65);
  __Pyx_GIVEREF(__pyx_tuple__65);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_shader cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_s_self_c_shader_cannot_be_converte); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__66);
  __Pyx_GIVEREF(__pyx_tuple__66);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__67 = PyTuple_Pack(1, __pyx_kp_s_self_c_ssbo_cannot_be_converted); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__67);
  __Pyx_GIVEREF(__pyx_tuple__67);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_ssbo cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__68 = PyTuple_Pack(1, __pyx_kp_s_self_c_ssbo_cannot_be_converted); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__69 = PyTuple_Pack(1, __pyx_kp_s_self_c_ubo_cannot_be_converted_t); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__69);
  __Pyx_GIVEREF(__pyx_tuple__69);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_ubo cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__70 = PyTuple_Pack(1, __pyx_kp_s_self_c_ubo_cannot_be_converted_t); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__71 = PyTuple_Pack(1, __pyx_kp_s_self_c_shape_cannot_be_converted); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__71);
  __Pyx_GIVEREF(__pyx_tuple__71);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_shape cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__72 = PyTuple_Pack(1, __pyx_kp_s_self_c_shape_cannot_be_converted); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__72);
  __Pyx_GIVEREF(__pyx_tuple__72);

  /* "cgl_wrapper.pyx":3037
 * 
 * def  sat_collision_detect(a: shape, b: shape) -> tuple:
 *     n_vector = vec2(0, 0)             # <<<<<<<<<<<<<<
 *     result = CGL_sat_collision_detect(&a.c_shape, &b.c_shape, &n_vector.c_vec2)
 *     return (result, n_vector)
 */
  __pyx_tuple__73 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 3037, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__74 = PyTuple_Pack(1, __pyx_kp_s_self_c_bloom_cannot_be_converted); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__74);
  __Pyx_GIVEREF(__pyx_tuple__74);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_bloom cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__75 = PyTuple_Pack(1, __pyx_kp_s_self_c_bloom_cannot_be_converted); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__76 = PyTuple_Pack(1, __pyx_kp_s_self_c_tilemap_cannot_be_convert); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__76);
  __Pyx_GIVEREF(__pyx_tuple__76);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_tilemap cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__77 = PyTuple_Pack(1, __pyx_kp_s_self_c_tilemap_cannot_be_convert); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_tuple__78 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_7); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__78);
  __Pyx_GIVEREF(__pyx_tuple__78);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_font_character must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__79 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_7); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")
 */
  __pyx_tuple__80 = PyTuple_Pack(1, __pyx_kp_s_self_c_font_cannot_be_converted); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__80);
  __Pyx_GIVEREF(__pyx_tuple__80);

  /* "(tree fragment)":4
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("self.c_font cannot be converted to a Python object for pickling")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__81 = PyTuple_Pack(1, __pyx_kp_s_self_c_font_cannot_be_converted); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);

  /* "cgl_wrapper.pyx":3457
 * 
 *     def __init__(self):
 *         raise RuntimeError("widgets is a static class")             # <<<<<<<<<<<<<<
 * 
 *     @staticmethod
 */
  __pyx_tuple__82 = PyTuple_Pack(1, __pyx_kp_s_widgets_is_a_static_class); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 3457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__82);
  __Pyx_GIVEREF(__pyx_tuple__82);

  /* "(tree fragment)":2
 * def __reduce_cython__(self):
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")
 */
  __pyx_tuple__83 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_8); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);

  /* "(tree fragment)":4
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")
 * def __setstate_cython__(self, __pyx_state):
 *     raise TypeError("Pickling of struct members such as self.c_noise_params must be explicitly requested with @auto_pickle(True)")             # <<<<<<<<<<<<<<
 */
  __pyx_tuple__84 = PyTuple_Pack(1, __pyx_kp_s_Pickling_of_struct_members_such_8); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__84);
  __Pyx_GIVEREF(__pyx_tuple__84);
  __pyx_tuple__86 = PyTuple_Pack(3, __pyx_int_222419149, __pyx_int_238750788, __pyx_int_228825662); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__86);
  __Pyx_GIVEREF(__pyx_tuple__86);

  /* "FromPyStructUtility":19
 *         value = obj['x']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'x'")             # <<<<<<<<<<<<<<
 *     result.x = value
 *     try:
 */
  __pyx_tuple__87 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(1, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__87);
  __Pyx_GIVEREF(__pyx_tuple__87);

  /* "FromPyStructUtility":24
 *         value = obj['y']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'y'")             # <<<<<<<<<<<<<<
 *     result.y = value
 *     return result
 */
  __pyx_tuple__88 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_2); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(1, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__88);
  __Pyx_GIVEREF(__pyx_tuple__88);

  /* "FromPyStructUtility":19
 *         value = obj['size']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'size'")             # <<<<<<<<<<<<<<
 *     result.size = value
 *     try:
 */
  __pyx_tuple__89 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_3); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(1, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__89);
  __Pyx_GIVEREF(__pyx_tuple__89);

  /* "FromPyStructUtility":24
 *         value = obj['normalized_size']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normalized_size'")             # <<<<<<<<<<<<<<
 *     result.normalized_size = value
 *     try:
 */
  __pyx_tuple__90 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_4); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(1, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__90);
  __Pyx_GIVEREF(__pyx_tuple__90);

  /* "FromPyStructUtility":29
 *         value = obj['offset']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'offset'")             # <<<<<<<<<<<<<<
 *     result.offset = value
 *     try:
 */
  __pyx_tuple__91 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_5); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__91);
  __Pyx_GIVEREF(__pyx_tuple__91);

  /* "FromPyStructUtility":34
 *         value = obj['normalized_offset']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normalized_offset'")             # <<<<<<<<<<<<<<
 *     result.normalized_offset = value
 *     try:
 */
  __pyx_tuple__92 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_6); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(1, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);

  /* "FromPyStructUtility":39
 *         value = obj['bearing']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bearing'")             # <<<<<<<<<<<<<<
 *     result.bearing = value
 *     try:
 */
  __pyx_tuple__93 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_7); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__93);
  __Pyx_GIVEREF(__pyx_tuple__93);

  /* "FromPyStructUtility":44
 *         value = obj['bearing_normalized']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bearing_normalized'")             # <<<<<<<<<<<<<<
 *     result.bearing_normalized = value
 *     try:
 */
  __pyx_tuple__94 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_8); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(1, 44, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__94);
  __Pyx_GIVEREF(__pyx_tuple__94);

  /* "FromPyStructUtility":49
 *         value = obj['advance']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'advance'")             # <<<<<<<<<<<<<<
 *     result.advance = value
 *     try:
 */
  __pyx_tuple__95 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_9); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(1, 49, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "FromPyStructUtility":54
 *         value = obj['advance_normalized']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'advance_normalized'")             # <<<<<<<<<<<<<<
 *     result.advance_normalized = value
 *     try:
 */
  __pyx_tuple__96 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_10); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(1, 54, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "FromPyStructUtility":59
 *         value = obj['bitmap']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bitmap'")             # <<<<<<<<<<<<<<
 *     result.bitmap = value
 *     try:
 */
  __pyx_tuple__97 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_11); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(1, 59, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "FromPyStructUtility":64
 *         value = obj['ch']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'ch'")             # <<<<<<<<<<<<<<
 *     result.ch = value
 *     return result
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_12); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(1, 64, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);

  /* "FromPyStructUtility":29
 *         value = obj['z']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'z'")             # <<<<<<<<<<<<<<
 *     result.z = value
 *     return result
 */
  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_13); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "FromPyStructUtility":34
 *         value = obj['w']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'w'")             # <<<<<<<<<<<<<<
 *     result.w = value
 *     return result
 */
  __pyx_tuple__100 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_14); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(1, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);

  /* "FromPyStructUtility":19
 *         value = obj['position']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'position'")             # <<<<<<<<<<<<<<
 *     result.position = value
 *     try:
 */
  __pyx_tuple__101 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_15); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(1, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__101);
  __Pyx_GIVEREF(__pyx_tuple__101);

  /* "FromPyStructUtility":24
 *         value = obj['normal']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'normal'")             # <<<<<<<<<<<<<<
 *     result.normal = value
 *     try:
 */
  __pyx_tuple__102 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_16); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(1, 24, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "FromPyStructUtility":29
 *         value = obj['texture_coordinates']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'texture_coordinates'")             # <<<<<<<<<<<<<<
 *     result.texture_coordinates = value
 *     try:
 */
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_17); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(1, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);

  /* "FromPyStructUtility":34
 *         value = obj['bone_wieghts']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bone_wieghts'")             # <<<<<<<<<<<<<<
 *     result.bone_wieghts = value
 *     try:
 */
  __pyx_tuple__104 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_18); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(1, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__104);
  __Pyx_GIVEREF(__pyx_tuple__104);

  /* "FromPyStructUtility":39
 *         value = obj['bone_ids']
 *     except KeyError:
 *         raise ValueError("No value specified for struct attribute 'bone_ids'")             # <<<<<<<<<<<<<<
 *     result.bone_ids = value
 *     return result
 */
  __pyx_tuple__105 = PyTuple_Pack(1, __pyx_kp_s_No_value_specified_for_struct_at_19); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(1, 39, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);

  /* "cgl_wrapper.pyx":646
 * CGL_FALSE = 0
 * 
 * def clear_console():             # <<<<<<<<<<<<<<
 *     os.system('cls' if os.name == 'nt' else 'clear')
 * 
 */
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_clear_console, 646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 646, __pyx_L1_error)

  /* "cgl_wrapper.pyx":649
 *     os.system('cls' if os.name == 'nt' else 'clear')
 * 
 * def free(ptr):             # <<<<<<<<<<<<<<
 *     stdlib.free(<void*>ptr)
 * 
 */
  __pyx_tuple__107 = PyTuple_Pack(1, __pyx_n_s_ptr); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);
  __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_free, 649, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(0, 649, __pyx_L1_error)

  /* "cgl_wrapper.pyx":652
 *     stdlib.free(<void*>ptr)
 * 
 * def init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_init()
 * 
 */
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_init, 652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 652, __pyx_L1_error)

  /* "cgl_wrapper.pyx":655
 *     return CGL_init()
 * 
 * def shutdown():             # <<<<<<<<<<<<<<
 *     CGL_shutdown()
 * 
 */
  __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_shutdown, 655, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(0, 655, __pyx_L1_error)

  /* "cgl_wrapper.pyx":658
 *     CGL_shutdown()
 * 
 * def utils_sleep(milliseconds: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_sleep(milliseconds)
 * 
 */
  __pyx_tuple__111 = PyTuple_Pack(1, __pyx_n_s_milliseconds); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_sleep, 658, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 658, __pyx_L1_error)

  /* "cgl_wrapper.pyx":661
 *     CGL_utils_sleep(milliseconds)
 * 
 * def utils_read_file(path: str) -> bytes:             # <<<<<<<<<<<<<<
 *     cdef CGL_sizei size
 *     cdef CGL_byte* data = CGL_utils_read_file(path.encode(), &size)
 */
  __pyx_tuple__113 = PyTuple_Pack(4, __pyx_n_s_path, __pyx_n_s_size, __pyx_n_s_data, __pyx_n_s_result); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);
  __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_read_file, 661, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(0, 661, __pyx_L1_error)

  /* "cgl_wrapper.pyx":671
 *     return result
 * 
 * def utils_get_file_size(path: str) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_get_file_size(path.encode())
 * 
 */
  __pyx_tuple__115 = PyTuple_Pack(1, __pyx_n_s_path); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__115);
  __Pyx_GIVEREF(__pyx_tuple__115);
  __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_get_file_size, 671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(0, 671, __pyx_L1_error)

  /* "cgl_wrapper.pyx":674
 *     return CGL_utils_get_file_size(path.encode())
 * 
 * def utils_append_file(path: str, data: bytes) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_append_file(path.encode(), data, len(data))
 * 
 */
  __pyx_tuple__117 = PyTuple_Pack(2, __pyx_n_s_path, __pyx_n_s_data); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__117);
  __Pyx_GIVEREF(__pyx_tuple__117);
  __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_append_file, 674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(0, 674, __pyx_L1_error)

  /* "cgl_wrapper.pyx":677
 *     return CGL_utils_append_file(path.encode(), data, len(data))
 * 
 * def utils_write_file(path : str, data : bytes) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_write_file(path.encode(), data, len(data))
 * 
 */
  __pyx_tuple__119 = PyTuple_Pack(2, __pyx_n_s_path, __pyx_n_s_data); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_write_file, 677, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 677, __pyx_L1_error)

  /* "cgl_wrapper.pyx":680
 *     return CGL_utils_write_file(path.encode(), data, len(data))
 * 
 * def utils_get_time() -> float:             # <<<<<<<<<<<<<<
 *     return CGL_utils_get_time()
 * 
 */
  __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_get_time, 680, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 680, __pyx_L1_error)

  /* "cgl_wrapper.pyx":683
 *     return CGL_utils_get_time()
 * 
 * def utils_get_timestamp() -> str:             # <<<<<<<<<<<<<<
 *     cdef CGL_byte buffer[128]
 *     CGL_utils_get_timestamp(buffer)
 */
  __pyx_tuple__122 = PyTuple_Pack(1, __pyx_n_s_buffer); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_get_timestamp, 683, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 683, __pyx_L1_error)

  /* "cgl_wrapper.pyx":688
 *     return buffer.decode()
 * 
 * def utils_is_little_endian() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_little_endian()
 * 
 */
  __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_is_little_endian, 688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(0, 688, __pyx_L1_error)

  /* "cgl_wrapper.pyx":691
 *     return CGL_utils_is_little_endian()
 * 
 * def utils_is_big_endian() -> bool:             # <<<<<<<<<<<<<<
 *     return not CGL_utils_is_little_endian()
 * 
 */
  __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_is_big_endian, 691, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 691, __pyx_L1_error)

  /* "cgl_wrapper.pyx":694
 *     return not CGL_utils_is_little_endian()
 * 
 * def utils_get_random_with_probability(probabilities) -> int:             # <<<<<<<<<<<<<<
 *     cdef CGL_float* c_probabilities
 *     c_probabilities = <CGL_float*>stdlib.malloc(len(probabilities) * sizeof(CGL_float))
 */
  __pyx_tuple__126 = PyTuple_Pack(4, __pyx_n_s_probabilities, __pyx_n_s_c_probabilities, __pyx_n_s_i, __pyx_n_s_result); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__126);
  __Pyx_GIVEREF(__pyx_tuple__126);
  __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_get_random_with_probabilit, 694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 694, __pyx_L1_error)

  /* "cgl_wrapper.pyx":706
 *     return result
 * 
 * def utils_reverse_bytes(data: bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_reverse_bytes(<void*>data, len(data))
 * 
 */
  __pyx_tuple__128 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__128);
  __Pyx_GIVEREF(__pyx_tuple__128);
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_reverse_bytes, 706, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 706, __pyx_L1_error)

  /* "cgl_wrapper.pyx":709
 *     CGL_utils_reverse_bytes(<void*>data, len(data))
 * 
 * def utils_little_endian_to_current(data : bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_little_endian_to_current(<void*>data, len(data))
 * 
 */
  __pyx_tuple__130 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_little_endian_to_current, 709, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 709, __pyx_L1_error)

  /* "cgl_wrapper.pyx":712
 *     CGL_utils_little_endian_to_current(<void*>data, len(data))
 * 
 * def utils_big_endian_to_current(data : bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_big_endian_to_current(<void*>data, len(data))
 * 
 */
  __pyx_tuple__132 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_big_endian_to_current, 712, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 712, __pyx_L1_error)

  /* "cgl_wrapper.pyx":715
 *     CGL_utils_big_endian_to_current(<void*>data, len(data))
 * 
 * def utils_fast_srand(seed: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_fast_srand(seed)
 * 
 */
  __pyx_tuple__134 = PyTuple_Pack(1, __pyx_n_s_seed); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_fast_srand, 715, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 715, __pyx_L1_error)

  /* "cgl_wrapper.pyx":718
 *     CGL_utils_fast_srand(seed)
 * 
 * def utils_fast_rand() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_fast_rand()
 * 
 */
  __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_fast_rand, 718, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(0, 718, __pyx_L1_error)

  /* "cgl_wrapper.pyx":721
 *     return CGL_utils_fast_rand()
 * 
 * def utils_xorshf96() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_xorshf96()
 * 
 */
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_xorshf96, 721, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 721, __pyx_L1_error)

  /* "cgl_wrapper.pyx":724
 *     return CGL_utils_xorshf96()
 * 
 * def utils_srand31(seed: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_srand31(seed)
 * 
 */
  __pyx_tuple__138 = PyTuple_Pack(1, __pyx_n_s_seed); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_srand31, 724, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 724, __pyx_L1_error)

  /* "cgl_wrapper.pyx":727
 *     CGL_utils_srand31(seed)
 * 
 * def utils_rand31() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_rand31()
 * 
 */
  __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_rand31, 727, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(0, 727, __pyx_L1_error)

  /* "cgl_wrapper.pyx":730
 *     return CGL_utils_rand31()
 * 
 * def utils_sigmoid(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_sigmoid(x)
 * 
 */
  __pyx_tuple__141 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__141);
  __Pyx_GIVEREF(__pyx_tuple__141);
  __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_sigmoid, 730, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(0, 730, __pyx_L1_error)

  /* "cgl_wrapper.pyx":733
 *     CGL_utils_sigmoid(x)
 * 
 * def utils_sigmoid_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_sigmoid_derivative(x)
 * 
 */
  __pyx_tuple__143 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_sigmoid_derivative, 733, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 733, __pyx_L1_error)

  /* "cgl_wrapper.pyx":736
 *     CGL_utils_sigmoid_derivative(x)
 * 
 * def utils_relu(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu(x)
 * 
 */
  __pyx_tuple__145 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);
  __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_relu, 736, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(0, 736, __pyx_L1_error)

  /* "cgl_wrapper.pyx":739
 *     CGL_utils_relu(x)
 * 
 * def utils_relu_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_derivative(x)
 * 
 */
  __pyx_tuple__147 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__147);
  __Pyx_GIVEREF(__pyx_tuple__147);
  __pyx_codeobj__148 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__147, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_relu_derivative, 739, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__148)) __PYX_ERR(0, 739, __pyx_L1_error)

  /* "cgl_wrapper.pyx":742
 *     CGL_utils_relu_derivative(x)
 * 
 * def utils_tanh(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_tanh(x)
 * 
 */
  __pyx_tuple__149 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__149);
  __Pyx_GIVEREF(__pyx_tuple__149);
  __pyx_codeobj__150 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__149, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_tanh, 742, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__150)) __PYX_ERR(0, 742, __pyx_L1_error)

  /* "cgl_wrapper.pyx":745
 *     CGL_utils_tanh(x)
 * 
 * def utils_tanh_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_tanh_derivative(x)
 * 
 */
  __pyx_tuple__151 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_tanh_derivative, 745, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 745, __pyx_L1_error)

  /* "cgl_wrapper.pyx":748
 *     CGL_utils_tanh_derivative(x)
 * 
 * def utils_step(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_step(x)
 * 
 */
  __pyx_tuple__153 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_step, 748, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 748, __pyx_L1_error)

  /* "cgl_wrapper.pyx":751
 *     CGL_utils_step(x)
 * 
 * def utils_step_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_step_derivative(x)
 * 
 */
  __pyx_tuple__155 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__155)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__155);
  __Pyx_GIVEREF(__pyx_tuple__155);
  __pyx_codeobj__156 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__155, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_step_derivative, 751, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__156)) __PYX_ERR(0, 751, __pyx_L1_error)

  /* "cgl_wrapper.pyx":754
 *     CGL_utils_step_derivative(x)
 * 
 * def utils_relu_leaky(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_leaky(x)
 * 
 */
  __pyx_tuple__157 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__157)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__157);
  __Pyx_GIVEREF(__pyx_tuple__157);
  __pyx_codeobj__158 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__157, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_relu_leaky, 754, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__158)) __PYX_ERR(0, 754, __pyx_L1_error)

  /* "cgl_wrapper.pyx":757
 *     CGL_utils_relu_leaky(x)
 * 
 * def utils_relu_leaky_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_leaky_derivative(x)
 * 
 */
  __pyx_tuple__159 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_relu_leaky_derivative, 757, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 757, __pyx_L1_error)

  /* "cgl_wrapper.pyx":760
 *     CGL_utils_relu_leaky_derivative(x)
 * 
 * def utils_relu_smooth(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_smooth(x)
 * 
 */
  __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_relu_smooth, 760, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 760, __pyx_L1_error)

  /* "cgl_wrapper.pyx":763
 *     CGL_utils_relu_smooth(x)
 * 
 * def utils_relu_smooth_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_smooth_derivative(x)
 * 
 */
  __pyx_tuple__163 = PyTuple_Pack(2, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);
  __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_relu_smooth_derivative, 763, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 763, __pyx_L1_error)

  /* "cgl_wrapper.pyx":773
 * CONSOLE_COLOR_BLUE = 4
 * 
 * def console_set_color(color: int):             # <<<<<<<<<<<<<<
 *     if color < 0 or color > 4:
 *         raise ValueError()
 */
  __pyx_tuple__165 = PyTuple_Pack(1, __pyx_n_s_color); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__165);
  __Pyx_GIVEREF(__pyx_tuple__165);
  __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_console_set_color, 773, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 773, __pyx_L1_error)

  /* "cgl_wrapper.pyx":778
 *     CGL_console_set_color(color)
 * 
 * def printf_red(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_red(format.encode())
 * 
 */
  __pyx_tuple__167 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_printf_red, 778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 778, __pyx_L1_error)

  /* "cgl_wrapper.pyx":781
 *     CGL_printf_red(format.encode())
 * 
 * def printf_green(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_green(format.encode())
 * 
 */
  __pyx_tuple__169 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_printf_green, 781, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 781, __pyx_L1_error)

  /* "cgl_wrapper.pyx":784
 *     CGL_printf_green(format.encode())
 * 
 * def printf_gray(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_gray(format.encode())
 * 
 */
  __pyx_tuple__171 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_printf_gray, 784, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 784, __pyx_L1_error)

  /* "cgl_wrapper.pyx":787
 *     CGL_printf_gray(format.encode())
 * 
 * def printf_blue(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_blue(format.encode())
 * 
 */
  __pyx_tuple__173 = PyTuple_Pack(1, __pyx_n_s_format); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_printf_blue, 787, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 787, __pyx_L1_error)

  /* "cgl_wrapper.pyx":790
 *     CGL_printf_blue(format.encode())
 * 
 * def console_progress_bar(progress: float, width: int, prefix: str, suffix: str, complete_char: str = "#", incomplete_char: str = "_"):             # <<<<<<<<<<<<<<
 *     CGL_console_progress_bar(progress, width, prefix.encode(), suffix.encode(), complete_char[0], incomplete_char[0])
 * 
 */
  __pyx_tuple__175 = PyTuple_Pack(6, __pyx_n_s_progress, __pyx_n_s_width, __pyx_n_s_prefix, __pyx_n_s_suffix, __pyx_n_s_complete_char, __pyx_n_s_incomplete_char); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_console_progress_bar, 790, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 790, __pyx_L1_error)

  /* "cgl_wrapper.pyx":802
 * 
 * 
 * def logger_init(enable_console_logging: bool):             # <<<<<<<<<<<<<<
 *     CGL_logger_init(enable_console_logging)
 * 
 */
  __pyx_tuple__177 = PyTuple_Pack(2, __pyx_n_s_enable_console_logging, __pyx_n_s_enable_console_logging); if (unlikely(!__pyx_tuple__177)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__177);
  __Pyx_GIVEREF(__pyx_tuple__177);
  __pyx_codeobj__178 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__177, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_logger_init, 802, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__178)) __PYX_ERR(0, 802, __pyx_L1_error)

  /* "cgl_wrapper.pyx":805
 *     CGL_logger_init(enable_console_logging)
 * 
 * def logger_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_logger_shutdown()
 * 
 */
  __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_logger_shutdown, 805, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 805, __pyx_L1_error)

  /* "cgl_wrapper.pyx":808
 *     CGL_logger_shutdown()
 * 
 * def logger_attach_log_file(path: str) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_logger_attach_log_file(path.encode())
 * 
 */
  __pyx_tuple__180 = PyTuple_Pack(1, __pyx_n_s_path); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__180);
  __Pyx_GIVEREF(__pyx_tuple__180);
  __pyx_codeobj__181 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__180, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_logger_attach_log_file, 808, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__181)) __PYX_ERR(0, 808, __pyx_L1_error)

  /* "cgl_wrapper.pyx":811
 *     return CGL_logger_attach_log_file(path.encode())
 * 
 * def logger_detach_log_file(path: str) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_logger_detach_log_file(path.encode())
 * 
 */
  __pyx_tuple__182 = PyTuple_Pack(1, __pyx_n_s_path); if (unlikely(!__pyx_tuple__182)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__182);
  __Pyx_GIVEREF(__pyx_tuple__182);
  __pyx_codeobj__183 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__182, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_logger_detach_log_file, 811, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__183)) __PYX_ERR(0, 811, __pyx_L1_error)

  /* "cgl_wrapper.pyx":814
 *     return CGL_logger_detach_log_file(path.encode())
 * 
 * def logger_flush():             # <<<<<<<<<<<<<<
 *     CGL_logger_flush()
 * 
 */
  __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_logger_flush, 814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 814, __pyx_L1_error)

  /* "cgl_wrapper.pyx":817
 *     CGL_logger_flush()
 * 
 * def logger_disable_console_logging():             # <<<<<<<<<<<<<<
 *     CGL_logger_disable_console_logging()
 * 
 */
  __pyx_codeobj__185 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_logger_disable_console_logging, 817, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__185)) __PYX_ERR(0, 817, __pyx_L1_error)

  /* "cgl_wrapper.pyx":820
 *     CGL_logger_disable_console_logging()
 * 
 * def logger_enable_console_logging():             # <<<<<<<<<<<<<<
 *     CGL_logger_enable_console_logging()
 * 
 */
  __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_logger_enable_console_logging, 820, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 820, __pyx_L1_error)

  /* "cgl_wrapper.pyx":823
 *     CGL_logger_enable_console_logging()
 * 
 * def logger_log(level: int, log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(level, log_format.encode())
 * 
 */
  __pyx_tuple__187 = PyTuple_Pack(2, __pyx_n_s_level, __pyx_n_s_log_format); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__187);
  __Pyx_GIVEREF(__pyx_tuple__187);
  __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_logger_log, 823, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 823, __pyx_L1_error)

  /* "cgl_wrapper.pyx":826
 *     CGL_logger_log(level, log_format.encode())
 * 
 * def log_trace(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_TRACE, log_format.encode())
 * 
 */
  __pyx_tuple__189 = PyTuple_Pack(1, __pyx_n_s_log_format); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__189);
  __Pyx_GIVEREF(__pyx_tuple__189);
  __pyx_codeobj__190 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__189, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_log_trace, 826, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__190)) __PYX_ERR(0, 826, __pyx_L1_error)

  /* "cgl_wrapper.pyx":829
 *     CGL_logger_log(LOG_LEVEL_TRACE, log_format.encode())
 * 
 * def log_info(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_INFO, log_format.encode())
 * 
 */
  __pyx_tuple__191 = PyTuple_Pack(1, __pyx_n_s_log_format); if (unlikely(!__pyx_tuple__191)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__191);
  __Pyx_GIVEREF(__pyx_tuple__191);
  __pyx_codeobj__192 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__191, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_log_info, 829, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__192)) __PYX_ERR(0, 829, __pyx_L1_error)

  /* "cgl_wrapper.pyx":832
 *     CGL_logger_log(LOG_LEVEL_INFO, log_format.encode())
 * 
 * def log_warn(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_WARN, log_format.encode())
 * 
 */
  __pyx_tuple__193 = PyTuple_Pack(1, __pyx_n_s_log_format); if (unlikely(!__pyx_tuple__193)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__193);
  __Pyx_GIVEREF(__pyx_tuple__193);
  __pyx_codeobj__194 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__193, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_log_warn, 832, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__194)) __PYX_ERR(0, 832, __pyx_L1_error)

  /* "cgl_wrapper.pyx":835
 *     CGL_logger_log(LOG_LEVEL_WARN, log_format.encode())
 * 
 * def log_error(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_ERROR, log_format.encode())
 * 
 */
  __pyx_tuple__195 = PyTuple_Pack(1, __pyx_n_s_log_format); if (unlikely(!__pyx_tuple__195)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__195);
  __Pyx_GIVEREF(__pyx_tuple__195);
  __pyx_codeobj__196 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__195, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_log_error, 835, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__196)) __PYX_ERR(0, 835, __pyx_L1_error)

  /* "cgl_wrapper.pyx":838
 *     CGL_logger_log(LOG_LEVEL_ERROR, log_format.encode())
 * 
 * def log_internal(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_INTERNAL, log_format.encode())
 * 
 */
  __pyx_tuple__197 = PyTuple_Pack(1, __pyx_n_s_log_format); if (unlikely(!__pyx_tuple__197)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__197);
  __Pyx_GIVEREF(__pyx_tuple__197);
  __pyx_codeobj__198 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__197, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_log_internal, 838, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__198)) __PYX_ERR(0, 838, __pyx_L1_error)

  /* "cgl_wrapper.pyx":841
 *     CGL_logger_log(LOG_LEVEL_INTERNAL, log_format.encode())
 * 
 * def utils_crc32(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_crc32(<void*>data, len(data))
 * 
 */
  __pyx_tuple__199 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__199)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__199);
  __Pyx_GIVEREF(__pyx_tuple__199);
  __pyx_codeobj__200 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__199, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_crc32, 841, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__200)) __PYX_ERR(0, 841, __pyx_L1_error)

  /* "cgl_wrapper.pyx":844
 *     return CGL_utils_crc32(<void*>data, len(data))
 * 
 * def utils_crc64(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_crc64(<void*>data, len(data))
 * 
 */
  __pyx_tuple__201 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__201)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__201);
  __Pyx_GIVEREF(__pyx_tuple__201);
  __pyx_codeobj__202 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__201, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_crc64, 844, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__202)) __PYX_ERR(0, 844, __pyx_L1_error)

  /* "cgl_wrapper.pyx":847
 *     return CGL_utils_crc64(<void*>data, len(data))
 * 
 * def utils_rot13(data: bytes) -> bytes:             # <<<<<<<<<<<<<<
 *     result = bytes(len(data))
 *     CGL_utils_rot13(<char*>data, <char*>result)
 */
  __pyx_tuple__203 = PyTuple_Pack(2, __pyx_n_s_data, __pyx_n_s_result); if (unlikely(!__pyx_tuple__203)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__203);
  __Pyx_GIVEREF(__pyx_tuple__203);
  __pyx_codeobj__204 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__203, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_rot13, 847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__204)) __PYX_ERR(0, 847, __pyx_L1_error)

  /* "cgl_wrapper.pyx":852
 *     return result
 * 
 * def utils_super_fast_hash(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_super_fast_hash(<void*>data, len(data))
 * 
 */
  __pyx_tuple__205 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__205)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__205);
  __Pyx_GIVEREF(__pyx_tuple__205);
  __pyx_codeobj__206 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__205, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_utils_super_fast_hash, 852, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__206)) __PYX_ERR(0, 852, __pyx_L1_error)

  /* "cgl_wrapper.pyx":867
 * SQRT8 = (2.82842712474619009760)
 * 
 * def deg_to_rad(deg):             # <<<<<<<<<<<<<<
 *     return ((deg) * (PI / 180.0))
 * 
 */
  __pyx_tuple__207 = PyTuple_Pack(1, __pyx_n_s_deg); if (unlikely(!__pyx_tuple__207)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__207);
  __Pyx_GIVEREF(__pyx_tuple__207);
  __pyx_codeobj__208 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__207, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_deg_to_rad, 867, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__208)) __PYX_ERR(0, 867, __pyx_L1_error)

  /* "cgl_wrapper.pyx":870
 *     return ((deg) * (PI / 180.0))
 * 
 * def rad_to_deg(rad):             # <<<<<<<<<<<<<<
 *     return ((rad) * (180.0 / PI))
 * 
 */
  __pyx_tuple__209 = PyTuple_Pack(1, __pyx_n_s_rad); if (unlikely(!__pyx_tuple__209)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__209);
  __Pyx_GIVEREF(__pyx_tuple__209);
  __pyx_codeobj__210 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__209, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_rad_to_deg, 870, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__210)) __PYX_ERR(0, 870, __pyx_L1_error)

  /* "cgl_wrapper.pyx":873
 *     return ((rad) * (180.0 / PI))
 * 
 * def float_lerp(a: float, b: float, t: float):             # <<<<<<<<<<<<<<
 *     return ((a) + ((b) - (a)) * (t))
 * 
 */
  __pyx_tuple__211 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_t); if (unlikely(!__pyx_tuple__211)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__211);
  __Pyx_GIVEREF(__pyx_tuple__211);
  __pyx_codeobj__212 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__211, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_float_lerp, 873, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__212)) __PYX_ERR(0, 873, __pyx_L1_error)

  /* "cgl_wrapper.pyx":876
 *     return ((a) + ((b) - (a)) * (t))
 * 
 * def float_quadratic_lerp(a: float, b: float, c: float, t: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_float_quadratic_lerp(a, b, c, t)
 * 
 */
  __pyx_tuple__213 = PyTuple_Pack(4, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_t); if (unlikely(!__pyx_tuple__213)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__213);
  __Pyx_GIVEREF(__pyx_tuple__213);
  __pyx_codeobj__214 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__213, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_float_quadratic_lerp, 876, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__214)) __PYX_ERR(0, 876, __pyx_L1_error)

  /* "cgl_wrapper.pyx":879
 *     return CGL_float_quadratic_lerp(a, b, c, t)
 * 
 * def float_cubic_lerp(a: float, b: float, c: float, d: float, t: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_float_cubic_lerp(a, b, c, d, t)
 * 
 */
  __pyx_tuple__215 = PyTuple_Pack(5, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_d, __pyx_n_s_t); if (unlikely(!__pyx_tuple__215)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__215);
  __Pyx_GIVEREF(__pyx_tuple__215);
  __pyx_codeobj__216 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__215, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_float_cubic_lerp, 879, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__216)) __PYX_ERR(0, 879, __pyx_L1_error)

  /* "cgl_wrapper.pyx":972
 *         return vec2(self.x / length, self.y / length)
 * 
 * def vec2_triple_product(a: vec2, b: vec2, c: vec2) -> vec2:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2 obj = vec2(CGL_vec2_triple_product(a.c_vec2, b.c_vec2, c.c_vec2))
 *     return vec2(obj.x, obj.y)
 */
  __pyx_tuple__217 = PyTuple_Pack(4, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__217)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__217);
  __Pyx_GIVEREF(__pyx_tuple__217);
  __pyx_codeobj__218 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__217, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_vec2_triple_product, 972, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__218)) __PYX_ERR(0, 972, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1076
 *         return vec3(self.x / length, self.y / length, self.z / length)
 * 
 * def vec3_reflect(a: vec3, n: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_reflect(a.c_vec3, n.c_vec3))
 *     return vec3(obj.x, obj.y, obj.z)
 */
  __pyx_tuple__219 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_n, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__219)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__219);
  __Pyx_GIVEREF(__pyx_tuple__219);
  __pyx_codeobj__220 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__219, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_vec3_reflect, 1076, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__220)) __PYX_ERR(0, 1076, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1080
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 * def vec3_rotate_about_axis(v: vec3, axis: vec3, theta: float) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_rotate_about_axis(v.c_vec3, axis.c_vec3, theta))
 *     return vec3(obj.x, obj.y, obj.z)
 */
  __pyx_tuple__221 = PyTuple_Pack(4, __pyx_n_s_v, __pyx_n_s_axis, __pyx_n_s_theta, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__221)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__221);
  __Pyx_GIVEREF(__pyx_tuple__221);
  __pyx_codeobj__222 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__221, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_vec3_rotate_about_axis, 1080, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__222)) __PYX_ERR(0, 1080, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1084
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 * def vec3_triple_product(a: vec3, b: vec3, c: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_triple_product(a.c_vec3, b.c_vec3, c.c_vec3))
 *     return vec3(obj.x, obj.y, obj.z)
 */
  __pyx_tuple__223 = PyTuple_Pack(4, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__223)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__223);
  __Pyx_GIVEREF(__pyx_tuple__223);
  __pyx_codeobj__224 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__223, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_vec3_triple_product, 1084, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__224)) __PYX_ERR(0, 1084, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1194
 *         return vec4(self.x / length, self.y / length, self.z / length, self.w / length)
 * 
 * def vec4_triple_product(a: vec4, b: vec4, c: vec4) -> vec4:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec4 obj = vec4(CGL_vec4_triple_product(a.c_vec4, b.c_vec4, c.c_vec4))
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 */
  __pyx_tuple__225 = PyTuple_Pack(4, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__225)) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__225);
  __Pyx_GIVEREF(__pyx_tuple__225);
  __pyx_codeobj__226 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__225, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_vec4_triple_product, 1194, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__226)) __PYX_ERR(0, 1194, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1296
 *         return hash((self.c_mat4.m[0], self.c_mat4.m[1], self.c_mat4.m[2], self.c_mat4.m[3], self.c_mat4.m[4], self.c_mat4.m[5], self.c_mat4.m[6], self.c_mat4.m[7], self.c_mat4.m[8], self.c_mat4.m[9], self.c_mat4.m[10], self.c_mat4.m[11], self.c_mat4.m[12], self.c_mat4.m[13], self.c_mat4.m[14], self.c_mat4.m[15]))
 * 
 * def mat4_mul(a: mat4, b: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_mul(a.c_mat4, b.c_mat4)
 *     result = mat4()
 */
  __pyx_tuple__227 = PyTuple_Pack(4, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__227)) __PYX_ERR(0, 1296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__227);
  __Pyx_GIVEREF(__pyx_tuple__227);
  __pyx_codeobj__228 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__227, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_mul, 1296, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__228)) __PYX_ERR(0, 1296, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1302
 *     return result
 * 
 * def mat4_det(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det(m.c_mat4)
 * 
 */
  __pyx_tuple__229 = PyTuple_Pack(1, __pyx_n_s_m); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__229);
  __Pyx_GIVEREF(__pyx_tuple__229);
  __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_det, 1302, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 1302, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1305
 *     return CGL_mat4_det(m.c_mat4)
 * 
 * def mat4_det_by_lu(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det_by_lu(m.c_mat4)
 * 
 */
  __pyx_tuple__231 = PyTuple_Pack(1, __pyx_n_s_m); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 1305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__231);
  __Pyx_GIVEREF(__pyx_tuple__231);
  __pyx_codeobj__232 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__231, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_det_by_lu, 1305, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__232)) __PYX_ERR(0, 1305, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1308
 *     return CGL_mat4_det_by_lu(m.c_mat4)
 * 
 * def mat4_det_by_gauss(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det_by_gauss(m.c_mat4)
 * 
 */
  __pyx_tuple__233 = PyTuple_Pack(1, __pyx_n_s_m); if (unlikely(!__pyx_tuple__233)) __PYX_ERR(0, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__233);
  __Pyx_GIVEREF(__pyx_tuple__233);
  __pyx_codeobj__234 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__233, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_det_by_gauss, 1308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__234)) __PYX_ERR(0, 1308, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1311
 *     return CGL_mat4_det_by_gauss(m.c_mat4)
 * 
 * def mat4_mul_vec4(m: mat4, v: vec4) -> vec4:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec4 obj = CGL_mat4_mul_vec4(m.c_mat4, v.c_vec4)
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 */
  __pyx_tuple__235 = PyTuple_Pack(3, __pyx_n_s_m, __pyx_n_s_v, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__235)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__235);
  __Pyx_GIVEREF(__pyx_tuple__235);
  __pyx_codeobj__236 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__235, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_mul_vec4, 1311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__236)) __PYX_ERR(0, 1311, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1315
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 * 
 * def mat4_inverse(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_inverse(m.c_mat4)
 *     result = mat4()
 */
  __pyx_tuple__237 = PyTuple_Pack(3, __pyx_n_s_m, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__237)) __PYX_ERR(0, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__237);
  __Pyx_GIVEREF(__pyx_tuple__237);
  __pyx_codeobj__238 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__237, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_inverse, 1315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__238)) __PYX_ERR(0, 1315, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1321
 *     return result
 * 
 * def mat4_transpose(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_transpose(m.c_mat4)
 *     result = mat4()
 */
  __pyx_tuple__239 = PyTuple_Pack(3, __pyx_n_s_m, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__239)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__239);
  __Pyx_GIVEREF(__pyx_tuple__239);
  __pyx_codeobj__240 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__239, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_transpose, 1321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__240)) __PYX_ERR(0, 1321, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1327
 *     return result
 * 
 * def mat4_adjoint(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_adjoint(m.c_mat4)
 *     result = mat4()
 */
  __pyx_tuple__241 = PyTuple_Pack(3, __pyx_n_s_m, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__241)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__241);
  __Pyx_GIVEREF(__pyx_tuple__241);
  __pyx_codeobj__242 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__241, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_adjoint, 1327, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__242)) __PYX_ERR(0, 1327, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1333
 *     return result
 * 
 * def mat4_gauss_elim(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_gauss_elim(m.c_mat4)
 *     result = mat4()
 */
  __pyx_tuple__243 = PyTuple_Pack(3, __pyx_n_s_m, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__243)) __PYX_ERR(0, 1333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__243);
  __Pyx_GIVEREF(__pyx_tuple__243);
  __pyx_codeobj__244 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__243, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_gauss_elim, 1333, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__244)) __PYX_ERR(0, 1333, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1339
 *     return result
 * 
 * def mat4_rank(m: mat4) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_rank(m.c_mat4)
 * 
 */
  __pyx_tuple__245 = PyTuple_Pack(1, __pyx_n_s_m); if (unlikely(!__pyx_tuple__245)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__245);
  __Pyx_GIVEREF(__pyx_tuple__245);
  __pyx_codeobj__246 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__245, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_rank, 1339, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__246)) __PYX_ERR(0, 1339, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1342
 *     return CGL_mat4_rank(m.c_mat4)
 * 
 * def mat4_trace(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_trace(m.c_mat4)
 * 
 */
  __pyx_tuple__247 = PyTuple_Pack(1, __pyx_n_s_m); if (unlikely(!__pyx_tuple__247)) __PYX_ERR(0, 1342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__247);
  __Pyx_GIVEREF(__pyx_tuple__247);
  __pyx_codeobj__248 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__247, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_trace, 1342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__248)) __PYX_ERR(0, 1342, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1345
 *     return CGL_mat4_trace(m.c_mat4)
 * 
 * def mat4_rotate_about_axis(axis: vec3, angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_about_axis(axis.c_vec3, angle)
 *     result = mat4()
 */
  __pyx_tuple__249 = PyTuple_Pack(4, __pyx_n_s_axis, __pyx_n_s_angle, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__249)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__249);
  __Pyx_GIVEREF(__pyx_tuple__249);
  __pyx_codeobj__250 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__249, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_rotate_about_axis, 1345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__250)) __PYX_ERR(0, 1345, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1351
 *     return result
 * 
 * def mat4_look_at(eye: vec3, target: vec3, up: vec3) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_look_at(eye.c_vec3, target.c_vec3, up.c_vec3)
 *     result = mat4()
 */
  __pyx_tuple__251 = PyTuple_Pack(5, __pyx_n_s_eye, __pyx_n_s_target, __pyx_n_s_up, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__251)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__251);
  __Pyx_GIVEREF(__pyx_tuple__251);
  __pyx_codeobj__252 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__251, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_look_at, 1351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__252)) __PYX_ERR(0, 1351, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1357
 *     return result
 * 
 * def mat4_lerp(a: mat4, b: mat4, t: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_lerp(a.c_mat4, b.c_mat4, t)
 *     result = mat4()
 */
  __pyx_tuple__253 = PyTuple_Pack(5, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_t, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__253)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__253);
  __Pyx_GIVEREF(__pyx_tuple__253);
  __pyx_codeobj__254 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__253, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_lerp, 1357, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__254)) __PYX_ERR(0, 1357, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1363
 *     return result
 * 
 * def mat4_decompose_lu(m: mat4, l: mat4, u: mat4):             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 l_obj = CGL_mat4()
 *     cdef CGL_mat4 u_obj = CGL_mat4()
 */
  __pyx_tuple__255 = PyTuple_Pack(5, __pyx_n_s_m, __pyx_n_s_l, __pyx_n_s_u, __pyx_n_s_l_obj, __pyx_n_s_u_obj); if (unlikely(!__pyx_tuple__255)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__255);
  __Pyx_GIVEREF(__pyx_tuple__255);
  __pyx_codeobj__256 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__255, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_decompose_lu, 1363, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__256)) __PYX_ERR(0, 1363, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1373
 *     return (l, u)
 * 
 * def mat4_perspective(fov: float, aspect: float, near: float, far: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_perspective(fov, aspect, near, far)
 *     result = mat4()
 */
  __pyx_tuple__257 = PyTuple_Pack(6, __pyx_n_s_fov, __pyx_n_s_aspect, __pyx_n_s_near, __pyx_n_s_far, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__257)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__257);
  __Pyx_GIVEREF(__pyx_tuple__257);
  __pyx_codeobj__258 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__257, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_perspective, 1373, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__258)) __PYX_ERR(0, 1373, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1379
 *     return result
 * 
 * def mat4_orthographic(left: float, right: float, bottom: float, top: float, near: float, far: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_orthographic(left, right, bottom, top, near, far)
 *     result = mat4()
 */
  __pyx_tuple__259 = PyTuple_Pack(8, __pyx_n_s_left, __pyx_n_s_right, __pyx_n_s_bottom, __pyx_n_s_top, __pyx_n_s_near, __pyx_n_s_far, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__259)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__259);
  __Pyx_GIVEREF(__pyx_tuple__259);
  __pyx_codeobj__260 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__259, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_orthographic, 1379, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__260)) __PYX_ERR(0, 1379, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1385
 *     return result
 * 
 * def mat4_zero() -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_zero()
 *     result = mat4()
 */
  __pyx_tuple__261 = PyTuple_Pack(2, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__261)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__261);
  __Pyx_GIVEREF(__pyx_tuple__261);
  __pyx_codeobj__262 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__261, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_zero, 1385, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__262)) __PYX_ERR(0, 1385, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1391
 *     return result
 * 
 * def mat4_identity() -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_identity()
 *     result = mat4()
 */
  __pyx_tuple__263 = PyTuple_Pack(2, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__263)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__263);
  __Pyx_GIVEREF(__pyx_tuple__263);
  __pyx_codeobj__264 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__263, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_identity, 1391, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__264)) __PYX_ERR(0, 1391, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1398
 * 
 * 
 * def mat4_scale(x: float, y: float, z: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_scale(x, y, z)
 *     result = mat4()
 */
  __pyx_tuple__265 = PyTuple_Pack(5, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__265)) __PYX_ERR(0, 1398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__265);
  __Pyx_GIVEREF(__pyx_tuple__265);
  __pyx_codeobj__266 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__265, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_scale, 1398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__266)) __PYX_ERR(0, 1398, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1404
 *     return result
 * 
 * def mat4_translate(x: float, y: float, z: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_translate(x, y, z)
 *     result = mat4()
 */
  __pyx_tuple__267 = PyTuple_Pack(5, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__267)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__267);
  __Pyx_GIVEREF(__pyx_tuple__267);
  __pyx_codeobj__268 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__267, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_translate, 1404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__268)) __PYX_ERR(0, 1404, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1410
 *     return result
 * 
 * def mat4_rotate_x(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_x(angle)
 *     result = mat4()
 */
  __pyx_tuple__269 = PyTuple_Pack(4, __pyx_n_s_angle, __pyx_n_s_angle, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__269)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__269);
  __Pyx_GIVEREF(__pyx_tuple__269);
  __pyx_codeobj__270 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__269, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_rotate_x, 1410, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__270)) __PYX_ERR(0, 1410, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1416
 *     return result
 * 
 * def mat4_rotate_y(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_y(angle)
 *     result = mat4()
 */
  __pyx_tuple__271 = PyTuple_Pack(4, __pyx_n_s_angle, __pyx_n_s_angle, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__271)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__271);
  __Pyx_GIVEREF(__pyx_tuple__271);
  __pyx_codeobj__272 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__271, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_rotate_y, 1416, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__272)) __PYX_ERR(0, 1416, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1422
 *     return result
 * 
 * def mat4_rotate_z(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_z(angle)
 *     result = mat4()
 */
  __pyx_tuple__273 = PyTuple_Pack(4, __pyx_n_s_angle, __pyx_n_s_angle, __pyx_n_s_obj, __pyx_n_s_result); if (unlikely(!__pyx_tuple__273)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__273);
  __Pyx_GIVEREF(__pyx_tuple__273);
  __pyx_codeobj__274 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__273, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mat4_rotate_z, 1422, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__274)) __PYX_ERR(0, 1422, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2310
 * 
 * 
 * def mesh_cpu_create(index_count: int, vertex_count: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create(index_count, vertex_count)
 *     if c_mesh == NULL:
 */
  __pyx_tuple__275 = PyTuple_Pack(4, __pyx_n_s_index_count, __pyx_n_s_vertex_count, __pyx_n_s_c_mesh, __pyx_n_s_res); if (unlikely(!__pyx_tuple__275)) __PYX_ERR(0, 2310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__275);
  __Pyx_GIVEREF(__pyx_tuple__275);
  __pyx_codeobj__276 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__275, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mesh_cpu_create, 2310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__276)) __PYX_ERR(0, 2310, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2318
 *     return res
 * 
 * def mesh_cpu_load_obj(path: str) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *     if c_mesh == NULL:
 */
  __pyx_tuple__277 = PyTuple_Pack(3, __pyx_n_s_path, __pyx_n_s_c_mesh, __pyx_n_s_res); if (unlikely(!__pyx_tuple__277)) __PYX_ERR(0, 2318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__277);
  __Pyx_GIVEREF(__pyx_tuple__277);
  __pyx_codeobj__278 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__277, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mesh_cpu_load_obj, 2318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__278)) __PYX_ERR(0, 2318, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2326
 *     return res
 * 
 * def mesh_cpu_triangle(a: vec3, b: vec3, c: vec3) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 *     if c_mesh == NULL:
 */
  __pyx_tuple__279 = PyTuple_Pack(5, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_c_mesh, __pyx_n_s_res); if (unlikely(!__pyx_tuple__279)) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__279);
  __Pyx_GIVEREF(__pyx_tuple__279);
  __pyx_codeobj__280 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__279, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mesh_cpu_triangle, 2326, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__280)) __PYX_ERR(0, 2326, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2334
 *     return res
 * 
 * def mesh_cpu_quad(a: vec3, b: vec3, c: vec3, d: vec3) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 *     if c_mesh == NULL:
 */
  __pyx_tuple__281 = PyTuple_Pack(6, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_d, __pyx_n_s_c_mesh, __pyx_n_s_res); if (unlikely(!__pyx_tuple__281)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__281);
  __Pyx_GIVEREF(__pyx_tuple__281);
  __pyx_codeobj__282 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__281, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mesh_cpu_quad, 2334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__282)) __PYX_ERR(0, 2334, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2342
 *     return res
 * 
 * def mesh_cpu_plane(front: vec3, right: vec3, resolution: int, scale: float) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_plane(front.c_vec3, right.c_vec3, resolution, scale)
 *     if c_mesh == NULL:
 */
  __pyx_tuple__283 = PyTuple_Pack(6, __pyx_n_s_front, __pyx_n_s_right, __pyx_n_s_resolution, __pyx_n_s_scale, __pyx_n_s_c_mesh, __pyx_n_s_res); if (unlikely(!__pyx_tuple__283)) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__283);
  __Pyx_GIVEREF(__pyx_tuple__283);
  __pyx_codeobj__284 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__283, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mesh_cpu_plane, 2342, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__284)) __PYX_ERR(0, 2342, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2350
 *     return res
 * 
 * def mesh_cpu_cube(use_3d_tex_coords: bool) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_cube(use_3d_tex_coords)
 *     if c_mesh == NULL:
 */
  __pyx_tuple__285 = PyTuple_Pack(4, __pyx_n_s_use_3d_tex_coords, __pyx_n_s_use_3d_tex_coords, __pyx_n_s_c_mesh, __pyx_n_s_res); if (unlikely(!__pyx_tuple__285)) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__285);
  __Pyx_GIVEREF(__pyx_tuple__285);
  __pyx_codeobj__286 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__285, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mesh_cpu_cube, 2350, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__286)) __PYX_ERR(0, 2350, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2358
 *     return res
 * 
 * def mesh_cpu_sphere(res_u: int, res_v: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_sphere(res_u, res_v)
 *     if c_mesh == NULL:
 */
  __pyx_tuple__287 = PyTuple_Pack(4, __pyx_n_s_res_u, __pyx_n_s_res_v, __pyx_n_s_c_mesh, __pyx_n_s_res); if (unlikely(!__pyx_tuple__287)) __PYX_ERR(0, 2358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__287);
  __Pyx_GIVEREF(__pyx_tuple__287);
  __pyx_codeobj__288 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__287, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mesh_cpu_sphere, 2358, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__288)) __PYX_ERR(0, 2358, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2366
 *     return res
 * 
 * def mesh_cpu_cylinder(start: vec3, end: vec3, radius0: float, radius1: float, resolution: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create_cylinder(start.c_vec3, end.c_vec3, radius0, radius1, resolution)
 *     if c_mesh == NULL:
 */
  __pyx_tuple__289 = PyTuple_Pack(7, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_radius0, __pyx_n_s_radius1, __pyx_n_s_resolution, __pyx_n_s_c_mesh, __pyx_n_s_res); if (unlikely(!__pyx_tuple__289)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__289);
  __Pyx_GIVEREF(__pyx_tuple__289);
  __pyx_codeobj__290 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__289, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_mesh_cpu_cylinder, 2366, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__290)) __PYX_ERR(0, 2366, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2472
 * 
 * 
 * def texture_create_from_image(image: image) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create(&image.c_image)
 *     if c_texture == NULL:
 */
  __pyx_tuple__291 = PyTuple_Pack(3, __pyx_n_s_image_2, __pyx_n_s_c_texture, __pyx_n_s_res); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 2472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__291);
  __Pyx_GIVEREF(__pyx_tuple__291);
  __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_texture_create_from_image, 2472, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(0, 2472, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2480
 *     return res
 * 
 * def texture_create_blank(width: int, height: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_blank(width, height, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */
  __pyx_tuple__293 = PyTuple_Pack(7, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_formatf, __pyx_n_s_internal_format, __pyx_n_s_typef, __pyx_n_s_c_texture, __pyx_n_s_res); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 2480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__293);
  __Pyx_GIVEREF(__pyx_tuple__293);
  __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_texture_create_blank, 2480, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(0, 2480, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2488
 *     return res
 * 
 * def texture_create_array(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_array(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */
  __pyx_tuple__295 = PyTuple_Pack(8, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_depth, __pyx_n_s_formatf, __pyx_n_s_internal_format, __pyx_n_s_typef, __pyx_n_s_c_texture, __pyx_n_s_res); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 2488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__295);
  __Pyx_GIVEREF(__pyx_tuple__295);
  __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_texture_create_array, 2488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(0, 2488, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2496
 *     return res
 * 
 * def texture_creae_3d(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_3d(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */
  __pyx_tuple__297 = PyTuple_Pack(8, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_depth, __pyx_n_s_formatf, __pyx_n_s_internal_format, __pyx_n_s_typef, __pyx_n_s_c_texture, __pyx_n_s_res); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__297);
  __Pyx_GIVEREF(__pyx_tuple__297);
  __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_texture_creae_3d, 2496, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(0, 2496, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2504
 *     return res
 * 
 * def texture_create_cubemap() -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_cubemap()
 *     if c_texture == NULL:
 */
  __pyx_tuple__299 = PyTuple_Pack(2, __pyx_n_s_c_texture, __pyx_n_s_res); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__299);
  __Pyx_GIVEREF(__pyx_tuple__299);
  __pyx_codeobj__300 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_texture_create_cubemap, 2504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__300)) __PYX_ERR(0, 2504, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2594
 *         return res
 * 
 * def framebuffer_create_from_default(wnd: window) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_from_default(wnd.c_window)
 *     if c_framebuffer == NULL:
 */
  __pyx_tuple__301 = PyTuple_Pack(3, __pyx_n_s_wnd, __pyx_n_s_c_framebuffer, __pyx_n_s_res); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 2594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__301);
  __Pyx_GIVEREF(__pyx_tuple__301);
  __pyx_codeobj__302 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_framebuffer_create_from_default, 2594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__302)) __PYX_ERR(0, 2594, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2602
 *     return res
 * 
 * def framebuffer_create(width: int, height: int) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create(width, height)
 *     if c_framebuffer == NULL:
 */
  __pyx_tuple__303 = PyTuple_Pack(4, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_c_framebuffer, __pyx_n_s_res); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 2602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__303);
  __Pyx_GIVEREF(__pyx_tuple__303);
  __pyx_codeobj__304 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_framebuffer_create, 2602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__304)) __PYX_ERR(0, 2602, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2610
 *     return res
 * 
 * def framebuffer_create_basic(width: int, height: int) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_basic(width, height)
 *     if c_framebuffer == NULL:
 */
  __pyx_tuple__305 = PyTuple_Pack(4, __pyx_n_s_width, __pyx_n_s_height, __pyx_n_s_c_framebuffer, __pyx_n_s_res); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 2610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__305);
  __Pyx_GIVEREF(__pyx_tuple__305);
  __pyx_codeobj__306 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_framebuffer_create_basic, 2610, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__306)) __PYX_ERR(0, 2610, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2618
 *     return res
 * 
 * def gl_clear(r: float, g: float, b: float, a: float):             # <<<<<<<<<<<<<<
 *     CGL_gl_clear(r, g, b, a)
 * 
 */
  __pyx_tuple__307 = PyTuple_Pack(4, __pyx_n_s_r, __pyx_n_s_g, __pyx_n_s_b, __pyx_n_s_a); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__307);
  __Pyx_GIVEREF(__pyx_tuple__307);
  __pyx_codeobj__308 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_gl_clear, 2618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__308)) __PYX_ERR(0, 2618, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2621
 *     CGL_gl_clear(r, g, b, a)
 * 
 * def gl_init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_gl_init()
 * 
 */
  __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_gl_init, 2621, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(0, 2621, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2624
 *     return CGL_gl_init()
 * 
 * def gl_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_gl_shutdown()
 * 
 */
  __pyx_codeobj__310 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_gl_shutdown, 2624, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__310)) __PYX_ERR(0, 2624, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2627
 *     CGL_gl_shutdown()
 * 
 * def gl_render_screen_quad():             # <<<<<<<<<<<<<<
 *     CGL_gl_render_screen_quad()
 * 
 */
  __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_gl_render_screen_quad, 2627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(0, 2627, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2893
 *             self.has_been_destroyed = True
 * 
 * def ssbo_copy(dst: ssbo, src: ssbo, src_offset: int, dst_offset: int, size: int):             # <<<<<<<<<<<<<<
 *     CGL_ssbo_copy(dst.c_ssbo, src.c_ssbo, src_offset, dst_offset, size)
 * 
 */
  __pyx_tuple__312 = PyTuple_Pack(5, __pyx_n_s_dst, __pyx_n_s_src, __pyx_n_s_src_offset, __pyx_n_s_dst_offset, __pyx_n_s_size); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 2893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__312);
  __Pyx_GIVEREF(__pyx_tuple__312);
  __pyx_codeobj__313 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__312, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_ssbo_copy, 2893, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__313)) __PYX_ERR(0, 2893, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3031
 *         return self.vertices_count
 * 
 * def sat_collison_overlap_on_axis(a: shape, b: shape, axis: vec2) -> (bool, float):             # <<<<<<<<<<<<<<
 *     cdef float overlap_amount
 *     result = CGL_sat_collision_overlap_on_axis(&a.c_shape, &b.c_shape, axis.c_vec2, &overlap_amount)
 */
  __pyx_tuple__314 = PyTuple_Pack(5, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_axis, __pyx_n_s_overlap_amount, __pyx_n_s_result); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__314);
  __Pyx_GIVEREF(__pyx_tuple__314);
  __pyx_codeobj__315 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_sat_collison_overlap_on_axis, 3031, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__315)) __PYX_ERR(0, 3031, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3036
 *     return (result, overlap_amount)
 * 
 * def  sat_collision_detect(a: shape, b: shape) -> tuple:             # <<<<<<<<<<<<<<
 *     n_vector = vec2(0, 0)
 *     result = CGL_sat_collision_detect(&a.c_shape, &b.c_shape, &n_vector.c_vec2)
 */
  __pyx_tuple__316 = PyTuple_Pack(4, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_n_vector, __pyx_n_s_result); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 3036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__316);
  __Pyx_GIVEREF(__pyx_tuple__316);
  __pyx_codeobj__317 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_sat_collision_detect, 3036, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__317)) __PYX_ERR(0, 3036, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3041
 *     return (result, n_vector)
 * 
 * def sat_collision_calculate_axes(a: shape, max_axes: int = 10000) -> list:             # <<<<<<<<<<<<<<
 *     cdef int axes_count
 *     cdef CGL_vec2* axes = <CGL_vec2*>stdlib.malloc(max_axes * sizeof(CGL_vec2))
 */
  __pyx_tuple__318 = PyTuple_Pack(6, __pyx_n_s_a, __pyx_n_s_max_axes, __pyx_n_s_axes_count, __pyx_n_s_axes, __pyx_n_s_result, __pyx_n_s_i); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__318);
  __Pyx_GIVEREF(__pyx_tuple__318);
  __pyx_codeobj__319 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_sat_collision_calculate_axes, 3041, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__319)) __PYX_ERR(0, 3041, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3051
 *     return result
 * 
 * def is_point_in_circle(point: vec2, circle_radius: float) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_point_in_circle(point.c_vec2, circle_radius)
 * 
 */
  __pyx_tuple__320 = PyTuple_Pack(2, __pyx_n_s_point, __pyx_n_s_circle_radius); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 3051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__320);
  __Pyx_GIVEREF(__pyx_tuple__320);
  __pyx_codeobj__321 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_is_point_in_circle, 3051, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__321)) __PYX_ERR(0, 3051, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3054
 *     return CGL_utils_is_point_in_circle(point.c_vec2, circle_radius)
 * 
 * def is_point_in_triangle(point: vec2, a: vec2, b: vec2, c: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_point_in_triangle(point.c_vec2, a.c_vec2, b.c_vec2, c.c_vec2)
 * 
 */
  __pyx_tuple__322 = PyTuple_Pack(4, __pyx_n_s_point, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__322);
  __Pyx_GIVEREF(__pyx_tuple__322);
  __pyx_codeobj__323 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__322, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_is_point_in_triangle, 3054, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__323)) __PYX_ERR(0, 3054, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3057
 *     return CGL_utils_is_point_in_triangle(point.c_vec2, a.c_vec2, b.c_vec2, c.c_vec2)
 * 
 * def calculate_circumcircle(a: vec2, b: vec2, c: vec2) -> tuple:             # <<<<<<<<<<<<<<
 *     center = vec2(0, 0)
 *     cdef float f_radius = 0
 */
  __pyx_tuple__324 = PyTuple_Pack(5, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_center, __pyx_n_s_f_radius); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__324);
  __Pyx_GIVEREF(__pyx_tuple__324);
  __pyx_codeobj__325 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__324, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_calculate_circumcircle, 3057, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__325)) __PYX_ERR(0, 3057, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3063
 *     return (center, f_radius)
 * 
 * def calculate_super_triangle(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */
  __pyx_tuple__326 = PyTuple_Pack(7, __pyx_n_s_vertices, __pyx_n_s_padding, __pyx_n_s_c_vertices, __pyx_n_s_i, __pyx_n_s_r_a, __pyx_n_s_r_b, __pyx_n_s_r_c); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__326);
  __Pyx_GIVEREF(__pyx_tuple__326);
  __pyx_codeobj__327 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_calculate_super_triangle, 3063, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__327)) __PYX_ERR(0, 3063, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3075
 *     return (r_a, r_b, r_c)
 * 
 * def calculate_bounding_square(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */
  __pyx_tuple__328 = PyTuple_Pack(8, __pyx_n_s_vertices, __pyx_n_s_padding, __pyx_n_s_c_vertices, __pyx_n_s_i, __pyx_n_s_r_a, __pyx_n_s_r_b, __pyx_n_s_r_c, __pyx_n_s_r_d); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 3075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__328);
  __Pyx_GIVEREF(__pyx_tuple__328);
  __pyx_codeobj__329 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__328, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_calculate_bounding_square, 3075, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__329)) __PYX_ERR(0, 3075, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3088
 *     return (r_a, r_b, r_c, r_d)
 * 
 * def calculate_bounding_box(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */
  __pyx_tuple__330 = PyTuple_Pack(8, __pyx_n_s_vertices, __pyx_n_s_padding, __pyx_n_s_c_vertices, __pyx_n_s_i, __pyx_n_s_r_a, __pyx_n_s_r_b, __pyx_n_s_r_c, __pyx_n_s_r_d); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 3088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__330);
  __Pyx_GIVEREF(__pyx_tuple__330);
  __pyx_codeobj__331 = (PyObject*)__Pyx_PyCode_New(2, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_calculate_bounding_box, 3088, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__331)) __PYX_ERR(0, 3088, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3101
 *     return (r_a, r_b, r_c, r_d)
 * 
 * def random_gaussian(mean: float, std_dev: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_utils_random_gaussian(mean, std_dev)
 * 
 */
  __pyx_tuple__332 = PyTuple_Pack(2, __pyx_n_s_mean, __pyx_n_s_std_dev); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 3101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__332);
  __Pyx_GIVEREF(__pyx_tuple__332);
  __pyx_codeobj__333 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_random_gaussian, 3101, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__333)) __PYX_ERR(0, 3101, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3104
 *     return CGL_utils_random_gaussian(mean, std_dev)
 * 
 * def gjk_shape_default_support(a: shape, d: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     return CGL_gjk_shape_default_support(&a.c_shape, d.c_vec3)
 * 
 */
  __pyx_tuple__334 = PyTuple_Pack(2, __pyx_n_s_a, __pyx_n_s_d); if (unlikely(!__pyx_tuple__334)) __PYX_ERR(0, 3104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__334);
  __Pyx_GIVEREF(__pyx_tuple__334);
  __pyx_codeobj__335 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__334, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_gjk_shape_default_support, 3104, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__335)) __PYX_ERR(0, 3104, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3107
 *     return CGL_gjk_shape_default_support(&a.c_shape, d.c_vec3)
 * 
 * def gjk_default_support(a: shape, b: shape, d: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     return CGL_gjk_default_support(&a.c_shape, &b.c_shape, d.c_vec3)
 * 
 */
  __pyx_tuple__336 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_d); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 3107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__336);
  __Pyx_GIVEREF(__pyx_tuple__336);
  __pyx_codeobj__337 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_gjk_default_support, 3107, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__337)) __PYX_ERR(0, 3107, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3110
 *     return CGL_gjk_default_support(&a.c_shape, &b.c_shape, d.c_vec3)
 * 
 * def gjk_check_collision_2d(a: shape, b: shape) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3* simplex_out_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     result = CGL_gjk_check_collision_2d(&a.c_shape, &b.c_shape, simplex_out_ptr)
 */
  __pyx_tuple__338 = PyTuple_Pack(6, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_simplex_out_ptr, __pyx_n_s_result, __pyx_n_s_simplex_out, __pyx_n_s_i); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 3110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__338);
  __Pyx_GIVEREF(__pyx_tuple__338);
  __pyx_codeobj__339 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__338, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_gjk_check_collision_2d, 3110, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__339)) __PYX_ERR(0, 3110, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3119
 *     return (result, simplex_out)
 * 
 * def gjk_epa_2d(a: shape, b: shape, simplex: list) ->  vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3* simplex_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     for i in range(3):
 */
  __pyx_tuple__340 = PyTuple_Pack(6, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_simplex, __pyx_n_s_simplex_ptr, __pyx_n_s_i, __pyx_n_s_result); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 3119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__340);
  __Pyx_GIVEREF(__pyx_tuple__340);
  __pyx_codeobj__341 = (PyObject*)__Pyx_PyCode_New(3, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__340, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_gjk_epa_2d, 3119, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__341)) __PYX_ERR(0, 3119, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3129
 *     return vec3(result.x, result.y, result.z)
 * 
 * def aabb_contains_point(aabb_min: vec2, aabb_max: vec2, point: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_aabb_contains_point(aabb_min.c_vec2, aabb_max.c_vec2, point.c_vec2)
 * 
 */
  __pyx_tuple__342 = PyTuple_Pack(3, __pyx_n_s_aabb_min, __pyx_n_s_aabb_max, __pyx_n_s_point); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 3129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__342);
  __Pyx_GIVEREF(__pyx_tuple__342);
  __pyx_codeobj__343 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__342, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_aabb_contains_point, 3129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__343)) __PYX_ERR(0, 3129, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3132
 *     return CGL_aabb_contains_point(aabb_min.c_vec2, aabb_max.c_vec2, point.c_vec2)
 * 
 * def aabb_intersects_aabb(aabb_min_a: vec2, aabb_max_a: vec2, aabb_min_b: vec2, aabb_max_b: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_aabb_intersects_aabb(aabb_min_a.c_vec2, aabb_max_a.c_vec2, aabb_min_b.c_vec2, aabb_max_b.c_vec2)
 * 
 */
  __pyx_tuple__344 = PyTuple_Pack(4, __pyx_n_s_aabb_min_a, __pyx_n_s_aabb_max_a, __pyx_n_s_aabb_min_b, __pyx_n_s_aabb_max_b); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 3132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__344);
  __Pyx_GIVEREF(__pyx_tuple__344);
  __pyx_codeobj__345 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__344, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_aabb_intersects_aabb, 3132, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__345)) __PYX_ERR(0, 3132, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3135
 *     return CGL_aabb_intersects_aabb(aabb_min_a.c_vec2, aabb_max_a.c_vec2, aabb_min_b.c_vec2, aabb_max_b.c_vec2)
 * 
 * def triangulate_points_incremental(points: list) -> list:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_points = <CGL_vec2*>stdlib.malloc(len(points) * sizeof(CGL_vec2))
 *     for i in range(len(points)):
 */
  __pyx_tuple__346 = PyTuple_Pack(6, __pyx_n_s_points, __pyx_n_s_c_points, __pyx_n_s_i, __pyx_n_s_c_indices, __pyx_n_s_c_num_indices, __pyx_n_s_indices); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 3135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__346);
  __Pyx_GIVEREF(__pyx_tuple__346);
  __pyx_codeobj__347 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__346, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_triangulate_points_incremental, 3135, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__347)) __PYX_ERR(0, 3135, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3447
 * 
 * 
 * def text_init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_text_init()
 * 
 */
  __pyx_codeobj__348 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_text_init, 3447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__348)) __PYX_ERR(0, 3447, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3450
 *     return CGL_text_init()
 * 
 * def text_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_text_shutdown()
 * 
 */
  __pyx_codeobj__349 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_text_shutdown, 3450, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__349)) __PYX_ERR(0, 3450, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3460
 * 
 *     @staticmethod
 *     def create_context(max_vertices: int, max_indices: int) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_widgets_context_create(max_vertices, max_indices)
 * 
 */
  __pyx_tuple__350 = PyTuple_Pack(2, __pyx_n_s_max_vertices, __pyx_n_s_max_indices); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 3460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__350);
  __Pyx_GIVEREF(__pyx_tuple__350);
  __pyx_codeobj__351 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_create_context, 3460, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__351)) __PYX_ERR(0, 3460, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3464
 * 
 *     @staticmethod
 *     def destroy_context(ctx: object):             # <<<<<<<<<<<<<<
 *         CGL_widgets_context_destory(<CGL_widgets_context*>ctx)
 * 
 */
  __pyx_tuple__352 = PyTuple_Pack(1, __pyx_n_s_ctx); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 3464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__352);
  __Pyx_GIVEREF(__pyx_tuple__352);
  __pyx_codeobj__353 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_destroy_context, 3464, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__353)) __PYX_ERR(0, 3464, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3468
 * 
 *     @staticmethod
 *     def get_current_context() -> object:             # <<<<<<<<<<<<<<
 *         # NOTE: this is a type in the original C code,
 *         #       not some kind of a bug here
 */
  __pyx_codeobj__354 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_get_current_context, 3468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__354)) __PYX_ERR(0, 3468, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3475
 * 
 *     @staticmethod
 *     def set_current_context(ctx: object):             # <<<<<<<<<<<<<<
 *         # NOTE: this is a type in the original C code,
 *         #       not some kind of a bug here
 */
  __pyx_tuple__355 = PyTuple_Pack(1, __pyx_n_s_ctx); if (unlikely(!__pyx_tuple__355)) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__355);
  __Pyx_GIVEREF(__pyx_tuple__355);
  __pyx_codeobj__356 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__355, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_current_context, 3475, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__356)) __PYX_ERR(0, 3475, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3482
 * 
 *     @staticmethod
 *     def init():             # <<<<<<<<<<<<<<
 *         CGL_widgets_init()
 * 
 */
  __pyx_codeobj__357 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_init, 3482, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__357)) __PYX_ERR(0, 3482, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3486
 * 
 *     @staticmethod
 *     def shutdown():             # <<<<<<<<<<<<<<
 *         CGL_widgets_shutdown()
 * 
 */
  __pyx_codeobj__358 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_shutdown, 3486, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__358)) __PYX_ERR(0, 3486, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3490
 * 
 *     @staticmethod
 *     def begin():             # <<<<<<<<<<<<<<
 *         CGL_widgets_begin()
 * 
 */
  __pyx_codeobj__359 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_begin, 3490, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__359)) __PYX_ERR(0, 3490, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3494
 * 
 *     @staticmethod
 *     def begin_int(scale_x: float, scale_y: float, offset_x: float, offset_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_begin_int(scale_x, scale_y, offset_x, offset_y)
 * 
 */
  __pyx_tuple__360 = PyTuple_Pack(4, __pyx_n_s_scale_x, __pyx_n_s_scale_y, __pyx_n_s_offset_x, __pyx_n_s_offset_y); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 3494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__360);
  __Pyx_GIVEREF(__pyx_tuple__360);
  __pyx_codeobj__361 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__360, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_begin_int, 3494, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__361)) __PYX_ERR(0, 3494, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3498
 * 
 *     @staticmethod
 *     def end():             # <<<<<<<<<<<<<<
 *         CGL_widgets_end()
 * 
 */
  __pyx_codeobj__362 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_end, 3498, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__362)) __PYX_ERR(0, 3498, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3502
 * 
 *     @staticmethod
 *     def flush():             # <<<<<<<<<<<<<<
 *         CGL_widgets_flush()
 * 
 */
  __pyx_codeobj__363 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_flush, 3502, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__363)) __PYX_ERR(0, 3502, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3506
 * 
 *     @staticmethod
 *     def flush_if_required():             # <<<<<<<<<<<<<<
 *         CGL_widgets_flush_if_required()
 * 
 */
  __pyx_codeobj__364 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_flush_if_required, 3506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__364)) __PYX_ERR(0, 3506, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3510
 * 
 *     @staticmethod
 *     def add_vertex(v: mesh_vertex):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex(&v.c_vertex)
 * 
 */
  __pyx_tuple__365 = PyTuple_Pack(1, __pyx_n_s_v); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(0, 3510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__365);
  __Pyx_GIVEREF(__pyx_tuple__365);
  __pyx_codeobj__366 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__365, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_vertex, 3510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__366)) __PYX_ERR(0, 3510, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3514
 * 
 *     @staticmethod
 *     def add_mesh(m: mesh_cpu):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_mesh(m.c_mesh)
 * 
 */
  __pyx_tuple__367 = PyTuple_Pack(1, __pyx_n_s_m); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 3514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__367);
  __Pyx_GIVEREF(__pyx_tuple__367);
  __pyx_codeobj__368 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_mesh, 3514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__368)) __PYX_ERR(0, 3514, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3518
 * 
 *     @staticmethod
 *     def add_vertex_p(v: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p(v.c_vec3)
 * 
 */
  __pyx_tuple__369 = PyTuple_Pack(1, __pyx_n_s_v); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__369);
  __Pyx_GIVEREF(__pyx_tuple__369);
  __pyx_codeobj__370 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__369, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_vertex_p, 3518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__370)) __PYX_ERR(0, 3518, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3522
 * 
 *     @staticmethod
 *     def add_vertex_p3f(x: float, y: float, z: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3f(x, y, z)
 * 
 */
  __pyx_tuple__371 = PyTuple_Pack(3, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z); if (unlikely(!__pyx_tuple__371)) __PYX_ERR(0, 3522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__371);
  __Pyx_GIVEREF(__pyx_tuple__371);
  __pyx_codeobj__372 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__371, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_vertex_p3f, 3522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__372)) __PYX_ERR(0, 3522, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3526
 * 
 *     @staticmethod
 *     def add_vertex_pt(v: vec3, t: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_pt(v.c_vec3, t.c_vec2)
 * 
 */
  __pyx_tuple__373 = PyTuple_Pack(2, __pyx_n_s_v, __pyx_n_s_t); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 3526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__373);
  __Pyx_GIVEREF(__pyx_tuple__373);
  __pyx_codeobj__374 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_vertex_pt, 3526, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__374)) __PYX_ERR(0, 3526, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3530
 * 
 *     @staticmethod
 *     def add_vertex_p3ft(x: float, y: float, z: float, t: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3ft(x, y, z, t.c_vec2)
 * 
 */
  __pyx_tuple__375 = PyTuple_Pack(4, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_t); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 3530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__375);
  __Pyx_GIVEREF(__pyx_tuple__375);
  __pyx_codeobj__376 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_vertex_p3ft, 3530, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__376)) __PYX_ERR(0, 3530, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3534
 * 
 *     @staticmethod
 *     def add_vertex_pt2f(v: vec3, t0: float, t1: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_pt2f(v.c_vec3, t0, t1)
 * 
 */
  __pyx_tuple__377 = PyTuple_Pack(3, __pyx_n_s_v, __pyx_n_s_t0, __pyx_n_s_t1); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 3534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__377);
  __Pyx_GIVEREF(__pyx_tuple__377);
  __pyx_codeobj__378 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_vertex_pt2f, 3534, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__378)) __PYX_ERR(0, 3534, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3538
 * 
 *     @staticmethod
 *     def add_vertex_p3ft2f(x: float, y: float, z: float, u: float, v: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3ft2f(x, y, z, u, v)
 * 
 */
  __pyx_tuple__379 = PyTuple_Pack(5, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_u, __pyx_n_s_v); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(0, 3538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__379);
  __Pyx_GIVEREF(__pyx_tuple__379);
  __pyx_codeobj__380 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_vertex_p3ft2f, 3538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__380)) __PYX_ERR(0, 3538, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3542
 * 
 *     @staticmethod
 *     def set_stroke_color(c: vec4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_color(c.c_vec4)
 * 
 */
  __pyx_tuple__381 = PyTuple_Pack(1, __pyx_n_s_c); if (unlikely(!__pyx_tuple__381)) __PYX_ERR(0, 3542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__381);
  __Pyx_GIVEREF(__pyx_tuple__381);
  __pyx_codeobj__382 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__381, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_stroke_color, 3542, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__382)) __PYX_ERR(0, 3542, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3546
 * 
 *     @staticmethod
 *     def set_stroke_colorf(r: float, g: float, b: float, a: float = 1.0):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_colorf(r, g, b, a)
 * 
 */
  __pyx_tuple__383 = PyTuple_Pack(4, __pyx_n_s_r, __pyx_n_s_g, __pyx_n_s_b, __pyx_n_s_a); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(0, 3546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__383);
  __Pyx_GIVEREF(__pyx_tuple__383);
  __pyx_codeobj__384 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__383, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_stroke_colorf, 3546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__384)) __PYX_ERR(0, 3546, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3550
 * 
 *     @staticmethod
 *     def set_stroke_thickness(t: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_thicnkess(t)
 * 
 */
  __pyx_tuple__385 = PyTuple_Pack(1, __pyx_n_s_t); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(0, 3550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__385);
  __Pyx_GIVEREF(__pyx_tuple__385);
  __pyx_codeobj__386 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__385, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_stroke_thickness, 3550, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__386)) __PYX_ERR(0, 3550, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3554
 * 
 *     @staticmethod
 *     def set_fill_color(c: vec4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_color(c.c_vec4)
 * 
 */
  __pyx_tuple__387 = PyTuple_Pack(1, __pyx_n_s_c); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(0, 3554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__387);
  __Pyx_GIVEREF(__pyx_tuple__387);
  __pyx_codeobj__388 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__387, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_fill_color, 3554, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__388)) __PYX_ERR(0, 3554, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3558
 * 
 *     @staticmethod
 *     def set_fill_colorf(r: float, g: float, b: float, a: float = 1.0):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_colorf(r, g, b, a)
 * 
 */
  __pyx_tuple__389 = PyTuple_Pack(4, __pyx_n_s_r, __pyx_n_s_g, __pyx_n_s_b, __pyx_n_s_a); if (unlikely(!__pyx_tuple__389)) __PYX_ERR(0, 3558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__389);
  __Pyx_GIVEREF(__pyx_tuple__389);
  __pyx_codeobj__390 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__389, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_fill_colorf, 3558, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__390)) __PYX_ERR(0, 3558, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3562
 * 
 *     @staticmethod
 *     def set_fill_mode(enebled: bool):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_mode(enebled)
 * 
 */
  __pyx_tuple__391 = PyTuple_Pack(1, __pyx_n_s_enebled); if (unlikely(!__pyx_tuple__391)) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__391);
  __Pyx_GIVEREF(__pyx_tuple__391);
  __pyx_codeobj__392 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__391, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_fill_mode, 3562, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__392)) __PYX_ERR(0, 3562, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3566
 * 
 *     @staticmethod
 *     def set_projection_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_projection_matrix(&m.c_mat4)
 * 
 */
  __pyx_tuple__393 = PyTuple_Pack(1, __pyx_n_s_m); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__393);
  __Pyx_GIVEREF(__pyx_tuple__393);
  __pyx_codeobj__394 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__393, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_projection_matrix, 3566, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__394)) __PYX_ERR(0, 3566, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3570
 * 
 *     @staticmethod
 *     def enable_diffuse_shading(light_pos: vec3, light_color: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_enable_diffuse_shading(light_pos.c_vec3, light_color.c_vec3)
 * 
 */
  __pyx_tuple__395 = PyTuple_Pack(2, __pyx_n_s_light_pos, __pyx_n_s_light_color); if (unlikely(!__pyx_tuple__395)) __PYX_ERR(0, 3570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__395);
  __Pyx_GIVEREF(__pyx_tuple__395);
  __pyx_codeobj__396 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__395, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_enable_diffuse_shading, 3570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__396)) __PYX_ERR(0, 3570, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3574
 * 
 *     @staticmethod
 *     def disable_diffuse_shading():             # <<<<<<<<<<<<<<
 *         CGL_widgets_disable_diffuse_shading()
 * 
 */
  __pyx_codeobj__397 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_disable_diffuse_shading, 3574, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__397)) __PYX_ERR(0, 3574, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3578
 * 
 *     @staticmethod
 *     def set_view_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_view_matrix(&m.c_mat4)
 * 
 */
  __pyx_tuple__398 = PyTuple_Pack(1, __pyx_n_s_m); if (unlikely(!__pyx_tuple__398)) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__398);
  __Pyx_GIVEREF(__pyx_tuple__398);
  __pyx_codeobj__399 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__398, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_view_matrix, 3578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__399)) __PYX_ERR(0, 3578, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3582
 * 
 *     @staticmethod
 *     def set_model_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_model_matrix(&m.c_mat4)
 * 
 */
  __pyx_tuple__400 = PyTuple_Pack(1, __pyx_n_s_m); if (unlikely(!__pyx_tuple__400)) __PYX_ERR(0, 3582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__400);
  __Pyx_GIVEREF(__pyx_tuple__400);
  __pyx_codeobj__401 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__400, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_model_matrix, 3582, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__401)) __PYX_ERR(0, 3582, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3586
 * 
 *     @staticmethod
 *     def set_texture(tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_texture(tex.c_texture)
 * 
 */
  __pyx_tuple__402 = PyTuple_Pack(1, __pyx_n_s_tex); if (unlikely(!__pyx_tuple__402)) __PYX_ERR(0, 3586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__402);
  __Pyx_GIVEREF(__pyx_tuple__402);
  __pyx_codeobj__403 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__402, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_texture, 3586, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__403)) __PYX_ERR(0, 3586, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3590
 * 
 *     @staticmethod
 *     def set_font_texture(tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_font_texture(tex.c_texture)
 * 
 */
  __pyx_tuple__404 = PyTuple_Pack(1, __pyx_n_s_tex); if (unlikely(!__pyx_tuple__404)) __PYX_ERR(0, 3590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__404);
  __Pyx_GIVEREF(__pyx_tuple__404);
  __pyx_codeobj__405 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__404, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_font_texture, 3590, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__405)) __PYX_ERR(0, 3590, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3594
 * 
 *     @staticmethod
 *     def set_texture_coordinate_so(scale_x: float, scale_y: float, offset_x: float, offset_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_texture_coordinate_so(scale_x, scale_y, offset_x, offset_y)
 * 
 */
  __pyx_tuple__406 = PyTuple_Pack(4, __pyx_n_s_scale_x, __pyx_n_s_scale_y, __pyx_n_s_offset_x, __pyx_n_s_offset_y); if (unlikely(!__pyx_tuple__406)) __PYX_ERR(0, 3594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__406);
  __Pyx_GIVEREF(__pyx_tuple__406);
  __pyx_codeobj__407 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__406, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_set_texture_coordinate_so, 3594, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__407)) __PYX_ERR(0, 3594, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3598
 * 
 *     @staticmethod
 *     def apply_transformations_on_cpu():             # <<<<<<<<<<<<<<
 *         CGL_widgets_apply_transformations_on_cpu()
 * 
 */
  __pyx_codeobj__408 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_apply_transformations_on_cpu, 3598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__408)) __PYX_ERR(0, 3598, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3602
 * 
 *     @staticmethod
 *     def apply_transformations_on_gpu():             # <<<<<<<<<<<<<<
 *         CGL_widgets_apply_transformations_on_gpu()
 * 
 */
  __pyx_codeobj__409 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_apply_transformations_on_gpu, 3602, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__409)) __PYX_ERR(0, 3602, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3606
 * 
 *     @staticmethod
 *     def add_triangle(a: vec3, b: vec3, c: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 * 
 */
  __pyx_tuple__410 = PyTuple_Pack(3, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c); if (unlikely(!__pyx_tuple__410)) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__410);
  __Pyx_GIVEREF(__pyx_tuple__410);
  __pyx_codeobj__411 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__410, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_triangle, 3606, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__411)) __PYX_ERR(0, 3606, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3610
 * 
 *     @staticmethod
 *     def add_quad(a: vec3, b: vec3, c: vec3, d: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 * 
 */
  __pyx_tuple__412 = PyTuple_Pack(4, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_c, __pyx_n_s_d); if (unlikely(!__pyx_tuple__412)) __PYX_ERR(0, 3610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__412);
  __Pyx_GIVEREF(__pyx_tuple__412);
  __pyx_codeobj__413 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__412, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_quad, 3610, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__413)) __PYX_ERR(0, 3610, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3614
 * 
 *     @staticmethod
 *     def add_quad_8f(a_x: float, a_y: float, b_x: float, b_y: float, c_x: float, c_y: float, d_x: float, d_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_quad_8f(a_x, a_y, b_x, b_y, c_x, c_y, d_x, d_y)
 * 
 */
  __pyx_tuple__414 = PyTuple_Pack(8, __pyx_n_s_a_x, __pyx_n_s_a_y, __pyx_n_s_b_x, __pyx_n_s_b_y, __pyx_n_s_c_x, __pyx_n_s_c_y, __pyx_n_s_d_x, __pyx_n_s_d_y); if (unlikely(!__pyx_tuple__414)) __PYX_ERR(0, 3614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__414);
  __Pyx_GIVEREF(__pyx_tuple__414);
  __pyx_codeobj__415 = (PyObject*)__Pyx_PyCode_New(8, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__414, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_quad_8f, 3614, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__415)) __PYX_ERR(0, 3614, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3618
 * 
 *     @staticmethod
 *     def add_line(start: vec3, end: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_line(start.c_vec3, end.c_vec3)
 * 
 */
  __pyx_tuple__416 = PyTuple_Pack(2, __pyx_n_s_start, __pyx_n_s_end); if (unlikely(!__pyx_tuple__416)) __PYX_ERR(0, 3618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__416);
  __Pyx_GIVEREF(__pyx_tuple__416);
  __pyx_codeobj__417 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_line, 3618, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__417)) __PYX_ERR(0, 3618, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3622
 * 
 *     @staticmethod
 *     def add_line2f(start_x: float, start_y: float, end_x: float, end_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_line2f(start_x, start_y, end_x, end_y)
 * 
 */
  __pyx_tuple__418 = PyTuple_Pack(4, __pyx_n_s_start_x, __pyx_n_s_start_y, __pyx_n_s_end_x, __pyx_n_s_end_y); if (unlikely(!__pyx_tuple__418)) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__418);
  __Pyx_GIVEREF(__pyx_tuple__418);
  __pyx_codeobj__419 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__418, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_line2f, 3622, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__419)) __PYX_ERR(0, 3622, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3626
 * 
 *     @staticmethod
 *     def add_rect(start: vec3, size: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_rect(start.c_vec3, size.c_vec2)
 * 
 */
  __pyx_tuple__420 = PyTuple_Pack(2, __pyx_n_s_start, __pyx_n_s_size); if (unlikely(!__pyx_tuple__420)) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__420);
  __Pyx_GIVEREF(__pyx_tuple__420);
  __pyx_codeobj__421 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__420, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_rect, 3626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__421)) __PYX_ERR(0, 3626, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3630
 * 
 *     @staticmethod
 *     def add_rect2f(start_x: float, start_y: float, size_x: float, size_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_rect2f(start_x, start_y, size_x, size_y)
 * 
 */
  __pyx_tuple__422 = PyTuple_Pack(4, __pyx_n_s_start_x, __pyx_n_s_start_y, __pyx_n_s_size_x, __pyx_n_s_size_y); if (unlikely(!__pyx_tuple__422)) __PYX_ERR(0, 3630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__422);
  __Pyx_GIVEREF(__pyx_tuple__422);
  __pyx_codeobj__423 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__422, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_rect2f, 3630, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__423)) __PYX_ERR(0, 3630, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3634
 * 
 *     @staticmethod
 *     def add_circle(position: vec3, radius: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle(position.c_vec3, radius)
 * 
 */
  __pyx_tuple__424 = PyTuple_Pack(2, __pyx_n_s_position, __pyx_n_s_radius); if (unlikely(!__pyx_tuple__424)) __PYX_ERR(0, 3634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__424);
  __Pyx_GIVEREF(__pyx_tuple__424);
  __pyx_codeobj__425 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__424, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_circle, 3634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__425)) __PYX_ERR(0, 3634, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3638
 * 
 *     @staticmethod
 *     def add_circle2f(position_x: float, position_y: float, radius: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle2f(position_x, position_y, radius)
 * 
 */
  __pyx_tuple__426 = PyTuple_Pack(3, __pyx_n_s_position_x, __pyx_n_s_position_y, __pyx_n_s_radius); if (unlikely(!__pyx_tuple__426)) __PYX_ERR(0, 3638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__426);
  __Pyx_GIVEREF(__pyx_tuple__426);
  __pyx_codeobj__427 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__426, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_circle2f, 3638, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__427)) __PYX_ERR(0, 3638, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3642
 * 
 *     @staticmethod
 *     def add_circler(position: vec3, radius: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circler(position.c_vec3, radius, segments)
 * 
 */
  __pyx_tuple__428 = PyTuple_Pack(3, __pyx_n_s_position, __pyx_n_s_radius, __pyx_n_s_segments); if (unlikely(!__pyx_tuple__428)) __PYX_ERR(0, 3642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__428);
  __Pyx_GIVEREF(__pyx_tuple__428);
  __pyx_codeobj__429 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__428, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_circler, 3642, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__429)) __PYX_ERR(0, 3642, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3646
 * 
 *     @staticmethod
 *     def add_circler2fr(position_x: float, position_y: float, radius: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle2fr(position_x, position_y, radius, segments)
 * 
 */
  __pyx_tuple__430 = PyTuple_Pack(4, __pyx_n_s_position_x, __pyx_n_s_position_y, __pyx_n_s_radius, __pyx_n_s_segments); if (unlikely(!__pyx_tuple__430)) __PYX_ERR(0, 3646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__430);
  __Pyx_GIVEREF(__pyx_tuple__430);
  __pyx_codeobj__431 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__430, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_circler2fr, 3646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__431)) __PYX_ERR(0, 3646, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3650
 * 
 *     @staticmethod
 *     def add_oval(position: vec3, radius: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_oval(position.c_vec3, radius.c_vec2)
 * 
 */
  __pyx_tuple__432 = PyTuple_Pack(2, __pyx_n_s_position, __pyx_n_s_radius); if (unlikely(!__pyx_tuple__432)) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__432);
  __Pyx_GIVEREF(__pyx_tuple__432);
  __pyx_codeobj__433 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__432, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_oval, 3650, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__433)) __PYX_ERR(0, 3650, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3654
 * 
 *     @staticmethod
 *     def add_oval2f(position_x: float, position_y: float, radius_x: float, radius_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_oval2f(position_x, position_y, radius_x, radius_y)
 * 
 */
  __pyx_tuple__434 = PyTuple_Pack(4, __pyx_n_s_position_x, __pyx_n_s_position_y, __pyx_n_s_radius_x, __pyx_n_s_radius_y); if (unlikely(!__pyx_tuple__434)) __PYX_ERR(0, 3654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__434);
  __Pyx_GIVEREF(__pyx_tuple__434);
  __pyx_codeobj__435 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__434, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_oval2f, 3654, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__435)) __PYX_ERR(0, 3654, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3658
 * 
 *     @staticmethod
 *     def add_arc2f(position_x: float, position_y: float, radius: float, start_angle: float, end_angle: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_arc2f(position_x, position_y, radius, start_angle, end_angle, segments)
 * 
 */
  __pyx_tuple__436 = PyTuple_Pack(6, __pyx_n_s_position_x, __pyx_n_s_position_y, __pyx_n_s_radius, __pyx_n_s_start_angle, __pyx_n_s_end_angle, __pyx_n_s_segments); if (unlikely(!__pyx_tuple__436)) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__436);
  __Pyx_GIVEREF(__pyx_tuple__436);
  __pyx_codeobj__437 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__436, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_arc2f, 3658, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__437)) __PYX_ERR(0, 3658, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3662
 * 
 *     @staticmethod
 *     def add_character(ch: str, x: float, y: float, sx: float, sy: float) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_character(ch[0], x, y, sx, sy)
 * 
 */
  __pyx_tuple__438 = PyTuple_Pack(5, __pyx_n_s_ch, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_sx, __pyx_n_s_sy); if (unlikely(!__pyx_tuple__438)) __PYX_ERR(0, 3662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__438);
  __Pyx_GIVEREF(__pyx_tuple__438);
  __pyx_codeobj__439 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__438, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_character, 3662, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__439)) __PYX_ERR(0, 3662, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3666
 * 
 *     @staticmethod
 *     def add_string(st: str, x: float, y: float, sx: float, sy: float) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_string(st.encode('utf-8'), x, y, sx, sy)
 * 
 */
  __pyx_tuple__440 = PyTuple_Pack(5, __pyx_n_s_st, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_sx, __pyx_n_s_sy); if (unlikely(!__pyx_tuple__440)) __PYX_ERR(0, 3666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__440);
  __Pyx_GIVEREF(__pyx_tuple__440);
  __pyx_codeobj__441 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__440, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_string, 3666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__441)) __PYX_ERR(0, 3666, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3670
 * 
 *     @staticmethod
 *     def add_cubic_bazier(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 * 
 */
  __pyx_tuple__442 = PyTuple_Pack(5, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_control_1, __pyx_n_s_control_2, __pyx_n_s_res); if (unlikely(!__pyx_tuple__442)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__442);
  __Pyx_GIVEREF(__pyx_tuple__442);
  __pyx_codeobj__443 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__442, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_cubic_bazier, 3670, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__443)) __PYX_ERR(0, 3670, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3674
 * 
 *     @staticmethod
 *     def add_cubic_bazier2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 * 
 */
  __pyx_tuple__444 = PyTuple_Pack(5, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_control_1, __pyx_n_s_control_2, __pyx_n_s_res); if (unlikely(!__pyx_tuple__444)) __PYX_ERR(0, 3674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__444);
  __Pyx_GIVEREF(__pyx_tuple__444);
  __pyx_codeobj__445 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__444, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_cubic_bazier2v, 3674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__445)) __PYX_ERR(0, 3674, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3678
 * 
 *     @staticmethod
 *     def add_cubic_bazier2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 * 
 */
  __pyx_tuple__446 = PyTuple_Pack(9, __pyx_n_s_start_x, __pyx_n_s_start_y, __pyx_n_s_end_x, __pyx_n_s_end_y, __pyx_n_s_control_1_x, __pyx_n_s_control_1_y, __pyx_n_s_control_2_x, __pyx_n_s_control_2_y, __pyx_n_s_res); if (unlikely(!__pyx_tuple__446)) __PYX_ERR(0, 3678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__446);
  __Pyx_GIVEREF(__pyx_tuple__446);
  __pyx_codeobj__447 = (PyObject*)__Pyx_PyCode_New(9, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__446, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_cubic_bazier2f, 3678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__447)) __PYX_ERR(0, 3678, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3682
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 * 
 */
  __pyx_tuple__448 = PyTuple_Pack(5, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_control_1, __pyx_n_s_control_2, __pyx_n_s_res); if (unlikely(!__pyx_tuple__448)) __PYX_ERR(0, 3682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__448);
  __Pyx_GIVEREF(__pyx_tuple__448);
  __pyx_codeobj__449 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__448, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_cubic_bazier_points, 3682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__449)) __PYX_ERR(0, 3682, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3686
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 * 
 */
  __pyx_tuple__450 = PyTuple_Pack(5, __pyx_n_s_start, __pyx_n_s_end, __pyx_n_s_control_1, __pyx_n_s_control_2, __pyx_n_s_res); if (unlikely(!__pyx_tuple__450)) __PYX_ERR(0, 3686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__450);
  __Pyx_GIVEREF(__pyx_tuple__450);
  __pyx_codeobj__451 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__450, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_cubic_bazier_points2v, 3686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__451)) __PYX_ERR(0, 3686, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3690
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 * 
 */
  __pyx_tuple__452 = PyTuple_Pack(9, __pyx_n_s_start_x, __pyx_n_s_start_y, __pyx_n_s_end_x, __pyx_n_s_end_y, __pyx_n_s_control_1_x, __pyx_n_s_control_1_y, __pyx_n_s_control_2_x, __pyx_n_s_control_2_y, __pyx_n_s_res); if (unlikely(!__pyx_tuple__452)) __PYX_ERR(0, 3690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__452);
  __Pyx_GIVEREF(__pyx_tuple__452);
  __pyx_codeobj__453 = (PyObject*)__Pyx_PyCode_New(9, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__452, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_cubic_bazier_points2f, 3690, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__453)) __PYX_ERR(0, 3690, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3694
 * 
 *     @staticmethod
 *     def add_shape_out_line(shape: shape):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_shape_out_line(&shape.c_shape)
 * 
 */
  __pyx_tuple__454 = PyTuple_Pack(1, __pyx_n_s_shape_2); if (unlikely(!__pyx_tuple__454)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__454);
  __Pyx_GIVEREF(__pyx_tuple__454);
  __pyx_codeobj__455 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__454, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_shape_out_line, 3694, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__455)) __PYX_ERR(0, 3694, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3698
 * 
 *     @staticmethod
 *     def add_string_with_font(st: str, font: font, x: float, y: float, sx: float, scale_y: float) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_string_with_font(st.encode('utf-8'), font.c_font, x, y, sx, scale_y)
 * 
 */
  __pyx_tuple__456 = PyTuple_Pack(6, __pyx_n_s_st, __pyx_n_s_font, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_sx, __pyx_n_s_scale_y); if (unlikely(!__pyx_tuple__456)) __PYX_ERR(0, 3698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__456);
  __Pyx_GIVEREF(__pyx_tuple__456);
  __pyx_codeobj__457 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__456, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_add_string_with_font, 3698, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__457)) __PYX_ERR(0, 3698, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3793
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"
 * 
 * def noise_init():             # <<<<<<<<<<<<<<
 *     CGL_noise_init()
 * 
 */
  __pyx_codeobj__458 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_noise_init, 3793, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__458)) __PYX_ERR(0, 3793, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3796
 *     CGL_noise_init()
 * 
 * def noise_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_noise_shutdown()
 * 
 */
  __pyx_codeobj__459 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_noise_shutdown, 3796, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__459)) __PYX_ERR(0, 3796, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3799
 *     CGL_noise_shutdown()
 * 
 * def noise_get(x: float, y: float, z: float, np: noise_params = noise_params() ) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_get(&np.c_noise_params, x, y, z)
 * 
 */
  __pyx_tuple__460 = PyTuple_Pack(4, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z, __pyx_n_s_np); if (unlikely(!__pyx_tuple__460)) __PYX_ERR(0, 3799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__460);
  __Pyx_GIVEREF(__pyx_tuple__460);
  __pyx_codeobj__461 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__460, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_noise_get, 3799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__461)) __PYX_ERR(0, 3799, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3802
 *     return CGL_noise_get(&np.c_noise_params, x, y, z)
 * 
 * def noise_perlin(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_perlin(x, y, z)
 * 
 */
  __pyx_tuple__462 = PyTuple_Pack(3, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z); if (unlikely(!__pyx_tuple__462)) __PYX_ERR(0, 3802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__462);
  __Pyx_GIVEREF(__pyx_tuple__462);
  __pyx_codeobj__463 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__462, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_noise_perlin, 3802, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__463)) __PYX_ERR(0, 3802, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3805
 *     return CGL_noise_perlin(x, y, z)
 * 
 * def noise_opensimplex(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_opensimplex(x, y, z)
 * 
 */
  __pyx_tuple__464 = PyTuple_Pack(3, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z); if (unlikely(!__pyx_tuple__464)) __PYX_ERR(0, 3805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__464);
  __Pyx_GIVEREF(__pyx_tuple__464);
  __pyx_codeobj__465 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_noise_opensimplex, 3805, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__465)) __PYX_ERR(0, 3805, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3808
 *     return CGL_noise_opensimplex(x, y, z)
 * 
 * def noise_opensimplex2s(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_opensimplex2s(x, y, z)
 * 
 */
  __pyx_tuple__466 = PyTuple_Pack(3, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z); if (unlikely(!__pyx_tuple__466)) __PYX_ERR(0, 3808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__466);
  __Pyx_GIVEREF(__pyx_tuple__466);
  __pyx_codeobj__467 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__466, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_noise_opensimplex2s, 3808, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__467)) __PYX_ERR(0, 3808, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3811
 *     return CGL_noise_opensimplex2s(x, y, z)
 * 
 * def noise_value(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_value(x, y, z)
 * 
 */
  __pyx_tuple__468 = PyTuple_Pack(3, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z); if (unlikely(!__pyx_tuple__468)) __PYX_ERR(0, 3811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__468);
  __Pyx_GIVEREF(__pyx_tuple__468);
  __pyx_codeobj__469 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__468, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_noise_value, 3811, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__469)) __PYX_ERR(0, 3811, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3814
 *     return CGL_noise_value(x, y, z)
 * 
 * def noise_valuecubic(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_valuecubic(x, y, z)
 * 
 */
  __pyx_tuple__470 = PyTuple_Pack(3, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z); if (unlikely(!__pyx_tuple__470)) __PYX_ERR(0, 3814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__470);
  __Pyx_GIVEREF(__pyx_tuple__470);
  __pyx_codeobj__471 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__470, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_noise_valuecubic, 3814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__471)) __PYX_ERR(0, 3814, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3817
 *     return CGL_noise_valuecubic(x, y, z)
 * 
 * def noise_worley(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_worley(x, y, z)
 * 
 */
  __pyx_tuple__472 = PyTuple_Pack(3, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_z); if (unlikely(!__pyx_tuple__472)) __PYX_ERR(0, 3817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__472);
  __Pyx_GIVEREF(__pyx_tuple__472);
  __pyx_codeobj__473 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__472, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cgl_wrapper_pyx, __pyx_n_s_noise_worley, 3817, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__473)) __PYX_ERR(0, 3817, __pyx_L1_error)

  /* "(tree fragment)":1
 * def __pyx_unpickle_widgets(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_tuple__474 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__474)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__474);
  __Pyx_GIVEREF(__pyx_tuple__474);
  __pyx_codeobj__475 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__474, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_widgets, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__475)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyString_Type_encode.type = (PyObject*)&PyString_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_180_0 = PyFloat_FromDouble(180.0); if (unlikely(!__pyx_float_180_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_41421356237309504880 = PyFloat_FromDouble(1.41421356237309504880); if (unlikely(!__pyx_float_1_41421356237309504880)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_57079632679489661923 = PyFloat_FromDouble(1.57079632679489661923); if (unlikely(!__pyx_float_1_57079632679489661923)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_1_73205080756887729352 = PyFloat_FromDouble(1.73205080756887729352); if (unlikely(!__pyx_float_1_73205080756887729352)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_2_23606797749978969640 = PyFloat_FromDouble(2.23606797749978969640); if (unlikely(!__pyx_float_2_23606797749978969640)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_2_44948974278317809820 = PyFloat_FromDouble(2.44948974278317809820); if (unlikely(!__pyx_float_2_44948974278317809820)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_2_64575131106459059050 = PyFloat_FromDouble(2.64575131106459059050); if (unlikely(!__pyx_float_2_64575131106459059050)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_2_71828182845904523536 = PyFloat_FromDouble(2.71828182845904523536); if (unlikely(!__pyx_float_2_71828182845904523536)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_2_82842712474619009760 = PyFloat_FromDouble(2.82842712474619009760); if (unlikely(!__pyx_float_2_82842712474619009760)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_3_14159265358979323846 = PyFloat_FromDouble(3.14159265358979323846); if (unlikely(!__pyx_float_3_14159265358979323846)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_6_28318530717958647692 = PyFloat_FromDouble(6.28318530717958647692); if (unlikely(!__pyx_float_6_28318530717958647692)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_32 = PyInt_FromLong(32); if (unlikely(!__pyx_int_32)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_39 = PyInt_FromLong(39); if (unlikely(!__pyx_int_39)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_44 = PyInt_FromLong(44); if (unlikely(!__pyx_int_44)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_45 = PyInt_FromLong(45); if (unlikely(!__pyx_int_45)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_46 = PyInt_FromLong(46); if (unlikely(!__pyx_int_46)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_47 = PyInt_FromLong(47); if (unlikely(!__pyx_int_47)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_48 = PyInt_FromLong(48); if (unlikely(!__pyx_int_48)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_49 = PyInt_FromLong(49); if (unlikely(!__pyx_int_49)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_50 = PyInt_FromLong(50); if (unlikely(!__pyx_int_50)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_51 = PyInt_FromLong(51); if (unlikely(!__pyx_int_51)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_52 = PyInt_FromLong(52); if (unlikely(!__pyx_int_52)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_53 = PyInt_FromLong(53); if (unlikely(!__pyx_int_53)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_54 = PyInt_FromLong(54); if (unlikely(!__pyx_int_54)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_55 = PyInt_FromLong(55); if (unlikely(!__pyx_int_55)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_56 = PyInt_FromLong(56); if (unlikely(!__pyx_int_56)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_57 = PyInt_FromLong(57); if (unlikely(!__pyx_int_57)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_59 = PyInt_FromLong(59); if (unlikely(!__pyx_int_59)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_61 = PyInt_FromLong(61); if (unlikely(!__pyx_int_61)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_65 = PyInt_FromLong(65); if (unlikely(!__pyx_int_65)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_66 = PyInt_FromLong(66); if (unlikely(!__pyx_int_66)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_67 = PyInt_FromLong(67); if (unlikely(!__pyx_int_67)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_68 = PyInt_FromLong(68); if (unlikely(!__pyx_int_68)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_69 = PyInt_FromLong(69); if (unlikely(!__pyx_int_69)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_70 = PyInt_FromLong(70); if (unlikely(!__pyx_int_70)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_71 = PyInt_FromLong(71); if (unlikely(!__pyx_int_71)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_72 = PyInt_FromLong(72); if (unlikely(!__pyx_int_72)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_73 = PyInt_FromLong(73); if (unlikely(!__pyx_int_73)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_74 = PyInt_FromLong(74); if (unlikely(!__pyx_int_74)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_75 = PyInt_FromLong(75); if (unlikely(!__pyx_int_75)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_76 = PyInt_FromLong(76); if (unlikely(!__pyx_int_76)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_77 = PyInt_FromLong(77); if (unlikely(!__pyx_int_77)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_78 = PyInt_FromLong(78); if (unlikely(!__pyx_int_78)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_79 = PyInt_FromLong(79); if (unlikely(!__pyx_int_79)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_80 = PyInt_FromLong(80); if (unlikely(!__pyx_int_80)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_81 = PyInt_FromLong(81); if (unlikely(!__pyx_int_81)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_82 = PyInt_FromLong(82); if (unlikely(!__pyx_int_82)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_83 = PyInt_FromLong(83); if (unlikely(!__pyx_int_83)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_84 = PyInt_FromLong(84); if (unlikely(!__pyx_int_84)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_85 = PyInt_FromLong(85); if (unlikely(!__pyx_int_85)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_86 = PyInt_FromLong(86); if (unlikely(!__pyx_int_86)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_87 = PyInt_FromLong(87); if (unlikely(!__pyx_int_87)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_88 = PyInt_FromLong(88); if (unlikely(!__pyx_int_88)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_89 = PyInt_FromLong(89); if (unlikely(!__pyx_int_89)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_90 = PyInt_FromLong(90); if (unlikely(!__pyx_int_90)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_91 = PyInt_FromLong(91); if (unlikely(!__pyx_int_91)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_92 = PyInt_FromLong(92); if (unlikely(!__pyx_int_92)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_93 = PyInt_FromLong(93); if (unlikely(!__pyx_int_93)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_96 = PyInt_FromLong(96); if (unlikely(!__pyx_int_96)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_161 = PyInt_FromLong(161); if (unlikely(!__pyx_int_161)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_162 = PyInt_FromLong(162); if (unlikely(!__pyx_int_162)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_256 = PyInt_FromLong(256); if (unlikely(!__pyx_int_256)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_257 = PyInt_FromLong(257); if (unlikely(!__pyx_int_257)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_258 = PyInt_FromLong(258); if (unlikely(!__pyx_int_258)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_259 = PyInt_FromLong(259); if (unlikely(!__pyx_int_259)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_260 = PyInt_FromLong(260); if (unlikely(!__pyx_int_260)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_261 = PyInt_FromLong(261); if (unlikely(!__pyx_int_261)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_262 = PyInt_FromLong(262); if (unlikely(!__pyx_int_262)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_263 = PyInt_FromLong(263); if (unlikely(!__pyx_int_263)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_264 = PyInt_FromLong(264); if (unlikely(!__pyx_int_264)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_265 = PyInt_FromLong(265); if (unlikely(!__pyx_int_265)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_266 = PyInt_FromLong(266); if (unlikely(!__pyx_int_266)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_267 = PyInt_FromLong(267); if (unlikely(!__pyx_int_267)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_268 = PyInt_FromLong(268); if (unlikely(!__pyx_int_268)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_269 = PyInt_FromLong(269); if (unlikely(!__pyx_int_269)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_280 = PyInt_FromLong(280); if (unlikely(!__pyx_int_280)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_281 = PyInt_FromLong(281); if (unlikely(!__pyx_int_281)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_282 = PyInt_FromLong(282); if (unlikely(!__pyx_int_282)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_283 = PyInt_FromLong(283); if (unlikely(!__pyx_int_283)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_284 = PyInt_FromLong(284); if (unlikely(!__pyx_int_284)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_290 = PyInt_FromLong(290); if (unlikely(!__pyx_int_290)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_291 = PyInt_FromLong(291); if (unlikely(!__pyx_int_291)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_292 = PyInt_FromLong(292); if (unlikely(!__pyx_int_292)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_293 = PyInt_FromLong(293); if (unlikely(!__pyx_int_293)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_294 = PyInt_FromLong(294); if (unlikely(!__pyx_int_294)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_295 = PyInt_FromLong(295); if (unlikely(!__pyx_int_295)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_296 = PyInt_FromLong(296); if (unlikely(!__pyx_int_296)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_297 = PyInt_FromLong(297); if (unlikely(!__pyx_int_297)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_298 = PyInt_FromLong(298); if (unlikely(!__pyx_int_298)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_299 = PyInt_FromLong(299); if (unlikely(!__pyx_int_299)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_300 = PyInt_FromLong(300); if (unlikely(!__pyx_int_300)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_301 = PyInt_FromLong(301); if (unlikely(!__pyx_int_301)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_302 = PyInt_FromLong(302); if (unlikely(!__pyx_int_302)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_303 = PyInt_FromLong(303); if (unlikely(!__pyx_int_303)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_304 = PyInt_FromLong(304); if (unlikely(!__pyx_int_304)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_305 = PyInt_FromLong(305); if (unlikely(!__pyx_int_305)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_306 = PyInt_FromLong(306); if (unlikely(!__pyx_int_306)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_307 = PyInt_FromLong(307); if (unlikely(!__pyx_int_307)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_308 = PyInt_FromLong(308); if (unlikely(!__pyx_int_308)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_309 = PyInt_FromLong(309); if (unlikely(!__pyx_int_309)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_310 = PyInt_FromLong(310); if (unlikely(!__pyx_int_310)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_311 = PyInt_FromLong(311); if (unlikely(!__pyx_int_311)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_312 = PyInt_FromLong(312); if (unlikely(!__pyx_int_312)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_313 = PyInt_FromLong(313); if (unlikely(!__pyx_int_313)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_314 = PyInt_FromLong(314); if (unlikely(!__pyx_int_314)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_320 = PyInt_FromLong(320); if (unlikely(!__pyx_int_320)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_321 = PyInt_FromLong(321); if (unlikely(!__pyx_int_321)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_322 = PyInt_FromLong(322); if (unlikely(!__pyx_int_322)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_323 = PyInt_FromLong(323); if (unlikely(!__pyx_int_323)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_324 = PyInt_FromLong(324); if (unlikely(!__pyx_int_324)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_325 = PyInt_FromLong(325); if (unlikely(!__pyx_int_325)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_326 = PyInt_FromLong(326); if (unlikely(!__pyx_int_326)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_327 = PyInt_FromLong(327); if (unlikely(!__pyx_int_327)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_328 = PyInt_FromLong(328); if (unlikely(!__pyx_int_328)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_329 = PyInt_FromLong(329); if (unlikely(!__pyx_int_329)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_330 = PyInt_FromLong(330); if (unlikely(!__pyx_int_330)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_331 = PyInt_FromLong(331); if (unlikely(!__pyx_int_331)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_332 = PyInt_FromLong(332); if (unlikely(!__pyx_int_332)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_333 = PyInt_FromLong(333); if (unlikely(!__pyx_int_333)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_334 = PyInt_FromLong(334); if (unlikely(!__pyx_int_334)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_335 = PyInt_FromLong(335); if (unlikely(!__pyx_int_335)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_336 = PyInt_FromLong(336); if (unlikely(!__pyx_int_336)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_340 = PyInt_FromLong(340); if (unlikely(!__pyx_int_340)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_341 = PyInt_FromLong(341); if (unlikely(!__pyx_int_341)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_342 = PyInt_FromLong(342); if (unlikely(!__pyx_int_342)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_343 = PyInt_FromLong(343); if (unlikely(!__pyx_int_343)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_344 = PyInt_FromLong(344); if (unlikely(!__pyx_int_344)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_345 = PyInt_FromLong(345); if (unlikely(!__pyx_int_345)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_346 = PyInt_FromLong(346); if (unlikely(!__pyx_int_346)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_347 = PyInt_FromLong(347); if (unlikely(!__pyx_int_347)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_348 = PyInt_FromLong(348); if (unlikely(!__pyx_int_348)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4096 = PyInt_FromLong(4096); if (unlikely(!__pyx_int_4096)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10000 = PyInt_FromLong(10000L); if (unlikely(!__pyx_int_10000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_34069 = PyInt_FromLong(34069L); if (unlikely(!__pyx_int_34069)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_34070 = PyInt_FromLong(34070L); if (unlikely(!__pyx_int_34070)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_34071 = PyInt_FromLong(34071L); if (unlikely(!__pyx_int_34071)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_34072 = PyInt_FromLong(34072L); if (unlikely(!__pyx_int_34072)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_34073 = PyInt_FromLong(34073L); if (unlikely(!__pyx_int_34073)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_34074 = PyInt_FromLong(34074L); if (unlikely(!__pyx_int_34074)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_100000000 = PyInt_FromLong(100000000L); if (unlikely(!__pyx_int_100000000)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_222419149 = PyInt_FromLong(222419149L); if (unlikely(!__pyx_int_222419149)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_228825662 = PyInt_FromLong(228825662L); if (unlikely(!__pyx_int_228825662)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_238750788 = PyInt_FromLong(238750788L); if (unlikely(!__pyx_int_238750788)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_3cgl_vec2) < 0) __PYX_ERR(0, 882, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_vec2.tp_print = 0;
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_vec2_2, (PyObject *)&__pyx_type_3cgl_vec2) < 0) __PYX_ERR(0, 882, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_vec2) < 0) __PYX_ERR(0, 882, __pyx_L1_error)
  __pyx_ptype_3cgl_vec2 = &__pyx_type_3cgl_vec2;
  if (PyType_Ready(&__pyx_type_3cgl_vec3) < 0) __PYX_ERR(0, 977, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_vec3.tp_print = 0;
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_vec3_2, (PyObject *)&__pyx_type_3cgl_vec3) < 0) __PYX_ERR(0, 977, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_vec3) < 0) __PYX_ERR(0, 977, __pyx_L1_error)
  __pyx_ptype_3cgl_vec3 = &__pyx_type_3cgl_vec3;
  if (PyType_Ready(&__pyx_type_3cgl_vec4) < 0) __PYX_ERR(0, 1088, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_vec4.tp_print = 0;
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_vec4_2, (PyObject *)&__pyx_type_3cgl_vec4) < 0) __PYX_ERR(0, 1088, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_vec4) < 0) __PYX_ERR(0, 1088, __pyx_L1_error)
  __pyx_ptype_3cgl_vec4 = &__pyx_type_3cgl_vec4;
  if (PyType_Ready(&__pyx_type_3cgl_ivec4) < 0) __PYX_ERR(0, 1198, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_ivec4.tp_print = 0;
  #endif
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ivec4_2, (PyObject *)&__pyx_type_3cgl_ivec4) < 0) __PYX_ERR(0, 1198, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_ivec4) < 0) __PYX_ERR(0, 1198, __pyx_L1_error)
  __pyx_ptype_3cgl_ivec4 = &__pyx_type_3cgl_ivec4;
  __pyx_vtabptr_3cgl_mat4 = &__pyx_vtable_3cgl_mat4;
  __pyx_vtable_3cgl_mat4.set_c_mat4 = (PyObject *(*)(struct __pyx_obj_3cgl_mat4 *, struct CGL_mat4))__pyx_f_3cgl_4mat4_set_c_mat4;
  if (PyType_Ready(&__pyx_type_3cgl_mat4) < 0) __PYX_ERR(0, 1261, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_mat4.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_mat4.tp_dictoffset && __pyx_type_3cgl_mat4.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_mat4.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3cgl_mat4.tp_dict, __pyx_vtabptr_3cgl_mat4) < 0) __PYX_ERR(0, 1261, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_mat4, (PyObject *)&__pyx_type_3cgl_mat4) < 0) __PYX_ERR(0, 1261, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_mat4) < 0) __PYX_ERR(0, 1261, __pyx_L1_error)
  __pyx_ptype_3cgl_mat4 = &__pyx_type_3cgl_mat4;
  if (PyType_Ready(&__pyx_type_3cgl_transform) < 0) __PYX_ERR(0, 1429, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_transform.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_transform.tp_dictoffset && __pyx_type_3cgl_transform.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_transform.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_transform, (PyObject *)&__pyx_type_3cgl_transform) < 0) __PYX_ERR(0, 1429, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_transform) < 0) __PYX_ERR(0, 1429, __pyx_L1_error)
  __pyx_ptype_3cgl_transform = &__pyx_type_3cgl_transform;
  if (PyType_Ready(&__pyx_type_3cgl_matrix) < 0) __PYX_ERR(0, 1510, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_matrix.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_matrix.tp_dictoffset && __pyx_type_3cgl_matrix.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_matrix.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_matrix_2, (PyObject *)&__pyx_type_3cgl_matrix) < 0) __PYX_ERR(0, 1510, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_matrix) < 0) __PYX_ERR(0, 1510, __pyx_L1_error)
  __pyx_ptype_3cgl_matrix = &__pyx_type_3cgl_matrix;
  if (PyType_Ready(&__pyx_type_3cgl_window) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_window.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_window.tp_dictoffset && __pyx_type_3cgl_window.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_window.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_window_2, (PyObject *)&__pyx_type_3cgl_window) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_window) < 0) __PYX_ERR(0, 1899, __pyx_L1_error)
  __pyx_ptype_3cgl_window = &__pyx_type_3cgl_window;
  if (PyType_Ready(&__pyx_type_3cgl_image) < 0) __PYX_ERR(0, 2084, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_image.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_image.tp_dictoffset && __pyx_type_3cgl_image.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_image.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_image_2, (PyObject *)&__pyx_type_3cgl_image) < 0) __PYX_ERR(0, 2084, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_image) < 0) __PYX_ERR(0, 2084, __pyx_L1_error)
  __pyx_ptype_3cgl_image = &__pyx_type_3cgl_image;
  if (PyType_Ready(&__pyx_type_3cgl_mesh_vertex) < 0) __PYX_ERR(0, 2125, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_mesh_vertex.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_mesh_vertex.tp_dictoffset && __pyx_type_3cgl_mesh_vertex.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_mesh_vertex.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_mesh_vertex_2, (PyObject *)&__pyx_type_3cgl_mesh_vertex) < 0) __PYX_ERR(0, 2125, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_mesh_vertex) < 0) __PYX_ERR(0, 2125, __pyx_L1_error)
  __pyx_ptype_3cgl_mesh_vertex = &__pyx_type_3cgl_mesh_vertex;
  __pyx_vtabptr_3cgl_mesh_cpu = &__pyx_vtable_3cgl_mesh_cpu;
  __pyx_vtable_3cgl_mesh_cpu.set_c_mesh = (PyObject *(*)(struct __pyx_obj_3cgl_mesh_cpu *, struct CGL_mesh_cpu *))__pyx_f_3cgl_8mesh_cpu_set_c_mesh;
  if (PyType_Ready(&__pyx_type_3cgl_mesh_cpu) < 0) __PYX_ERR(0, 2199, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_mesh_cpu.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_mesh_cpu.tp_dictoffset && __pyx_type_3cgl_mesh_cpu.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_mesh_cpu.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3cgl_mesh_cpu.tp_dict, __pyx_vtabptr_3cgl_mesh_cpu) < 0) __PYX_ERR(0, 2199, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_mesh_cpu_2, (PyObject *)&__pyx_type_3cgl_mesh_cpu) < 0) __PYX_ERR(0, 2199, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_mesh_cpu) < 0) __PYX_ERR(0, 2199, __pyx_L1_error)
  __pyx_ptype_3cgl_mesh_cpu = &__pyx_type_3cgl_mesh_cpu;
  __pyx_vtabptr_3cgl_texture = &__pyx_vtable_3cgl_texture;
  __pyx_vtable_3cgl_texture.set_c_texture = (PyObject *(*)(struct __pyx_obj_3cgl_texture *, struct CGL_texture *))__pyx_f_3cgl_7texture_set_c_texture;
  if (PyType_Ready(&__pyx_type_3cgl_texture) < 0) __PYX_ERR(0, 2381, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_texture.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_texture.tp_dictoffset && __pyx_type_3cgl_texture.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_texture.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3cgl_texture.tp_dict, __pyx_vtabptr_3cgl_texture) < 0) __PYX_ERR(0, 2381, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_texture_2, (PyObject *)&__pyx_type_3cgl_texture) < 0) __PYX_ERR(0, 2381, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_texture) < 0) __PYX_ERR(0, 2381, __pyx_L1_error)
  __pyx_ptype_3cgl_texture = &__pyx_type_3cgl_texture;
  __pyx_vtabptr_3cgl_framebuffer = &__pyx_vtable_3cgl_framebuffer;
  __pyx_vtable_3cgl_framebuffer.set_c_framebuffer = (PyObject *(*)(struct __pyx_obj_3cgl_framebuffer *, struct CGL_framebuffer *))__pyx_f_3cgl_11framebuffer_set_c_framebuffer;
  if (PyType_Ready(&__pyx_type_3cgl_framebuffer) < 0) __PYX_ERR(0, 2512, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_framebuffer.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_framebuffer.tp_dictoffset && __pyx_type_3cgl_framebuffer.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_framebuffer.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3cgl_framebuffer.tp_dict, __pyx_vtabptr_3cgl_framebuffer) < 0) __PYX_ERR(0, 2512, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_framebuffer_2, (PyObject *)&__pyx_type_3cgl_framebuffer) < 0) __PYX_ERR(0, 2512, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_framebuffer) < 0) __PYX_ERR(0, 2512, __pyx_L1_error)
  __pyx_ptype_3cgl_framebuffer = &__pyx_type_3cgl_framebuffer;
  __pyx_vtabptr_3cgl_mesh_gpu = &__pyx_vtable_3cgl_mesh_gpu;
  __pyx_vtable_3cgl_mesh_gpu.set_c_mesh = (PyObject *(*)(struct __pyx_obj_3cgl_mesh_gpu *, struct CGL_mesh_gpu *))__pyx_f_3cgl_8mesh_gpu_set_c_mesh;
  if (PyType_Ready(&__pyx_type_3cgl_mesh_gpu) < 0) __PYX_ERR(0, 2630, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_mesh_gpu.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_mesh_gpu.tp_dictoffset && __pyx_type_3cgl_mesh_gpu.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_mesh_gpu.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3cgl_mesh_gpu.tp_dict, __pyx_vtabptr_3cgl_mesh_gpu) < 0) __PYX_ERR(0, 2630, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_mesh_gpu_2, (PyObject *)&__pyx_type_3cgl_mesh_gpu) < 0) __PYX_ERR(0, 2630, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_mesh_gpu) < 0) __PYX_ERR(0, 2630, __pyx_L1_error)
  __pyx_ptype_3cgl_mesh_gpu = &__pyx_type_3cgl_mesh_gpu;
  __pyx_vtabptr_3cgl_shader = &__pyx_vtable_3cgl_shader;
  __pyx_vtable_3cgl_shader.set_c_shader = (PyObject *(*)(struct __pyx_obj_3cgl_shader *, struct CGL_shader *))__pyx_f_3cgl_6shader_set_c_shader;
  if (PyType_Ready(&__pyx_type_3cgl_shader) < 0) __PYX_ERR(0, 2686, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_shader.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_shader.tp_dictoffset && __pyx_type_3cgl_shader.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_shader.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (__Pyx_SetVtable(__pyx_type_3cgl_shader.tp_dict, __pyx_vtabptr_3cgl_shader) < 0) __PYX_ERR(0, 2686, __pyx_L1_error)
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_shader_2, (PyObject *)&__pyx_type_3cgl_shader) < 0) __PYX_ERR(0, 2686, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_shader) < 0) __PYX_ERR(0, 2686, __pyx_L1_error)
  __pyx_ptype_3cgl_shader = &__pyx_type_3cgl_shader;
  if (PyType_Ready(&__pyx_type_3cgl_ssbo) < 0) __PYX_ERR(0, 2821, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_ssbo.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_ssbo.tp_dictoffset && __pyx_type_3cgl_ssbo.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_ssbo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ssbo_2, (PyObject *)&__pyx_type_3cgl_ssbo) < 0) __PYX_ERR(0, 2821, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_ssbo) < 0) __PYX_ERR(0, 2821, __pyx_L1_error)
  __pyx_ptype_3cgl_ssbo = &__pyx_type_3cgl_ssbo;
  if (PyType_Ready(&__pyx_type_3cgl_ubo) < 0) __PYX_ERR(0, 2896, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_ubo.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_ubo.tp_dictoffset && __pyx_type_3cgl_ubo.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_ubo.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ubo_2, (PyObject *)&__pyx_type_3cgl_ubo) < 0) __PYX_ERR(0, 2896, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_ubo) < 0) __PYX_ERR(0, 2896, __pyx_L1_error)
  __pyx_ptype_3cgl_ubo = &__pyx_type_3cgl_ubo;
  if (PyType_Ready(&__pyx_type_3cgl_shape) < 0) __PYX_ERR(0, 2964, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_shape.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_shape.tp_dictoffset && __pyx_type_3cgl_shape.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_shape.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_shape_2, (PyObject *)&__pyx_type_3cgl_shape) < 0) __PYX_ERR(0, 2964, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_shape) < 0) __PYX_ERR(0, 2964, __pyx_L1_error)
  __pyx_ptype_3cgl_shape = &__pyx_type_3cgl_shape;
  if (PyType_Ready(&__pyx_type_3cgl_bloom) < 0) __PYX_ERR(0, 3155, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_bloom.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_bloom.tp_dictoffset && __pyx_type_3cgl_bloom.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_bloom.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_bloom_2, (PyObject *)&__pyx_type_3cgl_bloom) < 0) __PYX_ERR(0, 3155, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_bloom) < 0) __PYX_ERR(0, 3155, __pyx_L1_error)
  __pyx_ptype_3cgl_bloom = &__pyx_type_3cgl_bloom;
  if (PyType_Ready(&__pyx_type_3cgl_tilemap) < 0) __PYX_ERR(0, 3247, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_tilemap.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_tilemap.tp_dictoffset && __pyx_type_3cgl_tilemap.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_tilemap.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_tilemap_2, (PyObject *)&__pyx_type_3cgl_tilemap) < 0) __PYX_ERR(0, 3247, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_tilemap) < 0) __PYX_ERR(0, 3247, __pyx_L1_error)
  __pyx_ptype_3cgl_tilemap = &__pyx_type_3cgl_tilemap;
  if (PyType_Ready(&__pyx_type_3cgl_font_character) < 0) __PYX_ERR(0, 3345, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_font_character.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_font_character.tp_dictoffset && __pyx_type_3cgl_font_character.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_font_character.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_font_character_2, (PyObject *)&__pyx_type_3cgl_font_character) < 0) __PYX_ERR(0, 3345, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_font_character) < 0) __PYX_ERR(0, 3345, __pyx_L1_error)
  __pyx_ptype_3cgl_font_character = &__pyx_type_3cgl_font_character;
  if (PyType_Ready(&__pyx_type_3cgl_font) < 0) __PYX_ERR(0, 3392, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_font.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_font.tp_dictoffset && __pyx_type_3cgl_font.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_font.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_font, (PyObject *)&__pyx_type_3cgl_font) < 0) __PYX_ERR(0, 3392, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_font) < 0) __PYX_ERR(0, 3392, __pyx_L1_error)
  __pyx_ptype_3cgl_font = &__pyx_type_3cgl_font;
  if (PyType_Ready(&__pyx_type_3cgl_widgets) < 0) __PYX_ERR(0, 3454, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_widgets.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_widgets.tp_dictoffset && __pyx_type_3cgl_widgets.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_widgets.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_widgets, (PyObject *)&__pyx_type_3cgl_widgets) < 0) __PYX_ERR(0, 3454, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_widgets) < 0) __PYX_ERR(0, 3454, __pyx_L1_error)
  __pyx_ptype_3cgl_widgets = &__pyx_type_3cgl_widgets;
  if (PyType_Ready(&__pyx_type_3cgl_noise_params) < 0) __PYX_ERR(0, 3716, __pyx_L1_error)
  #if PY_VERSION_HEX < 0x030800B1
  __pyx_type_3cgl_noise_params.tp_print = 0;
  #endif
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_3cgl_noise_params.tp_dictoffset && __pyx_type_3cgl_noise_params.tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_type_3cgl_noise_params.tp_getattro = __Pyx_PyObject_GenericGetAttr;
  }
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_noise_params, (PyObject *)&__pyx_type_3cgl_noise_params) < 0) __PYX_ERR(0, 3716, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_3cgl_noise_params) < 0) __PYX_ERR(0, 3716, __pyx_L1_error)
  __pyx_ptype_3cgl_noise_params = &__pyx_type_3cgl_noise_params;
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initcgl(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initcgl(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_cgl(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_cgl(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
            result = PyDict_SetItemString(moddict, to_name, value);
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_cgl(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'cgl' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_cgl(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("cgl", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_b);
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_cython_runtime);
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_cgl) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "cgl")) {
      if (unlikely(PyDict_SetItemString(modules, "cgl", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "cgl_wrapper.pyx":5
 * cimport libc.stdlib as stdlib
 * cimport libc.math as math
 * import copy             # <<<<<<<<<<<<<<
 * from typing import Callable
 * from PIL import Image
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_copy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":6
 * cimport libc.math as math
 * import copy
 * from typing import Callable             # <<<<<<<<<<<<<<
 * from PIL import Image
 * import PIL
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s_Callable);
  __Pyx_GIVEREF(__pyx_n_s_Callable);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Callable);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_typing, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Callable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Callable, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":7
 * import copy
 * from typing import Callable
 * from PIL import Image             # <<<<<<<<<<<<<<
 * import PIL
 * import os
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Image);
  __Pyx_GIVEREF(__pyx_n_s_Image);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Image);
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PIL, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Image); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Image, __pyx_t_2) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":8
 * from typing import Callable
 * from PIL import Image
 * import PIL             # <<<<<<<<<<<<<<
 * import os
 * import random
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_PIL, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PIL, __pyx_t_1) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":9
 * from PIL import Image
 * import PIL
 * import os             # <<<<<<<<<<<<<<
 * import random
 * 
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":10
 * import PIL
 * import os
 * import random             # <<<<<<<<<<<<<<
 * 
 * # CGL typedefs of standard types
 */
  __pyx_t_1 = __Pyx_Import(__pyx_n_s_random, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_random, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":643
 * 
 * 
 * CGL_TRUE = 1             # <<<<<<<<<<<<<<
 * CGL_FALSE = 0
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CGL_TRUE, __pyx_int_1) < 0) __PYX_ERR(0, 643, __pyx_L1_error)

  /* "cgl_wrapper.pyx":644
 * 
 * CGL_TRUE = 1
 * CGL_FALSE = 0             # <<<<<<<<<<<<<<
 * 
 * def clear_console():
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CGL_FALSE, __pyx_int_0) < 0) __PYX_ERR(0, 644, __pyx_L1_error)

  /* "cgl_wrapper.pyx":646
 * CGL_FALSE = 0
 * 
 * def clear_console():             # <<<<<<<<<<<<<<
 *     os.system('cls' if os.name == 'nt' else 'clear')
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_1clear_console, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_clear_console, __pyx_t_1) < 0) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":649
 *     os.system('cls' if os.name == 'nt' else 'clear')
 * 
 * def free(ptr):             # <<<<<<<<<<<<<<
 *     stdlib.free(<void*>ptr)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_3free, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_free, __pyx_t_1) < 0) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":652
 *     stdlib.free(<void*>ptr)
 * 
 * def init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_init()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_5init, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":655
 *     return CGL_init()
 * 
 * def shutdown():             # <<<<<<<<<<<<<<
 *     CGL_shutdown()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7shutdown, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":658
 *     CGL_shutdown()
 * 
 * def utils_sleep(milliseconds: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_sleep(milliseconds)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_9utils_sleep, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_sleep, __pyx_t_1) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":661
 *     CGL_utils_sleep(milliseconds)
 * 
 * def utils_read_file(path: str) -> bytes:             # <<<<<<<<<<<<<<
 *     cdef CGL_sizei size
 *     cdef CGL_byte* data = CGL_utils_read_file(path.encode(), &size)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_11utils_read_file, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_read_file, __pyx_t_1) < 0) __PYX_ERR(0, 661, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":671
 *     return result
 * 
 * def utils_get_file_size(path: str) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_get_file_size(path.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_13utils_get_file_size, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_get_file_size, __pyx_t_1) < 0) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":674
 *     return CGL_utils_get_file_size(path.encode())
 * 
 * def utils_append_file(path: str, data: bytes) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_append_file(path.encode(), data, len(data))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_15utils_append_file, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_append_file, __pyx_t_1) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":677
 *     return CGL_utils_append_file(path.encode(), data, len(data))
 * 
 * def utils_write_file(path : str, data : bytes) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_write_file(path.encode(), data, len(data))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_17utils_write_file, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_write_file, __pyx_t_1) < 0) __PYX_ERR(0, 677, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":680
 *     return CGL_utils_write_file(path.encode(), data, len(data))
 * 
 * def utils_get_time() -> float:             # <<<<<<<<<<<<<<
 *     return CGL_utils_get_time()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_19utils_get_time, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_get_time, __pyx_t_1) < 0) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":683
 *     return CGL_utils_get_time()
 * 
 * def utils_get_timestamp() -> str:             # <<<<<<<<<<<<<<
 *     cdef CGL_byte buffer[128]
 *     CGL_utils_get_timestamp(buffer)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_21utils_get_timestamp, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_get_timestamp, __pyx_t_1) < 0) __PYX_ERR(0, 683, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":688
 *     return buffer.decode()
 * 
 * def utils_is_little_endian() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_little_endian()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_23utils_is_little_endian, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_is_little_endian, __pyx_t_1) < 0) __PYX_ERR(0, 688, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":691
 *     return CGL_utils_is_little_endian()
 * 
 * def utils_is_big_endian() -> bool:             # <<<<<<<<<<<<<<
 *     return not CGL_utils_is_little_endian()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_25utils_is_big_endian, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_is_big_endian, __pyx_t_1) < 0) __PYX_ERR(0, 691, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":694
 *     return not CGL_utils_is_little_endian()
 * 
 * def utils_get_random_with_probability(probabilities) -> int:             # <<<<<<<<<<<<<<
 *     cdef CGL_float* c_probabilities
 *     c_probabilities = <CGL_float*>stdlib.malloc(len(probabilities) * sizeof(CGL_float))
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_27utils_get_random_with_probability, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_get_random_with_probabilit, __pyx_t_1) < 0) __PYX_ERR(0, 694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":706
 *     return result
 * 
 * def utils_reverse_bytes(data: bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_reverse_bytes(<void*>data, len(data))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_29utils_reverse_bytes, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_reverse_bytes, __pyx_t_1) < 0) __PYX_ERR(0, 706, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":709
 *     CGL_utils_reverse_bytes(<void*>data, len(data))
 * 
 * def utils_little_endian_to_current(data : bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_little_endian_to_current(<void*>data, len(data))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_31utils_little_endian_to_current, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_little_endian_to_current, __pyx_t_1) < 0) __PYX_ERR(0, 709, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":712
 *     CGL_utils_little_endian_to_current(<void*>data, len(data))
 * 
 * def utils_big_endian_to_current(data : bytes):             # <<<<<<<<<<<<<<
 *     CGL_utils_big_endian_to_current(<void*>data, len(data))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_33utils_big_endian_to_current, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_big_endian_to_current, __pyx_t_1) < 0) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":715
 *     CGL_utils_big_endian_to_current(<void*>data, len(data))
 * 
 * def utils_fast_srand(seed: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_fast_srand(seed)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_35utils_fast_srand, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_fast_srand, __pyx_t_1) < 0) __PYX_ERR(0, 715, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":718
 *     CGL_utils_fast_srand(seed)
 * 
 * def utils_fast_rand() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_fast_rand()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_37utils_fast_rand, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_fast_rand, __pyx_t_1) < 0) __PYX_ERR(0, 718, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":721
 *     return CGL_utils_fast_rand()
 * 
 * def utils_xorshf96() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_xorshf96()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_39utils_xorshf96, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_xorshf96, __pyx_t_1) < 0) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":724
 *     return CGL_utils_xorshf96()
 * 
 * def utils_srand31(seed: int):             # <<<<<<<<<<<<<<
 *     CGL_utils_srand31(seed)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_41utils_srand31, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_srand31, __pyx_t_1) < 0) __PYX_ERR(0, 724, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":727
 *     CGL_utils_srand31(seed)
 * 
 * def utils_rand31() -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_rand31()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_43utils_rand31, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_rand31, __pyx_t_1) < 0) __PYX_ERR(0, 727, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":730
 *     return CGL_utils_rand31()
 * 
 * def utils_sigmoid(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_sigmoid(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_45utils_sigmoid, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_sigmoid, __pyx_t_1) < 0) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":733
 *     CGL_utils_sigmoid(x)
 * 
 * def utils_sigmoid_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_sigmoid_derivative(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_47utils_sigmoid_derivative, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_sigmoid_derivative, __pyx_t_1) < 0) __PYX_ERR(0, 733, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":736
 *     CGL_utils_sigmoid_derivative(x)
 * 
 * def utils_relu(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_49utils_relu, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_relu, __pyx_t_1) < 0) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":739
 *     CGL_utils_relu(x)
 * 
 * def utils_relu_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_derivative(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_51utils_relu_derivative, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_relu_derivative, __pyx_t_1) < 0) __PYX_ERR(0, 739, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":742
 *     CGL_utils_relu_derivative(x)
 * 
 * def utils_tanh(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_tanh(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_53utils_tanh, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_tanh, __pyx_t_1) < 0) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":745
 *     CGL_utils_tanh(x)
 * 
 * def utils_tanh_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_tanh_derivative(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_55utils_tanh_derivative, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_tanh_derivative, __pyx_t_1) < 0) __PYX_ERR(0, 745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":748
 *     CGL_utils_tanh_derivative(x)
 * 
 * def utils_step(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_step(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_57utils_step, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_step, __pyx_t_1) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":751
 *     CGL_utils_step(x)
 * 
 * def utils_step_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_step_derivative(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_59utils_step_derivative, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_step_derivative, __pyx_t_1) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":754
 *     CGL_utils_step_derivative(x)
 * 
 * def utils_relu_leaky(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_leaky(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_61utils_relu_leaky, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_relu_leaky, __pyx_t_1) < 0) __PYX_ERR(0, 754, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":757
 *     CGL_utils_relu_leaky(x)
 * 
 * def utils_relu_leaky_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_leaky_derivative(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_63utils_relu_leaky_derivative, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_relu_leaky_derivative, __pyx_t_1) < 0) __PYX_ERR(0, 757, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":760
 *     CGL_utils_relu_leaky_derivative(x)
 * 
 * def utils_relu_smooth(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_smooth(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_65utils_relu_smooth, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_relu_smooth, __pyx_t_1) < 0) __PYX_ERR(0, 760, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":763
 *     CGL_utils_relu_smooth(x)
 * 
 * def utils_relu_smooth_derivative(x: float) -> float:             # <<<<<<<<<<<<<<
 *     CGL_utils_relu_smooth_derivative(x)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_67utils_relu_smooth_derivative, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_relu_smooth_derivative, __pyx_t_1) < 0) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":767
 * 
 * 
 * CONSOLE_COLOR_RESET = 0             # <<<<<<<<<<<<<<
 * CONSOLE_COLOR_RED = 1
 * CONSOLE_COLOR_GREEN = 2
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONSOLE_COLOR_RESET, __pyx_int_0) < 0) __PYX_ERR(0, 767, __pyx_L1_error)

  /* "cgl_wrapper.pyx":768
 * 
 * CONSOLE_COLOR_RESET = 0
 * CONSOLE_COLOR_RED = 1             # <<<<<<<<<<<<<<
 * CONSOLE_COLOR_GREEN = 2
 * CONSOLE_COLOR_GRAY = 3
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONSOLE_COLOR_RED, __pyx_int_1) < 0) __PYX_ERR(0, 768, __pyx_L1_error)

  /* "cgl_wrapper.pyx":769
 * CONSOLE_COLOR_RESET = 0
 * CONSOLE_COLOR_RED = 1
 * CONSOLE_COLOR_GREEN = 2             # <<<<<<<<<<<<<<
 * CONSOLE_COLOR_GRAY = 3
 * CONSOLE_COLOR_BLUE = 4
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONSOLE_COLOR_GREEN, __pyx_int_2) < 0) __PYX_ERR(0, 769, __pyx_L1_error)

  /* "cgl_wrapper.pyx":770
 * CONSOLE_COLOR_RED = 1
 * CONSOLE_COLOR_GREEN = 2
 * CONSOLE_COLOR_GRAY = 3             # <<<<<<<<<<<<<<
 * CONSOLE_COLOR_BLUE = 4
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONSOLE_COLOR_GRAY, __pyx_int_3) < 0) __PYX_ERR(0, 770, __pyx_L1_error)

  /* "cgl_wrapper.pyx":771
 * CONSOLE_COLOR_GREEN = 2
 * CONSOLE_COLOR_GRAY = 3
 * CONSOLE_COLOR_BLUE = 4             # <<<<<<<<<<<<<<
 * 
 * def console_set_color(color: int):
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CONSOLE_COLOR_BLUE, __pyx_int_4) < 0) __PYX_ERR(0, 771, __pyx_L1_error)

  /* "cgl_wrapper.pyx":773
 * CONSOLE_COLOR_BLUE = 4
 * 
 * def console_set_color(color: int):             # <<<<<<<<<<<<<<
 *     if color < 0 or color > 4:
 *         raise ValueError()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_69console_set_color, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_console_set_color, __pyx_t_1) < 0) __PYX_ERR(0, 773, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":778
 *     CGL_console_set_color(color)
 * 
 * def printf_red(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_red(format.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_71printf_red, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_printf_red, __pyx_t_1) < 0) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":781
 *     CGL_printf_red(format.encode())
 * 
 * def printf_green(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_green(format.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_73printf_green, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_printf_green, __pyx_t_1) < 0) __PYX_ERR(0, 781, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":784
 *     CGL_printf_green(format.encode())
 * 
 * def printf_gray(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_gray(format.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_75printf_gray, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_printf_gray, __pyx_t_1) < 0) __PYX_ERR(0, 784, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":787
 *     CGL_printf_gray(format.encode())
 * 
 * def printf_blue(format: str):             # <<<<<<<<<<<<<<
 *     CGL_printf_blue(format.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_77printf_blue, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_printf_blue, __pyx_t_1) < 0) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":790
 *     CGL_printf_blue(format.encode())
 * 
 * def console_progress_bar(progress: float, width: int, prefix: str, suffix: str, complete_char: str = "#", incomplete_char: str = "_"):             # <<<<<<<<<<<<<<
 *     CGL_console_progress_bar(progress, width, prefix.encode(), suffix.encode(), complete_char[0], incomplete_char[0])
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_79console_progress_bar, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_console_progress_bar, __pyx_t_1) < 0) __PYX_ERR(0, 790, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":793
 *     CGL_console_progress_bar(progress, width, prefix.encode(), suffix.encode(), complete_char[0], incomplete_char[0])
 * 
 * LOG_LEVEL_TRACE        = 0             # <<<<<<<<<<<<<<
 * LOG_LEVEL_INFO         = 1
 * LOG_LEVEL_WARN         = 2
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOG_LEVEL_TRACE, __pyx_int_0) < 0) __PYX_ERR(0, 793, __pyx_L1_error)

  /* "cgl_wrapper.pyx":794
 * 
 * LOG_LEVEL_TRACE        = 0
 * LOG_LEVEL_INFO         = 1             # <<<<<<<<<<<<<<
 * LOG_LEVEL_WARN         = 2
 * LOG_LEVEL_ERROR        = 3
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOG_LEVEL_INFO, __pyx_int_1) < 0) __PYX_ERR(0, 794, __pyx_L1_error)

  /* "cgl_wrapper.pyx":795
 * LOG_LEVEL_TRACE        = 0
 * LOG_LEVEL_INFO         = 1
 * LOG_LEVEL_WARN         = 2             # <<<<<<<<<<<<<<
 * LOG_LEVEL_ERROR        = 3
 * LOG_LEVEL_INTERNAL     = 4
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOG_LEVEL_WARN, __pyx_int_2) < 0) __PYX_ERR(0, 795, __pyx_L1_error)

  /* "cgl_wrapper.pyx":796
 * LOG_LEVEL_INFO         = 1
 * LOG_LEVEL_WARN         = 2
 * LOG_LEVEL_ERROR        = 3             # <<<<<<<<<<<<<<
 * LOG_LEVEL_INTERNAL     = 4
 * LOGGER_MAX_LOG_FILES   = 32
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOG_LEVEL_ERROR, __pyx_int_3) < 0) __PYX_ERR(0, 796, __pyx_L1_error)

  /* "cgl_wrapper.pyx":797
 * LOG_LEVEL_WARN         = 2
 * LOG_LEVEL_ERROR        = 3
 * LOG_LEVEL_INTERNAL     = 4             # <<<<<<<<<<<<<<
 * LOGGER_MAX_LOG_FILES   = 32
 * LOGGER_LOG_BUFFER_SIZE = (1024 * 4)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOG_LEVEL_INTERNAL, __pyx_int_4) < 0) __PYX_ERR(0, 797, __pyx_L1_error)

  /* "cgl_wrapper.pyx":798
 * LOG_LEVEL_ERROR        = 3
 * LOG_LEVEL_INTERNAL     = 4
 * LOGGER_MAX_LOG_FILES   = 32             # <<<<<<<<<<<<<<
 * LOGGER_LOG_BUFFER_SIZE = (1024 * 4)
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOGGER_MAX_LOG_FILES, __pyx_int_32) < 0) __PYX_ERR(0, 798, __pyx_L1_error)

  /* "cgl_wrapper.pyx":799
 * LOG_LEVEL_INTERNAL     = 4
 * LOGGER_MAX_LOG_FILES   = 32
 * LOGGER_LOG_BUFFER_SIZE = (1024 * 4)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_LOGGER_LOG_BUFFER_SIZE, __pyx_int_4096) < 0) __PYX_ERR(0, 799, __pyx_L1_error)

  /* "cgl_wrapper.pyx":802
 * 
 * 
 * def logger_init(enable_console_logging: bool):             # <<<<<<<<<<<<<<
 *     CGL_logger_init(enable_console_logging)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_81logger_init, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger_init, __pyx_t_1) < 0) __PYX_ERR(0, 802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":805
 *     CGL_logger_init(enable_console_logging)
 * 
 * def logger_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_logger_shutdown()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_83logger_shutdown, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":808
 *     CGL_logger_shutdown()
 * 
 * def logger_attach_log_file(path: str) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_logger_attach_log_file(path.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_85logger_attach_log_file, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger_attach_log_file, __pyx_t_1) < 0) __PYX_ERR(0, 808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":811
 *     return CGL_logger_attach_log_file(path.encode())
 * 
 * def logger_detach_log_file(path: str) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_logger_detach_log_file(path.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_87logger_detach_log_file, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger_detach_log_file, __pyx_t_1) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":814
 *     return CGL_logger_detach_log_file(path.encode())
 * 
 * def logger_flush():             # <<<<<<<<<<<<<<
 *     CGL_logger_flush()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_89logger_flush, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger_flush, __pyx_t_1) < 0) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":817
 *     CGL_logger_flush()
 * 
 * def logger_disable_console_logging():             # <<<<<<<<<<<<<<
 *     CGL_logger_disable_console_logging()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_91logger_disable_console_logging, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger_disable_console_logging, __pyx_t_1) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":820
 *     CGL_logger_disable_console_logging()
 * 
 * def logger_enable_console_logging():             # <<<<<<<<<<<<<<
 *     CGL_logger_enable_console_logging()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_93logger_enable_console_logging, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger_enable_console_logging, __pyx_t_1) < 0) __PYX_ERR(0, 820, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":823
 *     CGL_logger_enable_console_logging()
 * 
 * def logger_log(level: int, log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(level, log_format.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_95logger_log, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger_log, __pyx_t_1) < 0) __PYX_ERR(0, 823, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":826
 *     CGL_logger_log(level, log_format.encode())
 * 
 * def log_trace(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_TRACE, log_format.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_97log_trace, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log_trace, __pyx_t_1) < 0) __PYX_ERR(0, 826, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":829
 *     CGL_logger_log(LOG_LEVEL_TRACE, log_format.encode())
 * 
 * def log_info(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_INFO, log_format.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_99log_info, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log_info, __pyx_t_1) < 0) __PYX_ERR(0, 829, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":832
 *     CGL_logger_log(LOG_LEVEL_INFO, log_format.encode())
 * 
 * def log_warn(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_WARN, log_format.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_101log_warn, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log_warn, __pyx_t_1) < 0) __PYX_ERR(0, 832, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":835
 *     CGL_logger_log(LOG_LEVEL_WARN, log_format.encode())
 * 
 * def log_error(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_ERROR, log_format.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_103log_error, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log_error, __pyx_t_1) < 0) __PYX_ERR(0, 835, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":838
 *     CGL_logger_log(LOG_LEVEL_ERROR, log_format.encode())
 * 
 * def log_internal(log_format: str):             # <<<<<<<<<<<<<<
 *     CGL_logger_log(LOG_LEVEL_INTERNAL, log_format.encode())
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_105log_internal, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_log_internal, __pyx_t_1) < 0) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":841
 *     CGL_logger_log(LOG_LEVEL_INTERNAL, log_format.encode())
 * 
 * def utils_crc32(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_crc32(<void*>data, len(data))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_107utils_crc32, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_crc32, __pyx_t_1) < 0) __PYX_ERR(0, 841, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":844
 *     return CGL_utils_crc32(<void*>data, len(data))
 * 
 * def utils_crc64(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_crc64(<void*>data, len(data))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_109utils_crc64, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_crc64, __pyx_t_1) < 0) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":847
 *     return CGL_utils_crc64(<void*>data, len(data))
 * 
 * def utils_rot13(data: bytes) -> bytes:             # <<<<<<<<<<<<<<
 *     result = bytes(len(data))
 *     CGL_utils_rot13(<char*>data, <char*>result)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_111utils_rot13, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_rot13, __pyx_t_1) < 0) __PYX_ERR(0, 847, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":852
 *     return result
 * 
 * def utils_super_fast_hash(data: bytes) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_utils_super_fast_hash(<void*>data, len(data))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_113utils_super_fast_hash, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils_super_fast_hash, __pyx_t_1) < 0) __PYX_ERR(0, 852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":856
 * 
 * 
 * PI = (3.14159265358979323846)             # <<<<<<<<<<<<<<
 * TWO_PI = (6.28318530717958647692)
 * PI_2 = (1.57079632679489661923)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PI, __pyx_float_3_14159265358979323846) < 0) __PYX_ERR(0, 856, __pyx_L1_error)

  /* "cgl_wrapper.pyx":857
 * 
 * PI = (3.14159265358979323846)
 * TWO_PI = (6.28318530717958647692)             # <<<<<<<<<<<<<<
 * PI_2 = (1.57079632679489661923)
 * E = (2.71828182845904523536)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_TWO_PI, __pyx_float_6_28318530717958647692) < 0) __PYX_ERR(0, 857, __pyx_L1_error)

  /* "cgl_wrapper.pyx":858
 * PI = (3.14159265358979323846)
 * TWO_PI = (6.28318530717958647692)
 * PI_2 = (1.57079632679489661923)             # <<<<<<<<<<<<<<
 * E = (2.71828182845904523536)
 * SQRT2 = (1.41421356237309504880)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PI_2, __pyx_float_1_57079632679489661923) < 0) __PYX_ERR(0, 858, __pyx_L1_error)

  /* "cgl_wrapper.pyx":859
 * TWO_PI = (6.28318530717958647692)
 * PI_2 = (1.57079632679489661923)
 * E = (2.71828182845904523536)             # <<<<<<<<<<<<<<
 * SQRT2 = (1.41421356237309504880)
 * SQRT3 = (1.73205080756887729352)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_E, __pyx_float_2_71828182845904523536) < 0) __PYX_ERR(0, 859, __pyx_L1_error)

  /* "cgl_wrapper.pyx":860
 * PI_2 = (1.57079632679489661923)
 * E = (2.71828182845904523536)
 * SQRT2 = (1.41421356237309504880)             # <<<<<<<<<<<<<<
 * SQRT3 = (1.73205080756887729352)
 * SQRT5 = (2.23606797749978969640)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SQRT2, __pyx_float_1_41421356237309504880) < 0) __PYX_ERR(0, 860, __pyx_L1_error)

  /* "cgl_wrapper.pyx":861
 * E = (2.71828182845904523536)
 * SQRT2 = (1.41421356237309504880)
 * SQRT3 = (1.73205080756887729352)             # <<<<<<<<<<<<<<
 * SQRT5 = (2.23606797749978969640)
 * SQRT6 = (2.44948974278317809820)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SQRT3, __pyx_float_1_73205080756887729352) < 0) __PYX_ERR(0, 861, __pyx_L1_error)

  /* "cgl_wrapper.pyx":862
 * SQRT2 = (1.41421356237309504880)
 * SQRT3 = (1.73205080756887729352)
 * SQRT5 = (2.23606797749978969640)             # <<<<<<<<<<<<<<
 * SQRT6 = (2.44948974278317809820)
 * SQRT7 = (2.64575131106459059050)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SQRT5, __pyx_float_2_23606797749978969640) < 0) __PYX_ERR(0, 862, __pyx_L1_error)

  /* "cgl_wrapper.pyx":863
 * SQRT3 = (1.73205080756887729352)
 * SQRT5 = (2.23606797749978969640)
 * SQRT6 = (2.44948974278317809820)             # <<<<<<<<<<<<<<
 * SQRT7 = (2.64575131106459059050)
 * SQRT8 = (2.82842712474619009760)
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SQRT6, __pyx_float_2_44948974278317809820) < 0) __PYX_ERR(0, 863, __pyx_L1_error)

  /* "cgl_wrapper.pyx":864
 * SQRT5 = (2.23606797749978969640)
 * SQRT6 = (2.44948974278317809820)
 * SQRT7 = (2.64575131106459059050)             # <<<<<<<<<<<<<<
 * SQRT8 = (2.82842712474619009760)
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SQRT7, __pyx_float_2_64575131106459059050) < 0) __PYX_ERR(0, 864, __pyx_L1_error)

  /* "cgl_wrapper.pyx":865
 * SQRT6 = (2.44948974278317809820)
 * SQRT7 = (2.64575131106459059050)
 * SQRT8 = (2.82842712474619009760)             # <<<<<<<<<<<<<<
 * 
 * def deg_to_rad(deg):
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SQRT8, __pyx_float_2_82842712474619009760) < 0) __PYX_ERR(0, 865, __pyx_L1_error)

  /* "cgl_wrapper.pyx":867
 * SQRT8 = (2.82842712474619009760)
 * 
 * def deg_to_rad(deg):             # <<<<<<<<<<<<<<
 *     return ((deg) * (PI / 180.0))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_115deg_to_rad, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_deg_to_rad, __pyx_t_1) < 0) __PYX_ERR(0, 867, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":870
 *     return ((deg) * (PI / 180.0))
 * 
 * def rad_to_deg(rad):             # <<<<<<<<<<<<<<
 *     return ((rad) * (180.0 / PI))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_117rad_to_deg, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_rad_to_deg, __pyx_t_1) < 0) __PYX_ERR(0, 870, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":873
 *     return ((rad) * (180.0 / PI))
 * 
 * def float_lerp(a: float, b: float, t: float):             # <<<<<<<<<<<<<<
 *     return ((a) + ((b) - (a)) * (t))
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_119float_lerp, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_float_lerp, __pyx_t_1) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":876
 *     return ((a) + ((b) - (a)) * (t))
 * 
 * def float_quadratic_lerp(a: float, b: float, c: float, t: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_float_quadratic_lerp(a, b, c, t)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_121float_quadratic_lerp, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_float_quadratic_lerp, __pyx_t_1) < 0) __PYX_ERR(0, 876, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":879
 *     return CGL_float_quadratic_lerp(a, b, c, t)
 * 
 * def float_cubic_lerp(a: float, b: float, c: float, d: float, t: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_float_cubic_lerp(a, b, c, d, t)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_123float_cubic_lerp, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_float_cubic_lerp, __pyx_t_1) < 0) __PYX_ERR(0, 879, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":972
 *         return vec2(self.x / length, self.y / length)
 * 
 * def vec2_triple_product(a: vec2, b: vec2, c: vec2) -> vec2:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2 obj = vec2(CGL_vec2_triple_product(a.c_vec2, b.c_vec2, c.c_vec2))
 *     return vec2(obj.x, obj.y)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_125vec2_triple_product, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vec2_triple_product, __pyx_t_1) < 0) __PYX_ERR(0, 972, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1076
 *         return vec3(self.x / length, self.y / length, self.z / length)
 * 
 * def vec3_reflect(a: vec3, n: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_reflect(a.c_vec3, n.c_vec3))
 *     return vec3(obj.x, obj.y, obj.z)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_127vec3_reflect, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vec3_reflect, __pyx_t_1) < 0) __PYX_ERR(0, 1076, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1080
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 * def vec3_rotate_about_axis(v: vec3, axis: vec3, theta: float) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_rotate_about_axis(v.c_vec3, axis.c_vec3, theta))
 *     return vec3(obj.x, obj.y, obj.z)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_129vec3_rotate_about_axis, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vec3_rotate_about_axis, __pyx_t_1) < 0) __PYX_ERR(0, 1080, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1084
 *     return vec3(obj.x, obj.y, obj.z)
 * 
 * def vec3_triple_product(a: vec3, b: vec3, c: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3 obj = vec3(CGL_vec3_triple_product(a.c_vec3, b.c_vec3, c.c_vec3))
 *     return vec3(obj.x, obj.y, obj.z)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_131vec3_triple_product, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vec3_triple_product, __pyx_t_1) < 0) __PYX_ERR(0, 1084, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1194
 *         return vec4(self.x / length, self.y / length, self.z / length, self.w / length)
 * 
 * def vec4_triple_product(a: vec4, b: vec4, c: vec4) -> vec4:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec4 obj = vec4(CGL_vec4_triple_product(a.c_vec4, b.c_vec4, c.c_vec4))
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_133vec4_triple_product, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_vec4_triple_product, __pyx_t_1) < 0) __PYX_ERR(0, 1194, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1296
 *         return hash((self.c_mat4.m[0], self.c_mat4.m[1], self.c_mat4.m[2], self.c_mat4.m[3], self.c_mat4.m[4], self.c_mat4.m[5], self.c_mat4.m[6], self.c_mat4.m[7], self.c_mat4.m[8], self.c_mat4.m[9], self.c_mat4.m[10], self.c_mat4.m[11], self.c_mat4.m[12], self.c_mat4.m[13], self.c_mat4.m[14], self.c_mat4.m[15]))
 * 
 * def mat4_mul(a: mat4, b: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_mul(a.c_mat4, b.c_mat4)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_135mat4_mul, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_mul, __pyx_t_1) < 0) __PYX_ERR(0, 1296, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1302
 *     return result
 * 
 * def mat4_det(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det(m.c_mat4)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_137mat4_det, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_det, __pyx_t_1) < 0) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1305
 *     return CGL_mat4_det(m.c_mat4)
 * 
 * def mat4_det_by_lu(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det_by_lu(m.c_mat4)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_139mat4_det_by_lu, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_det_by_lu, __pyx_t_1) < 0) __PYX_ERR(0, 1305, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1308
 *     return CGL_mat4_det_by_lu(m.c_mat4)
 * 
 * def mat4_det_by_gauss(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_det_by_gauss(m.c_mat4)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_141mat4_det_by_gauss, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_det_by_gauss, __pyx_t_1) < 0) __PYX_ERR(0, 1308, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1311
 *     return CGL_mat4_det_by_gauss(m.c_mat4)
 * 
 * def mat4_mul_vec4(m: mat4, v: vec4) -> vec4:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec4 obj = CGL_mat4_mul_vec4(m.c_mat4, v.c_vec4)
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_143mat4_mul_vec4, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_mul_vec4, __pyx_t_1) < 0) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1315
 *     return vec4(obj.x, obj.y, obj.z, obj.w)
 * 
 * def mat4_inverse(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_inverse(m.c_mat4)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_145mat4_inverse, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_inverse, __pyx_t_1) < 0) __PYX_ERR(0, 1315, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1321
 *     return result
 * 
 * def mat4_transpose(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_transpose(m.c_mat4)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_147mat4_transpose, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_transpose, __pyx_t_1) < 0) __PYX_ERR(0, 1321, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1327
 *     return result
 * 
 * def mat4_adjoint(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_adjoint(m.c_mat4)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_149mat4_adjoint, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_adjoint, __pyx_t_1) < 0) __PYX_ERR(0, 1327, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1333
 *     return result
 * 
 * def mat4_gauss_elim(m: mat4) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_gauss_elim(m.c_mat4)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_151mat4_gauss_elim, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_gauss_elim, __pyx_t_1) < 0) __PYX_ERR(0, 1333, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1339
 *     return result
 * 
 * def mat4_rank(m: mat4) -> int:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_rank(m.c_mat4)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_153mat4_rank, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_rank, __pyx_t_1) < 0) __PYX_ERR(0, 1339, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1342
 *     return CGL_mat4_rank(m.c_mat4)
 * 
 * def mat4_trace(m: mat4) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_mat4_trace(m.c_mat4)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_155mat4_trace, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_trace, __pyx_t_1) < 0) __PYX_ERR(0, 1342, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1345
 *     return CGL_mat4_trace(m.c_mat4)
 * 
 * def mat4_rotate_about_axis(axis: vec3, angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_about_axis(axis.c_vec3, angle)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_157mat4_rotate_about_axis, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_rotate_about_axis, __pyx_t_1) < 0) __PYX_ERR(0, 1345, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1351
 *     return result
 * 
 * def mat4_look_at(eye: vec3, target: vec3, up: vec3) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_look_at(eye.c_vec3, target.c_vec3, up.c_vec3)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_159mat4_look_at, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_look_at, __pyx_t_1) < 0) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1357
 *     return result
 * 
 * def mat4_lerp(a: mat4, b: mat4, t: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_lerp(a.c_mat4, b.c_mat4, t)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_161mat4_lerp, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_lerp, __pyx_t_1) < 0) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1363
 *     return result
 * 
 * def mat4_decompose_lu(m: mat4, l: mat4, u: mat4):             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 l_obj = CGL_mat4()
 *     cdef CGL_mat4 u_obj = CGL_mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_163mat4_decompose_lu, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_decompose_lu, __pyx_t_1) < 0) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1373
 *     return (l, u)
 * 
 * def mat4_perspective(fov: float, aspect: float, near: float, far: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_perspective(fov, aspect, near, far)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_165mat4_perspective, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_perspective, __pyx_t_1) < 0) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1379
 *     return result
 * 
 * def mat4_orthographic(left: float, right: float, bottom: float, top: float, near: float, far: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_orthographic(left, right, bottom, top, near, far)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_167mat4_orthographic, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_orthographic, __pyx_t_1) < 0) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1385
 *     return result
 * 
 * def mat4_zero() -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_zero()
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_169mat4_zero, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_zero, __pyx_t_1) < 0) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1391
 *     return result
 * 
 * def mat4_identity() -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_identity()
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_171mat4_identity, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_identity, __pyx_t_1) < 0) __PYX_ERR(0, 1391, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1398
 * 
 * 
 * def mat4_scale(x: float, y: float, z: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_scale(x, y, z)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_173mat4_scale, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_scale, __pyx_t_1) < 0) __PYX_ERR(0, 1398, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1404
 *     return result
 * 
 * def mat4_translate(x: float, y: float, z: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_translate(x, y, z)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_175mat4_translate, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_translate, __pyx_t_1) < 0) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1410
 *     return result
 * 
 * def mat4_rotate_x(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_x(angle)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_177mat4_rotate_x, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_rotate_x, __pyx_t_1) < 0) __PYX_ERR(0, 1410, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1416
 *     return result
 * 
 * def mat4_rotate_y(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_y(angle)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_179mat4_rotate_y, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_rotate_y, __pyx_t_1) < 0) __PYX_ERR(0, 1416, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1422
 *     return result
 * 
 * def mat4_rotate_z(angle: float) -> mat4:             # <<<<<<<<<<<<<<
 *     cdef CGL_mat4 obj = CGL_mat4_rotate_z(angle)
 *     result = mat4()
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_181mat4_rotate_z, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mat4_rotate_z, __pyx_t_1) < 0) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1729
 *                 self[i, j] = random.uniform(mian, maax)
 * 
 * KEY_UNKNOWN            = -1             # <<<<<<<<<<<<<<
 * KEY_SPACE              = 32
 * KEY_APOSTROPHE         = 39
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_UNKNOWN, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1729, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1730
 * 
 * KEY_UNKNOWN            = -1
 * KEY_SPACE              = 32             # <<<<<<<<<<<<<<
 * KEY_APOSTROPHE         = 39
 * KEY_COMMA              = 44
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_SPACE, __pyx_int_32) < 0) __PYX_ERR(0, 1730, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1731
 * KEY_UNKNOWN            = -1
 * KEY_SPACE              = 32
 * KEY_APOSTROPHE         = 39             # <<<<<<<<<<<<<<
 * KEY_COMMA              = 44
 * KEY_MINUS              = 45
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_APOSTROPHE, __pyx_int_39) < 0) __PYX_ERR(0, 1731, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1732
 * KEY_SPACE              = 32
 * KEY_APOSTROPHE         = 39
 * KEY_COMMA              = 44             # <<<<<<<<<<<<<<
 * KEY_MINUS              = 45
 * KEY_PERIOD             = 46
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_COMMA, __pyx_int_44) < 0) __PYX_ERR(0, 1732, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1733
 * KEY_APOSTROPHE         = 39
 * KEY_COMMA              = 44
 * KEY_MINUS              = 45             # <<<<<<<<<<<<<<
 * KEY_PERIOD             = 46
 * KEY_SLASH              = 47
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_MINUS, __pyx_int_45) < 0) __PYX_ERR(0, 1733, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1734
 * KEY_COMMA              = 44
 * KEY_MINUS              = 45
 * KEY_PERIOD             = 46             # <<<<<<<<<<<<<<
 * KEY_SLASH              = 47
 * KEY_0                  = 48
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_PERIOD, __pyx_int_46) < 0) __PYX_ERR(0, 1734, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1735
 * KEY_MINUS              = 45
 * KEY_PERIOD             = 46
 * KEY_SLASH              = 47             # <<<<<<<<<<<<<<
 * KEY_0                  = 48
 * KEY_1                  = 49
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_SLASH, __pyx_int_47) < 0) __PYX_ERR(0, 1735, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1736
 * KEY_PERIOD             = 46
 * KEY_SLASH              = 47
 * KEY_0                  = 48             # <<<<<<<<<<<<<<
 * KEY_1                  = 49
 * KEY_2                  = 50
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_0, __pyx_int_48) < 0) __PYX_ERR(0, 1736, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1737
 * KEY_SLASH              = 47
 * KEY_0                  = 48
 * KEY_1                  = 49             # <<<<<<<<<<<<<<
 * KEY_2                  = 50
 * KEY_3                  = 51
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_1, __pyx_int_49) < 0) __PYX_ERR(0, 1737, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1738
 * KEY_0                  = 48
 * KEY_1                  = 49
 * KEY_2                  = 50             # <<<<<<<<<<<<<<
 * KEY_3                  = 51
 * KEY_4                  = 52
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_2, __pyx_int_50) < 0) __PYX_ERR(0, 1738, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1739
 * KEY_1                  = 49
 * KEY_2                  = 50
 * KEY_3                  = 51             # <<<<<<<<<<<<<<
 * KEY_4                  = 52
 * KEY_5                  = 53
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_3, __pyx_int_51) < 0) __PYX_ERR(0, 1739, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1740
 * KEY_2                  = 50
 * KEY_3                  = 51
 * KEY_4                  = 52             # <<<<<<<<<<<<<<
 * KEY_5                  = 53
 * KEY_6                  = 54
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_4, __pyx_int_52) < 0) __PYX_ERR(0, 1740, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1741
 * KEY_3                  = 51
 * KEY_4                  = 52
 * KEY_5                  = 53             # <<<<<<<<<<<<<<
 * KEY_6                  = 54
 * KEY_7                  = 55
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_5, __pyx_int_53) < 0) __PYX_ERR(0, 1741, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1742
 * KEY_4                  = 52
 * KEY_5                  = 53
 * KEY_6                  = 54             # <<<<<<<<<<<<<<
 * KEY_7                  = 55
 * KEY_8                  = 56
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_6, __pyx_int_54) < 0) __PYX_ERR(0, 1742, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1743
 * KEY_5                  = 53
 * KEY_6                  = 54
 * KEY_7                  = 55             # <<<<<<<<<<<<<<
 * KEY_8                  = 56
 * KEY_9                  = 57
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_7, __pyx_int_55) < 0) __PYX_ERR(0, 1743, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1744
 * KEY_6                  = 54
 * KEY_7                  = 55
 * KEY_8                  = 56             # <<<<<<<<<<<<<<
 * KEY_9                  = 57
 * KEY_SEMICOLON          = 59
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_8, __pyx_int_56) < 0) __PYX_ERR(0, 1744, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1745
 * KEY_7                  = 55
 * KEY_8                  = 56
 * KEY_9                  = 57             # <<<<<<<<<<<<<<
 * KEY_SEMICOLON          = 59
 * KEY_EQUAL              = 61
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_9, __pyx_int_57) < 0) __PYX_ERR(0, 1745, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1746
 * KEY_8                  = 56
 * KEY_9                  = 57
 * KEY_SEMICOLON          = 59             # <<<<<<<<<<<<<<
 * KEY_EQUAL              = 61
 * KEY_A                  = 65
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_SEMICOLON, __pyx_int_59) < 0) __PYX_ERR(0, 1746, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1747
 * KEY_9                  = 57
 * KEY_SEMICOLON          = 59
 * KEY_EQUAL              = 61             # <<<<<<<<<<<<<<
 * KEY_A                  = 65
 * KEY_B                  = 66
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_EQUAL, __pyx_int_61) < 0) __PYX_ERR(0, 1747, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1748
 * KEY_SEMICOLON          = 59
 * KEY_EQUAL              = 61
 * KEY_A                  = 65             # <<<<<<<<<<<<<<
 * KEY_B                  = 66
 * KEY_C                  = 67
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_A, __pyx_int_65) < 0) __PYX_ERR(0, 1748, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1749
 * KEY_EQUAL              = 61
 * KEY_A                  = 65
 * KEY_B                  = 66             # <<<<<<<<<<<<<<
 * KEY_C                  = 67
 * KEY_D                  = 68
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_B, __pyx_int_66) < 0) __PYX_ERR(0, 1749, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1750
 * KEY_A                  = 65
 * KEY_B                  = 66
 * KEY_C                  = 67             # <<<<<<<<<<<<<<
 * KEY_D                  = 68
 * KEY_E                  = 69
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_C, __pyx_int_67) < 0) __PYX_ERR(0, 1750, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1751
 * KEY_B                  = 66
 * KEY_C                  = 67
 * KEY_D                  = 68             # <<<<<<<<<<<<<<
 * KEY_E                  = 69
 * KEY_F                  = 70
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_D, __pyx_int_68) < 0) __PYX_ERR(0, 1751, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1752
 * KEY_C                  = 67
 * KEY_D                  = 68
 * KEY_E                  = 69             # <<<<<<<<<<<<<<
 * KEY_F                  = 70
 * KEY_G                  = 71
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_E, __pyx_int_69) < 0) __PYX_ERR(0, 1752, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1753
 * KEY_D                  = 68
 * KEY_E                  = 69
 * KEY_F                  = 70             # <<<<<<<<<<<<<<
 * KEY_G                  = 71
 * KEY_H                  = 72
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F, __pyx_int_70) < 0) __PYX_ERR(0, 1753, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1754
 * KEY_E                  = 69
 * KEY_F                  = 70
 * KEY_G                  = 71             # <<<<<<<<<<<<<<
 * KEY_H                  = 72
 * KEY_I                  = 73
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_G, __pyx_int_71) < 0) __PYX_ERR(0, 1754, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1755
 * KEY_F                  = 70
 * KEY_G                  = 71
 * KEY_H                  = 72             # <<<<<<<<<<<<<<
 * KEY_I                  = 73
 * KEY_J                  = 74
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_H, __pyx_int_72) < 0) __PYX_ERR(0, 1755, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1756
 * KEY_G                  = 71
 * KEY_H                  = 72
 * KEY_I                  = 73             # <<<<<<<<<<<<<<
 * KEY_J                  = 74
 * KEY_K                  = 75
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_I, __pyx_int_73) < 0) __PYX_ERR(0, 1756, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1757
 * KEY_H                  = 72
 * KEY_I                  = 73
 * KEY_J                  = 74             # <<<<<<<<<<<<<<
 * KEY_K                  = 75
 * KEY_L                  = 76
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_J, __pyx_int_74) < 0) __PYX_ERR(0, 1757, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1758
 * KEY_I                  = 73
 * KEY_J                  = 74
 * KEY_K                  = 75             # <<<<<<<<<<<<<<
 * KEY_L                  = 76
 * KEY_M                  = 77
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_K, __pyx_int_75) < 0) __PYX_ERR(0, 1758, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1759
 * KEY_J                  = 74
 * KEY_K                  = 75
 * KEY_L                  = 76             # <<<<<<<<<<<<<<
 * KEY_M                  = 77
 * KEY_N                  = 78
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_L, __pyx_int_76) < 0) __PYX_ERR(0, 1759, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1760
 * KEY_K                  = 75
 * KEY_L                  = 76
 * KEY_M                  = 77             # <<<<<<<<<<<<<<
 * KEY_N                  = 78
 * KEY_O                  = 79
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_M, __pyx_int_77) < 0) __PYX_ERR(0, 1760, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1761
 * KEY_L                  = 76
 * KEY_M                  = 77
 * KEY_N                  = 78             # <<<<<<<<<<<<<<
 * KEY_O                  = 79
 * KEY_P                  = 80
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_N, __pyx_int_78) < 0) __PYX_ERR(0, 1761, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1762
 * KEY_M                  = 77
 * KEY_N                  = 78
 * KEY_O                  = 79             # <<<<<<<<<<<<<<
 * KEY_P                  = 80
 * KEY_Q                  = 81
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_O, __pyx_int_79) < 0) __PYX_ERR(0, 1762, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1763
 * KEY_N                  = 78
 * KEY_O                  = 79
 * KEY_P                  = 80             # <<<<<<<<<<<<<<
 * KEY_Q                  = 81
 * KEY_R                  = 82
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_P, __pyx_int_80) < 0) __PYX_ERR(0, 1763, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1764
 * KEY_O                  = 79
 * KEY_P                  = 80
 * KEY_Q                  = 81             # <<<<<<<<<<<<<<
 * KEY_R                  = 82
 * KEY_S                  = 83
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_Q, __pyx_int_81) < 0) __PYX_ERR(0, 1764, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1765
 * KEY_P                  = 80
 * KEY_Q                  = 81
 * KEY_R                  = 82             # <<<<<<<<<<<<<<
 * KEY_S                  = 83
 * KEY_T                  = 84
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_R, __pyx_int_82) < 0) __PYX_ERR(0, 1765, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1766
 * KEY_Q                  = 81
 * KEY_R                  = 82
 * KEY_S                  = 83             # <<<<<<<<<<<<<<
 * KEY_T                  = 84
 * KEY_U                  = 85
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_S, __pyx_int_83) < 0) __PYX_ERR(0, 1766, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1767
 * KEY_R                  = 82
 * KEY_S                  = 83
 * KEY_T                  = 84             # <<<<<<<<<<<<<<
 * KEY_U                  = 85
 * KEY_V                  = 86
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_T, __pyx_int_84) < 0) __PYX_ERR(0, 1767, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1768
 * KEY_S                  = 83
 * KEY_T                  = 84
 * KEY_U                  = 85             # <<<<<<<<<<<<<<
 * KEY_V                  = 86
 * KEY_W                  = 87
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_U, __pyx_int_85) < 0) __PYX_ERR(0, 1768, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1769
 * KEY_T                  = 84
 * KEY_U                  = 85
 * KEY_V                  = 86             # <<<<<<<<<<<<<<
 * KEY_W                  = 87
 * KEY_X                  = 88
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_V, __pyx_int_86) < 0) __PYX_ERR(0, 1769, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1770
 * KEY_U                  = 85
 * KEY_V                  = 86
 * KEY_W                  = 87             # <<<<<<<<<<<<<<
 * KEY_X                  = 88
 * KEY_Y                  = 89
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_W, __pyx_int_87) < 0) __PYX_ERR(0, 1770, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1771
 * KEY_V                  = 86
 * KEY_W                  = 87
 * KEY_X                  = 88             # <<<<<<<<<<<<<<
 * KEY_Y                  = 89
 * KEY_Z                  = 90
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_X, __pyx_int_88) < 0) __PYX_ERR(0, 1771, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1772
 * KEY_W                  = 87
 * KEY_X                  = 88
 * KEY_Y                  = 89             # <<<<<<<<<<<<<<
 * KEY_Z                  = 90
 * KEY_LEFT_BRACKET       = 91
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_Y, __pyx_int_89) < 0) __PYX_ERR(0, 1772, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1773
 * KEY_X                  = 88
 * KEY_Y                  = 89
 * KEY_Z                  = 90             # <<<<<<<<<<<<<<
 * KEY_LEFT_BRACKET       = 91
 * KEY_BACKSLASH          = 92
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_Z, __pyx_int_90) < 0) __PYX_ERR(0, 1773, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1774
 * KEY_Y                  = 89
 * KEY_Z                  = 90
 * KEY_LEFT_BRACKET       = 91             # <<<<<<<<<<<<<<
 * KEY_BACKSLASH          = 92
 * KEY_RIGHT_BRACKET      = 93
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_LEFT_BRACKET, __pyx_int_91) < 0) __PYX_ERR(0, 1774, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1775
 * KEY_Z                  = 90
 * KEY_LEFT_BRACKET       = 91
 * KEY_BACKSLASH          = 92             # <<<<<<<<<<<<<<
 * KEY_RIGHT_BRACKET      = 93
 * KEY_GRAVE_ACCENT       = 96
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_BACKSLASH, __pyx_int_92) < 0) __PYX_ERR(0, 1775, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1776
 * KEY_LEFT_BRACKET       = 91
 * KEY_BACKSLASH          = 92
 * KEY_RIGHT_BRACKET      = 93             # <<<<<<<<<<<<<<
 * KEY_GRAVE_ACCENT       = 96
 * KEY_WORLD_1            = 161
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_RIGHT_BRACKET, __pyx_int_93) < 0) __PYX_ERR(0, 1776, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1777
 * KEY_BACKSLASH          = 92
 * KEY_RIGHT_BRACKET      = 93
 * KEY_GRAVE_ACCENT       = 96             # <<<<<<<<<<<<<<
 * KEY_WORLD_1            = 161
 * KEY_WORLD_2            = 162
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_GRAVE_ACCENT, __pyx_int_96) < 0) __PYX_ERR(0, 1777, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1778
 * KEY_RIGHT_BRACKET      = 93
 * KEY_GRAVE_ACCENT       = 96
 * KEY_WORLD_1            = 161             # <<<<<<<<<<<<<<
 * KEY_WORLD_2            = 162
 * KEY_ESCAPE             = 256
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_WORLD_1, __pyx_int_161) < 0) __PYX_ERR(0, 1778, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1779
 * KEY_GRAVE_ACCENT       = 96
 * KEY_WORLD_1            = 161
 * KEY_WORLD_2            = 162             # <<<<<<<<<<<<<<
 * KEY_ESCAPE             = 256
 * KEY_ENTER              = 257
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_WORLD_2, __pyx_int_162) < 0) __PYX_ERR(0, 1779, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1780
 * KEY_WORLD_1            = 161
 * KEY_WORLD_2            = 162
 * KEY_ESCAPE             = 256             # <<<<<<<<<<<<<<
 * KEY_ENTER              = 257
 * KEY_TAB                = 258
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_ESCAPE, __pyx_int_256) < 0) __PYX_ERR(0, 1780, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1781
 * KEY_WORLD_2            = 162
 * KEY_ESCAPE             = 256
 * KEY_ENTER              = 257             # <<<<<<<<<<<<<<
 * KEY_TAB                = 258
 * KEY_BACKSPACE          = 259
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_ENTER, __pyx_int_257) < 0) __PYX_ERR(0, 1781, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1782
 * KEY_ESCAPE             = 256
 * KEY_ENTER              = 257
 * KEY_TAB                = 258             # <<<<<<<<<<<<<<
 * KEY_BACKSPACE          = 259
 * KEY_INSERT             = 260
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_TAB, __pyx_int_258) < 0) __PYX_ERR(0, 1782, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1783
 * KEY_ENTER              = 257
 * KEY_TAB                = 258
 * KEY_BACKSPACE          = 259             # <<<<<<<<<<<<<<
 * KEY_INSERT             = 260
 * KEY_DELETE             = 261
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_BACKSPACE, __pyx_int_259) < 0) __PYX_ERR(0, 1783, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1784
 * KEY_TAB                = 258
 * KEY_BACKSPACE          = 259
 * KEY_INSERT             = 260             # <<<<<<<<<<<<<<
 * KEY_DELETE             = 261
 * KEY_RIGHT              = 262
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_INSERT, __pyx_int_260) < 0) __PYX_ERR(0, 1784, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1785
 * KEY_BACKSPACE          = 259
 * KEY_INSERT             = 260
 * KEY_DELETE             = 261             # <<<<<<<<<<<<<<
 * KEY_RIGHT              = 262
 * KEY_LEFT               = 263
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_DELETE, __pyx_int_261) < 0) __PYX_ERR(0, 1785, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1786
 * KEY_INSERT             = 260
 * KEY_DELETE             = 261
 * KEY_RIGHT              = 262             # <<<<<<<<<<<<<<
 * KEY_LEFT               = 263
 * KEY_DOWN               = 264
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_RIGHT, __pyx_int_262) < 0) __PYX_ERR(0, 1786, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1787
 * KEY_DELETE             = 261
 * KEY_RIGHT              = 262
 * KEY_LEFT               = 263             # <<<<<<<<<<<<<<
 * KEY_DOWN               = 264
 * KEY_UP                 = 265
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_LEFT, __pyx_int_263) < 0) __PYX_ERR(0, 1787, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1788
 * KEY_RIGHT              = 262
 * KEY_LEFT               = 263
 * KEY_DOWN               = 264             # <<<<<<<<<<<<<<
 * KEY_UP                 = 265
 * KEY_PAGE_UP            = 266
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_DOWN, __pyx_int_264) < 0) __PYX_ERR(0, 1788, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1789
 * KEY_LEFT               = 263
 * KEY_DOWN               = 264
 * KEY_UP                 = 265             # <<<<<<<<<<<<<<
 * KEY_PAGE_UP            = 266
 * KEY_PAGE_DOWN          = 267
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_UP, __pyx_int_265) < 0) __PYX_ERR(0, 1789, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1790
 * KEY_DOWN               = 264
 * KEY_UP                 = 265
 * KEY_PAGE_UP            = 266             # <<<<<<<<<<<<<<
 * KEY_PAGE_DOWN          = 267
 * KEY_HOME               = 268
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_PAGE_UP, __pyx_int_266) < 0) __PYX_ERR(0, 1790, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1791
 * KEY_UP                 = 265
 * KEY_PAGE_UP            = 266
 * KEY_PAGE_DOWN          = 267             # <<<<<<<<<<<<<<
 * KEY_HOME               = 268
 * KEY_END                = 269
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_PAGE_DOWN, __pyx_int_267) < 0) __PYX_ERR(0, 1791, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1792
 * KEY_PAGE_UP            = 266
 * KEY_PAGE_DOWN          = 267
 * KEY_HOME               = 268             # <<<<<<<<<<<<<<
 * KEY_END                = 269
 * KEY_CAPS_LOCK          = 280
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_HOME, __pyx_int_268) < 0) __PYX_ERR(0, 1792, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1793
 * KEY_PAGE_DOWN          = 267
 * KEY_HOME               = 268
 * KEY_END                = 269             # <<<<<<<<<<<<<<
 * KEY_CAPS_LOCK          = 280
 * KEY_SCROLL_LOCK        = 281
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_END, __pyx_int_269) < 0) __PYX_ERR(0, 1793, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1794
 * KEY_HOME               = 268
 * KEY_END                = 269
 * KEY_CAPS_LOCK          = 280             # <<<<<<<<<<<<<<
 * KEY_SCROLL_LOCK        = 281
 * KEY_NUM_LOCK           = 282
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_CAPS_LOCK, __pyx_int_280) < 0) __PYX_ERR(0, 1794, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1795
 * KEY_END                = 269
 * KEY_CAPS_LOCK          = 280
 * KEY_SCROLL_LOCK        = 281             # <<<<<<<<<<<<<<
 * KEY_NUM_LOCK           = 282
 * KEY_PRINT_SCREEN       = 283
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_SCROLL_LOCK, __pyx_int_281) < 0) __PYX_ERR(0, 1795, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1796
 * KEY_CAPS_LOCK          = 280
 * KEY_SCROLL_LOCK        = 281
 * KEY_NUM_LOCK           = 282             # <<<<<<<<<<<<<<
 * KEY_PRINT_SCREEN       = 283
 * KEY_PAUSE              = 284
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_NUM_LOCK, __pyx_int_282) < 0) __PYX_ERR(0, 1796, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1797
 * KEY_SCROLL_LOCK        = 281
 * KEY_NUM_LOCK           = 282
 * KEY_PRINT_SCREEN       = 283             # <<<<<<<<<<<<<<
 * KEY_PAUSE              = 284
 * KEY_F1                 = 290
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_PRINT_SCREEN, __pyx_int_283) < 0) __PYX_ERR(0, 1797, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1798
 * KEY_NUM_LOCK           = 282
 * KEY_PRINT_SCREEN       = 283
 * KEY_PAUSE              = 284             # <<<<<<<<<<<<<<
 * KEY_F1                 = 290
 * KEY_F2                 = 291
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_PAUSE, __pyx_int_284) < 0) __PYX_ERR(0, 1798, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1799
 * KEY_PRINT_SCREEN       = 283
 * KEY_PAUSE              = 284
 * KEY_F1                 = 290             # <<<<<<<<<<<<<<
 * KEY_F2                 = 291
 * KEY_F3                 = 292
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F1, __pyx_int_290) < 0) __PYX_ERR(0, 1799, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1800
 * KEY_PAUSE              = 284
 * KEY_F1                 = 290
 * KEY_F2                 = 291             # <<<<<<<<<<<<<<
 * KEY_F3                 = 292
 * KEY_F4                 = 293
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F2, __pyx_int_291) < 0) __PYX_ERR(0, 1800, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1801
 * KEY_F1                 = 290
 * KEY_F2                 = 291
 * KEY_F3                 = 292             # <<<<<<<<<<<<<<
 * KEY_F4                 = 293
 * KEY_F5                 = 294
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F3, __pyx_int_292) < 0) __PYX_ERR(0, 1801, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1802
 * KEY_F2                 = 291
 * KEY_F3                 = 292
 * KEY_F4                 = 293             # <<<<<<<<<<<<<<
 * KEY_F5                 = 294
 * KEY_F6                 = 295
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F4, __pyx_int_293) < 0) __PYX_ERR(0, 1802, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1803
 * KEY_F3                 = 292
 * KEY_F4                 = 293
 * KEY_F5                 = 294             # <<<<<<<<<<<<<<
 * KEY_F6                 = 295
 * KEY_F7                 = 296
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F5, __pyx_int_294) < 0) __PYX_ERR(0, 1803, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1804
 * KEY_F4                 = 293
 * KEY_F5                 = 294
 * KEY_F6                 = 295             # <<<<<<<<<<<<<<
 * KEY_F7                 = 296
 * KEY_F8                 = 297
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F6, __pyx_int_295) < 0) __PYX_ERR(0, 1804, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1805
 * KEY_F5                 = 294
 * KEY_F6                 = 295
 * KEY_F7                 = 296             # <<<<<<<<<<<<<<
 * KEY_F8                 = 297
 * KEY_F9                 = 298
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F7, __pyx_int_296) < 0) __PYX_ERR(0, 1805, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1806
 * KEY_F6                 = 295
 * KEY_F7                 = 296
 * KEY_F8                 = 297             # <<<<<<<<<<<<<<
 * KEY_F9                 = 298
 * KEY_F10                = 299
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F8, __pyx_int_297) < 0) __PYX_ERR(0, 1806, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1807
 * KEY_F7                 = 296
 * KEY_F8                 = 297
 * KEY_F9                 = 298             # <<<<<<<<<<<<<<
 * KEY_F10                = 299
 * KEY_F11                = 300
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F9, __pyx_int_298) < 0) __PYX_ERR(0, 1807, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1808
 * KEY_F8                 = 297
 * KEY_F9                 = 298
 * KEY_F10                = 299             # <<<<<<<<<<<<<<
 * KEY_F11                = 300
 * KEY_F12                = 301
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F10, __pyx_int_299) < 0) __PYX_ERR(0, 1808, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1809
 * KEY_F9                 = 298
 * KEY_F10                = 299
 * KEY_F11                = 300             # <<<<<<<<<<<<<<
 * KEY_F12                = 301
 * KEY_F13                = 302
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F11, __pyx_int_300) < 0) __PYX_ERR(0, 1809, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1810
 * KEY_F10                = 299
 * KEY_F11                = 300
 * KEY_F12                = 301             # <<<<<<<<<<<<<<
 * KEY_F13                = 302
 * KEY_F14                = 303
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F12, __pyx_int_301) < 0) __PYX_ERR(0, 1810, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1811
 * KEY_F11                = 300
 * KEY_F12                = 301
 * KEY_F13                = 302             # <<<<<<<<<<<<<<
 * KEY_F14                = 303
 * KEY_F15                = 304
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F13, __pyx_int_302) < 0) __PYX_ERR(0, 1811, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1812
 * KEY_F12                = 301
 * KEY_F13                = 302
 * KEY_F14                = 303             # <<<<<<<<<<<<<<
 * KEY_F15                = 304
 * KEY_F16                = 305
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F14, __pyx_int_303) < 0) __PYX_ERR(0, 1812, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1813
 * KEY_F13                = 302
 * KEY_F14                = 303
 * KEY_F15                = 304             # <<<<<<<<<<<<<<
 * KEY_F16                = 305
 * KEY_F17                = 306
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F15, __pyx_int_304) < 0) __PYX_ERR(0, 1813, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1814
 * KEY_F14                = 303
 * KEY_F15                = 304
 * KEY_F16                = 305             # <<<<<<<<<<<<<<
 * KEY_F17                = 306
 * KEY_F18                = 307
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F16, __pyx_int_305) < 0) __PYX_ERR(0, 1814, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1815
 * KEY_F15                = 304
 * KEY_F16                = 305
 * KEY_F17                = 306             # <<<<<<<<<<<<<<
 * KEY_F18                = 307
 * KEY_F19                = 308
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F17, __pyx_int_306) < 0) __PYX_ERR(0, 1815, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1816
 * KEY_F16                = 305
 * KEY_F17                = 306
 * KEY_F18                = 307             # <<<<<<<<<<<<<<
 * KEY_F19                = 308
 * KEY_F20                = 309
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F18, __pyx_int_307) < 0) __PYX_ERR(0, 1816, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1817
 * KEY_F17                = 306
 * KEY_F18                = 307
 * KEY_F19                = 308             # <<<<<<<<<<<<<<
 * KEY_F20                = 309
 * KEY_F21                = 310
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F19, __pyx_int_308) < 0) __PYX_ERR(0, 1817, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1818
 * KEY_F18                = 307
 * KEY_F19                = 308
 * KEY_F20                = 309             # <<<<<<<<<<<<<<
 * KEY_F21                = 310
 * KEY_F22                = 311
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F20, __pyx_int_309) < 0) __PYX_ERR(0, 1818, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1819
 * KEY_F19                = 308
 * KEY_F20                = 309
 * KEY_F21                = 310             # <<<<<<<<<<<<<<
 * KEY_F22                = 311
 * KEY_F23                = 312
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F21, __pyx_int_310) < 0) __PYX_ERR(0, 1819, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1820
 * KEY_F20                = 309
 * KEY_F21                = 310
 * KEY_F22                = 311             # <<<<<<<<<<<<<<
 * KEY_F23                = 312
 * KEY_F24                = 313
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F22, __pyx_int_311) < 0) __PYX_ERR(0, 1820, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1821
 * KEY_F21                = 310
 * KEY_F22                = 311
 * KEY_F23                = 312             # <<<<<<<<<<<<<<
 * KEY_F24                = 313
 * KEY_F25                = 314
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F23, __pyx_int_312) < 0) __PYX_ERR(0, 1821, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1822
 * KEY_F22                = 311
 * KEY_F23                = 312
 * KEY_F24                = 313             # <<<<<<<<<<<<<<
 * KEY_F25                = 314
 * KEY_KP_0               = 320
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F24, __pyx_int_313) < 0) __PYX_ERR(0, 1822, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1823
 * KEY_F23                = 312
 * KEY_F24                = 313
 * KEY_F25                = 314             # <<<<<<<<<<<<<<
 * KEY_KP_0               = 320
 * KEY_KP_1               = 321
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_F25, __pyx_int_314) < 0) __PYX_ERR(0, 1823, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1824
 * KEY_F24                = 313
 * KEY_F25                = 314
 * KEY_KP_0               = 320             # <<<<<<<<<<<<<<
 * KEY_KP_1               = 321
 * KEY_KP_2               = 322
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_0, __pyx_int_320) < 0) __PYX_ERR(0, 1824, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1825
 * KEY_F25                = 314
 * KEY_KP_0               = 320
 * KEY_KP_1               = 321             # <<<<<<<<<<<<<<
 * KEY_KP_2               = 322
 * KEY_KP_3               = 323
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_1, __pyx_int_321) < 0) __PYX_ERR(0, 1825, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1826
 * KEY_KP_0               = 320
 * KEY_KP_1               = 321
 * KEY_KP_2               = 322             # <<<<<<<<<<<<<<
 * KEY_KP_3               = 323
 * KEY_KP_4               = 324
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_2, __pyx_int_322) < 0) __PYX_ERR(0, 1826, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1827
 * KEY_KP_1               = 321
 * KEY_KP_2               = 322
 * KEY_KP_3               = 323             # <<<<<<<<<<<<<<
 * KEY_KP_4               = 324
 * KEY_KP_5               = 325
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_3, __pyx_int_323) < 0) __PYX_ERR(0, 1827, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1828
 * KEY_KP_2               = 322
 * KEY_KP_3               = 323
 * KEY_KP_4               = 324             # <<<<<<<<<<<<<<
 * KEY_KP_5               = 325
 * KEY_KP_6               = 326
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_4, __pyx_int_324) < 0) __PYX_ERR(0, 1828, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1829
 * KEY_KP_3               = 323
 * KEY_KP_4               = 324
 * KEY_KP_5               = 325             # <<<<<<<<<<<<<<
 * KEY_KP_6               = 326
 * KEY_KP_7               = 327
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_5, __pyx_int_325) < 0) __PYX_ERR(0, 1829, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1830
 * KEY_KP_4               = 324
 * KEY_KP_5               = 325
 * KEY_KP_6               = 326             # <<<<<<<<<<<<<<
 * KEY_KP_7               = 327
 * KEY_KP_8               = 328
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_6, __pyx_int_326) < 0) __PYX_ERR(0, 1830, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1831
 * KEY_KP_5               = 325
 * KEY_KP_6               = 326
 * KEY_KP_7               = 327             # <<<<<<<<<<<<<<
 * KEY_KP_8               = 328
 * KEY_KP_9               = 329
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_7, __pyx_int_327) < 0) __PYX_ERR(0, 1831, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1832
 * KEY_KP_6               = 326
 * KEY_KP_7               = 327
 * KEY_KP_8               = 328             # <<<<<<<<<<<<<<
 * KEY_KP_9               = 329
 * KEY_KP_DECIMAL         = 330
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_8, __pyx_int_328) < 0) __PYX_ERR(0, 1832, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1833
 * KEY_KP_7               = 327
 * KEY_KP_8               = 328
 * KEY_KP_9               = 329             # <<<<<<<<<<<<<<
 * KEY_KP_DECIMAL         = 330
 * KEY_KP_DIVIDE          = 331
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_9, __pyx_int_329) < 0) __PYX_ERR(0, 1833, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1834
 * KEY_KP_8               = 328
 * KEY_KP_9               = 329
 * KEY_KP_DECIMAL         = 330             # <<<<<<<<<<<<<<
 * KEY_KP_DIVIDE          = 331
 * KEY_KP_MULTIPLY        = 332
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_DECIMAL, __pyx_int_330) < 0) __PYX_ERR(0, 1834, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1835
 * KEY_KP_9               = 329
 * KEY_KP_DECIMAL         = 330
 * KEY_KP_DIVIDE          = 331             # <<<<<<<<<<<<<<
 * KEY_KP_MULTIPLY        = 332
 * KEY_KP_SUBTRACT        = 333
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_DIVIDE, __pyx_int_331) < 0) __PYX_ERR(0, 1835, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1836
 * KEY_KP_DECIMAL         = 330
 * KEY_KP_DIVIDE          = 331
 * KEY_KP_MULTIPLY        = 332             # <<<<<<<<<<<<<<
 * KEY_KP_SUBTRACT        = 333
 * KEY_KP_ADD             = 334
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_MULTIPLY, __pyx_int_332) < 0) __PYX_ERR(0, 1836, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1837
 * KEY_KP_DIVIDE          = 331
 * KEY_KP_MULTIPLY        = 332
 * KEY_KP_SUBTRACT        = 333             # <<<<<<<<<<<<<<
 * KEY_KP_ADD             = 334
 * KEY_KP_ENTER           = 335
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_SUBTRACT, __pyx_int_333) < 0) __PYX_ERR(0, 1837, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1838
 * KEY_KP_MULTIPLY        = 332
 * KEY_KP_SUBTRACT        = 333
 * KEY_KP_ADD             = 334             # <<<<<<<<<<<<<<
 * KEY_KP_ENTER           = 335
 * KEY_KP_EQUAL           = 336
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_ADD, __pyx_int_334) < 0) __PYX_ERR(0, 1838, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1839
 * KEY_KP_SUBTRACT        = 333
 * KEY_KP_ADD             = 334
 * KEY_KP_ENTER           = 335             # <<<<<<<<<<<<<<
 * KEY_KP_EQUAL           = 336
 * KEY_LEFT_SHIFT         = 340
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_ENTER, __pyx_int_335) < 0) __PYX_ERR(0, 1839, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1840
 * KEY_KP_ADD             = 334
 * KEY_KP_ENTER           = 335
 * KEY_KP_EQUAL           = 336             # <<<<<<<<<<<<<<
 * KEY_LEFT_SHIFT         = 340
 * KEY_LEFT_CONTROL       = 341
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_KP_EQUAL, __pyx_int_336) < 0) __PYX_ERR(0, 1840, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1841
 * KEY_KP_ENTER           = 335
 * KEY_KP_EQUAL           = 336
 * KEY_LEFT_SHIFT         = 340             # <<<<<<<<<<<<<<
 * KEY_LEFT_CONTROL       = 341
 * KEY_LEFT_ALT           = 342
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_LEFT_SHIFT, __pyx_int_340) < 0) __PYX_ERR(0, 1841, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1842
 * KEY_KP_EQUAL           = 336
 * KEY_LEFT_SHIFT         = 340
 * KEY_LEFT_CONTROL       = 341             # <<<<<<<<<<<<<<
 * KEY_LEFT_ALT           = 342
 * KEY_LEFT_SUPER         = 343
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_LEFT_CONTROL, __pyx_int_341) < 0) __PYX_ERR(0, 1842, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1843
 * KEY_LEFT_SHIFT         = 340
 * KEY_LEFT_CONTROL       = 341
 * KEY_LEFT_ALT           = 342             # <<<<<<<<<<<<<<
 * KEY_LEFT_SUPER         = 343
 * KEY_RIGHT_SHIFT        = 344
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_LEFT_ALT, __pyx_int_342) < 0) __PYX_ERR(0, 1843, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1844
 * KEY_LEFT_CONTROL       = 341
 * KEY_LEFT_ALT           = 342
 * KEY_LEFT_SUPER         = 343             # <<<<<<<<<<<<<<
 * KEY_RIGHT_SHIFT        = 344
 * KEY_RIGHT_CONTROL      = 345
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_LEFT_SUPER, __pyx_int_343) < 0) __PYX_ERR(0, 1844, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1845
 * KEY_LEFT_ALT           = 342
 * KEY_LEFT_SUPER         = 343
 * KEY_RIGHT_SHIFT        = 344             # <<<<<<<<<<<<<<
 * KEY_RIGHT_CONTROL      = 345
 * KEY_RIGHT_ALT          = 346
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_RIGHT_SHIFT, __pyx_int_344) < 0) __PYX_ERR(0, 1845, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1846
 * KEY_LEFT_SUPER         = 343
 * KEY_RIGHT_SHIFT        = 344
 * KEY_RIGHT_CONTROL      = 345             # <<<<<<<<<<<<<<
 * KEY_RIGHT_ALT          = 346
 * KEY_RIGHT_SUPER        = 347
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_RIGHT_CONTROL, __pyx_int_345) < 0) __PYX_ERR(0, 1846, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1847
 * KEY_RIGHT_SHIFT        = 344
 * KEY_RIGHT_CONTROL      = 345
 * KEY_RIGHT_ALT          = 346             # <<<<<<<<<<<<<<
 * KEY_RIGHT_SUPER        = 347
 * KEY_MENU               = 348
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_RIGHT_ALT, __pyx_int_346) < 0) __PYX_ERR(0, 1847, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1848
 * KEY_RIGHT_CONTROL      = 345
 * KEY_RIGHT_ALT          = 346
 * KEY_RIGHT_SUPER        = 347             # <<<<<<<<<<<<<<
 * KEY_MENU               = 348
 * MOUSE_BUTTON_1         = 0
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_RIGHT_SUPER, __pyx_int_347) < 0) __PYX_ERR(0, 1848, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1849
 * KEY_RIGHT_ALT          = 346
 * KEY_RIGHT_SUPER        = 347
 * KEY_MENU               = 348             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_1         = 0
 * MOUSE_BUTTON_2         = 1
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_KEY_MENU, __pyx_int_348) < 0) __PYX_ERR(0, 1849, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1850
 * KEY_RIGHT_SUPER        = 347
 * KEY_MENU               = 348
 * MOUSE_BUTTON_1         = 0             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_2         = 1
 * MOUSE_BUTTON_3         = 2
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_1, __pyx_int_0) < 0) __PYX_ERR(0, 1850, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1851
 * KEY_MENU               = 348
 * MOUSE_BUTTON_1         = 0
 * MOUSE_BUTTON_2         = 1             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_3         = 2
 * MOUSE_BUTTON_4         = 3
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_2, __pyx_int_1) < 0) __PYX_ERR(0, 1851, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1852
 * MOUSE_BUTTON_1         = 0
 * MOUSE_BUTTON_2         = 1
 * MOUSE_BUTTON_3         = 2             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_4         = 3
 * MOUSE_BUTTON_5         = 4
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_3, __pyx_int_2) < 0) __PYX_ERR(0, 1852, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1853
 * MOUSE_BUTTON_2         = 1
 * MOUSE_BUTTON_3         = 2
 * MOUSE_BUTTON_4         = 3             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_5         = 4
 * MOUSE_BUTTON_6         = 5
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_4, __pyx_int_3) < 0) __PYX_ERR(0, 1853, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1854
 * MOUSE_BUTTON_3         = 2
 * MOUSE_BUTTON_4         = 3
 * MOUSE_BUTTON_5         = 4             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_6         = 5
 * MOUSE_BUTTON_7         = 6
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_5, __pyx_int_4) < 0) __PYX_ERR(0, 1854, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1855
 * MOUSE_BUTTON_4         = 3
 * MOUSE_BUTTON_5         = 4
 * MOUSE_BUTTON_6         = 5             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_7         = 6
 * MOUSE_BUTTON_8         = 7
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_6, __pyx_int_5) < 0) __PYX_ERR(0, 1855, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1856
 * MOUSE_BUTTON_5         = 4
 * MOUSE_BUTTON_6         = 5
 * MOUSE_BUTTON_7         = 6             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_8         = 7
 * MOUSE_BUTTON_LAST      = MOUSE_BUTTON_8
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_7, __pyx_int_6) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1857
 * MOUSE_BUTTON_6         = 5
 * MOUSE_BUTTON_7         = 6
 * MOUSE_BUTTON_8         = 7             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_LAST      = MOUSE_BUTTON_8
 * MOUSE_BUTTON_LEFT      = MOUSE_BUTTON_1
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_8, __pyx_int_7) < 0) __PYX_ERR(0, 1857, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1858
 * MOUSE_BUTTON_7         = 6
 * MOUSE_BUTTON_8         = 7
 * MOUSE_BUTTON_LAST      = MOUSE_BUTTON_8             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_LEFT      = MOUSE_BUTTON_1
 * MOUSE_BUTTON_RIGHT     = MOUSE_BUTTON_2
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MOUSE_BUTTON_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_LAST, __pyx_t_1) < 0) __PYX_ERR(0, 1858, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1859
 * MOUSE_BUTTON_8         = 7
 * MOUSE_BUTTON_LAST      = MOUSE_BUTTON_8
 * MOUSE_BUTTON_LEFT      = MOUSE_BUTTON_1             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_RIGHT     = MOUSE_BUTTON_2
 * MOUSE_BUTTON_MIDDLE    = MOUSE_BUTTON_3
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MOUSE_BUTTON_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_LEFT, __pyx_t_1) < 0) __PYX_ERR(0, 1859, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1860
 * MOUSE_BUTTON_LAST      = MOUSE_BUTTON_8
 * MOUSE_BUTTON_LEFT      = MOUSE_BUTTON_1
 * MOUSE_BUTTON_RIGHT     = MOUSE_BUTTON_2             # <<<<<<<<<<<<<<
 * MOUSE_BUTTON_MIDDLE    = MOUSE_BUTTON_3
 * RELEASE                = 0
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MOUSE_BUTTON_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_RIGHT, __pyx_t_1) < 0) __PYX_ERR(0, 1860, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1861
 * MOUSE_BUTTON_LEFT      = MOUSE_BUTTON_1
 * MOUSE_BUTTON_RIGHT     = MOUSE_BUTTON_2
 * MOUSE_BUTTON_MIDDLE    = MOUSE_BUTTON_3             # <<<<<<<<<<<<<<
 * RELEASE                = 0
 * PRESS                  = 1
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_MOUSE_BUTTON_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1861, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MOUSE_BUTTON_MIDDLE, __pyx_t_1) < 0) __PYX_ERR(0, 1861, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":1862
 * MOUSE_BUTTON_RIGHT     = MOUSE_BUTTON_2
 * MOUSE_BUTTON_MIDDLE    = MOUSE_BUTTON_3
 * RELEASE                = 0             # <<<<<<<<<<<<<<
 * PRESS                  = 1
 * REPEAT                 = 2
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_RELEASE, __pyx_int_0) < 0) __PYX_ERR(0, 1862, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1863
 * MOUSE_BUTTON_MIDDLE    = MOUSE_BUTTON_3
 * RELEASE                = 0
 * PRESS                  = 1             # <<<<<<<<<<<<<<
 * REPEAT                 = 2
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_PRESS, __pyx_int_1) < 0) __PYX_ERR(0, 1863, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1864
 * RELEASE                = 0
 * PRESS                  = 1
 * REPEAT                 = 2             # <<<<<<<<<<<<<<
 * 
 * __WINDOW_TABLE = {}
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_REPEAT, __pyx_int_2) < 0) __PYX_ERR(0, 1864, __pyx_L1_error)

  /* "cgl_wrapper.pyx":1866
 * REPEAT                 = 2
 * 
 * __WINDOW_TABLE = {}             # <<<<<<<<<<<<<<
 * 
 * cdef void __pass_through_window_close_callback(CGL_window* window):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_WINDOW_TABLE, __pyx_t_1) < 0) __PYX_ERR(0, 1866, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2310
 * 
 * 
 * def mesh_cpu_create(index_count: int, vertex_count: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create(index_count, vertex_count)
 *     if c_mesh == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_183mesh_cpu_create, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mesh_cpu_create, __pyx_t_1) < 0) __PYX_ERR(0, 2310, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2318
 *     return res
 * 
 * def mesh_cpu_load_obj(path: str) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_load_obj(path.encode("utf-8"))
 *     if c_mesh == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_185mesh_cpu_load_obj, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mesh_cpu_load_obj, __pyx_t_1) < 0) __PYX_ERR(0, 2318, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2326
 *     return res
 * 
 * def mesh_cpu_triangle(a: vec3, b: vec3, c: vec3) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 *     if c_mesh == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_187mesh_cpu_triangle, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mesh_cpu_triangle, __pyx_t_1) < 0) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2334
 *     return res
 * 
 * def mesh_cpu_quad(a: vec3, b: vec3, c: vec3, d: vec3) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 *     if c_mesh == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_189mesh_cpu_quad, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mesh_cpu_quad, __pyx_t_1) < 0) __PYX_ERR(0, 2334, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2342
 *     return res
 * 
 * def mesh_cpu_plane(front: vec3, right: vec3, resolution: int, scale: float) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_plane(front.c_vec3, right.c_vec3, resolution, scale)
 *     if c_mesh == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_191mesh_cpu_plane, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mesh_cpu_plane, __pyx_t_1) < 0) __PYX_ERR(0, 2342, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2350
 *     return res
 * 
 * def mesh_cpu_cube(use_3d_tex_coords: bool) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_cube(use_3d_tex_coords)
 *     if c_mesh == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_193mesh_cpu_cube, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mesh_cpu_cube, __pyx_t_1) < 0) __PYX_ERR(0, 2350, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2358
 *     return res
 * 
 * def mesh_cpu_sphere(res_u: int, res_v: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_sphere(res_u, res_v)
 *     if c_mesh == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_195mesh_cpu_sphere, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mesh_cpu_sphere, __pyx_t_1) < 0) __PYX_ERR(0, 2358, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2366
 *     return res
 * 
 * def mesh_cpu_cylinder(start: vec3, end: vec3, radius0: float, radius1: float, resolution: int) -> mesh_cpu:             # <<<<<<<<<<<<<<
 *     cdef CGL_mesh_cpu* c_mesh = CGL_mesh_cpu_create_cylinder(start.c_vec3, end.c_vec3, radius0, radius1, resolution)
 *     if c_mesh == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_197mesh_cpu_cylinder, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_mesh_cpu_cylinder, __pyx_t_1) < 0) __PYX_ERR(0, 2366, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2374
 *     return res
 * 
 * CUBEMAP_POSITIVE_X = 0x8515             # <<<<<<<<<<<<<<
 * CUBEMAP_NEGATIVE_X = 0x8516
 * CUBEMAP_POSITIVE_Y = 0x8517
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUBEMAP_POSITIVE_X, __pyx_int_34069) < 0) __PYX_ERR(0, 2374, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2375
 * 
 * CUBEMAP_POSITIVE_X = 0x8515
 * CUBEMAP_NEGATIVE_X = 0x8516             # <<<<<<<<<<<<<<
 * CUBEMAP_POSITIVE_Y = 0x8517
 * CUBEMAP_NEGATIVE_Y = 0x8518
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUBEMAP_NEGATIVE_X, __pyx_int_34070) < 0) __PYX_ERR(0, 2375, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2376
 * CUBEMAP_POSITIVE_X = 0x8515
 * CUBEMAP_NEGATIVE_X = 0x8516
 * CUBEMAP_POSITIVE_Y = 0x8517             # <<<<<<<<<<<<<<
 * CUBEMAP_NEGATIVE_Y = 0x8518
 * CUBEMAP_POSITIVE_Z = 0x8519
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUBEMAP_POSITIVE_Y, __pyx_int_34071) < 0) __PYX_ERR(0, 2376, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2377
 * CUBEMAP_NEGATIVE_X = 0x8516
 * CUBEMAP_POSITIVE_Y = 0x8517
 * CUBEMAP_NEGATIVE_Y = 0x8518             # <<<<<<<<<<<<<<
 * CUBEMAP_POSITIVE_Z = 0x8519
 * CUBEMAP_NEGATIVE_Z = 0x851A
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUBEMAP_NEGATIVE_Y, __pyx_int_34072) < 0) __PYX_ERR(0, 2377, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2378
 * CUBEMAP_POSITIVE_Y = 0x8517
 * CUBEMAP_NEGATIVE_Y = 0x8518
 * CUBEMAP_POSITIVE_Z = 0x8519             # <<<<<<<<<<<<<<
 * CUBEMAP_NEGATIVE_Z = 0x851A
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUBEMAP_POSITIVE_Z, __pyx_int_34073) < 0) __PYX_ERR(0, 2378, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2379
 * CUBEMAP_NEGATIVE_Y = 0x8518
 * CUBEMAP_POSITIVE_Z = 0x8519
 * CUBEMAP_NEGATIVE_Z = 0x851A             # <<<<<<<<<<<<<<
 * 
 * cdef class texture:
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_CUBEMAP_NEGATIVE_Z, __pyx_int_34074) < 0) __PYX_ERR(0, 2379, __pyx_L1_error)

  /* "cgl_wrapper.pyx":2472
 * 
 * 
 * def texture_create_from_image(image: image) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create(&image.c_image)
 *     if c_texture == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_199texture_create_from_image, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2472, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_texture_create_from_image, __pyx_t_1) < 0) __PYX_ERR(0, 2472, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2480
 *     return res
 * 
 * def texture_create_blank(width: int, height: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_blank(width, height, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_201texture_create_blank, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_texture_create_blank, __pyx_t_1) < 0) __PYX_ERR(0, 2480, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2488
 *     return res
 * 
 * def texture_create_array(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_array(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_203texture_create_array, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_texture_create_array, __pyx_t_1) < 0) __PYX_ERR(0, 2488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2496
 *     return res
 * 
 * def texture_creae_3d(width: int, height: int, depth: int, formatf: GLenum, internal_format: GLenum, typef: GLenum) -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_3d(width, height, depth, formatf, internal_format, typef)
 *     if c_texture == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_205texture_creae_3d, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_texture_creae_3d, __pyx_t_1) < 0) __PYX_ERR(0, 2496, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2504
 *     return res
 * 
 * def texture_create_cubemap() -> texture:             # <<<<<<<<<<<<<<
 *     cdef CGL_texture* c_texture = CGL_texture_create_cubemap()
 *     if c_texture == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_207texture_create_cubemap, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_texture_create_cubemap, __pyx_t_1) < 0) __PYX_ERR(0, 2504, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2594
 *         return res
 * 
 * def framebuffer_create_from_default(wnd: window) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_from_default(wnd.c_window)
 *     if c_framebuffer == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_209framebuffer_create_from_default, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_framebuffer_create_from_default, __pyx_t_1) < 0) __PYX_ERR(0, 2594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2602
 *     return res
 * 
 * def framebuffer_create(width: int, height: int) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create(width, height)
 *     if c_framebuffer == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_211framebuffer_create, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_framebuffer_create, __pyx_t_1) < 0) __PYX_ERR(0, 2602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2610
 *     return res
 * 
 * def framebuffer_create_basic(width: int, height: int) -> framebuffer:             # <<<<<<<<<<<<<<
 *     cdef CGL_framebuffer* c_framebuffer = CGL_framebuffer_create_basic(width, height)
 *     if c_framebuffer == NULL:
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_213framebuffer_create_basic, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_framebuffer_create_basic, __pyx_t_1) < 0) __PYX_ERR(0, 2610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2618
 *     return res
 * 
 * def gl_clear(r: float, g: float, b: float, a: float):             # <<<<<<<<<<<<<<
 *     CGL_gl_clear(r, g, b, a)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_215gl_clear, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_clear, __pyx_t_1) < 0) __PYX_ERR(0, 2618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2621
 *     CGL_gl_clear(r, g, b, a)
 * 
 * def gl_init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_gl_init()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_217gl_init, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_init, __pyx_t_1) < 0) __PYX_ERR(0, 2621, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2624
 *     return CGL_gl_init()
 * 
 * def gl_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_gl_shutdown()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_219gl_shutdown, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2624, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 2624, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2627
 *     CGL_gl_shutdown()
 * 
 * def gl_render_screen_quad():             # <<<<<<<<<<<<<<
 *     CGL_gl_render_screen_quad()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_221gl_render_screen_quad, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2627, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gl_render_screen_quad, __pyx_t_1) < 0) __PYX_ERR(0, 2627, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":2893
 *             self.has_been_destroyed = True
 * 
 * def ssbo_copy(dst: ssbo, src: ssbo, src_offset: int, dst_offset: int, size: int):             # <<<<<<<<<<<<<<
 *     CGL_ssbo_copy(dst.c_ssbo, src.c_ssbo, src_offset, dst_offset, size)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_223ssbo_copy, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2893, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ssbo_copy, __pyx_t_1) < 0) __PYX_ERR(0, 2893, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3031
 *         return self.vertices_count
 * 
 * def sat_collison_overlap_on_axis(a: shape, b: shape, axis: vec2) -> (bool, float):             # <<<<<<<<<<<<<<
 *     cdef float overlap_amount
 *     result = CGL_sat_collision_overlap_on_axis(&a.c_shape, &b.c_shape, axis.c_vec2, &overlap_amount)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_225sat_collison_overlap_on_axis, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sat_collison_overlap_on_axis, __pyx_t_1) < 0) __PYX_ERR(0, 3031, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3036
 *     return (result, overlap_amount)
 * 
 * def  sat_collision_detect(a: shape, b: shape) -> tuple:             # <<<<<<<<<<<<<<
 *     n_vector = vec2(0, 0)
 *     result = CGL_sat_collision_detect(&a.c_shape, &b.c_shape, &n_vector.c_vec2)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_227sat_collision_detect, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sat_collision_detect, __pyx_t_1) < 0) __PYX_ERR(0, 3036, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3041
 *     return (result, n_vector)
 * 
 * def sat_collision_calculate_axes(a: shape, max_axes: int = 10000) -> list:             # <<<<<<<<<<<<<<
 *     cdef int axes_count
 *     cdef CGL_vec2* axes = <CGL_vec2*>stdlib.malloc(max_axes * sizeof(CGL_vec2))
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_229sat_collision_calculate_axes, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sat_collision_calculate_axes, __pyx_t_1) < 0) __PYX_ERR(0, 3041, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3051
 *     return result
 * 
 * def is_point_in_circle(point: vec2, circle_radius: float) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_point_in_circle(point.c_vec2, circle_radius)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_231is_point_in_circle, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3051, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_point_in_circle, __pyx_t_1) < 0) __PYX_ERR(0, 3051, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3054
 *     return CGL_utils_is_point_in_circle(point.c_vec2, circle_radius)
 * 
 * def is_point_in_triangle(point: vec2, a: vec2, b: vec2, c: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_utils_is_point_in_triangle(point.c_vec2, a.c_vec2, b.c_vec2, c.c_vec2)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_233is_point_in_triangle, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_point_in_triangle, __pyx_t_1) < 0) __PYX_ERR(0, 3054, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3057
 *     return CGL_utils_is_point_in_triangle(point.c_vec2, a.c_vec2, b.c_vec2, c.c_vec2)
 * 
 * def calculate_circumcircle(a: vec2, b: vec2, c: vec2) -> tuple:             # <<<<<<<<<<<<<<
 *     center = vec2(0, 0)
 *     cdef float f_radius = 0
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_235calculate_circumcircle, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculate_circumcircle, __pyx_t_1) < 0) __PYX_ERR(0, 3057, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3063
 *     return (center, f_radius)
 * 
 * def calculate_super_triangle(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_237calculate_super_triangle, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculate_super_triangle, __pyx_t_1) < 0) __PYX_ERR(0, 3063, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3075
 *     return (r_a, r_b, r_c)
 * 
 * def calculate_bounding_square(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_239calculate_bounding_square, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculate_bounding_square, __pyx_t_1) < 0) __PYX_ERR(0, 3075, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3088
 *     return (r_a, r_b, r_c, r_d)
 * 
 * def calculate_bounding_box(vertices: list, padding: float) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_vertices = <CGL_vec2*>stdlib.malloc(len(vertices) * sizeof(CGL_vec2))
 *     for i in range(len(vertices)):
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_241calculate_bounding_box, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3088, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_calculate_bounding_box, __pyx_t_1) < 0) __PYX_ERR(0, 3088, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3101
 *     return (r_a, r_b, r_c, r_d)
 * 
 * def random_gaussian(mean: float, std_dev: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_utils_random_gaussian(mean, std_dev)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_243random_gaussian, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_random_gaussian, __pyx_t_1) < 0) __PYX_ERR(0, 3101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3104
 *     return CGL_utils_random_gaussian(mean, std_dev)
 * 
 * def gjk_shape_default_support(a: shape, d: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     return CGL_gjk_shape_default_support(&a.c_shape, d.c_vec3)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_245gjk_shape_default_support, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3104, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gjk_shape_default_support, __pyx_t_1) < 0) __PYX_ERR(0, 3104, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3107
 *     return CGL_gjk_shape_default_support(&a.c_shape, d.c_vec3)
 * 
 * def gjk_default_support(a: shape, b: shape, d: vec3) -> vec3:             # <<<<<<<<<<<<<<
 *     return CGL_gjk_default_support(&a.c_shape, &b.c_shape, d.c_vec3)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_247gjk_default_support, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gjk_default_support, __pyx_t_1) < 0) __PYX_ERR(0, 3107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3110
 *     return CGL_gjk_default_support(&a.c_shape, &b.c_shape, d.c_vec3)
 * 
 * def gjk_check_collision_2d(a: shape, b: shape) -> tuple:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3* simplex_out_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     result = CGL_gjk_check_collision_2d(&a.c_shape, &b.c_shape, simplex_out_ptr)
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_249gjk_check_collision_2d, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3110, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gjk_check_collision_2d, __pyx_t_1) < 0) __PYX_ERR(0, 3110, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3119
 *     return (result, simplex_out)
 * 
 * def gjk_epa_2d(a: shape, b: shape, simplex: list) ->  vec3:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec3* simplex_ptr = <CGL_vec3*>stdlib.malloc(sizeof(CGL_vec3) * 3)
 *     for i in range(3):
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_251gjk_epa_2d, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_gjk_epa_2d, __pyx_t_1) < 0) __PYX_ERR(0, 3119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3129
 *     return vec3(result.x, result.y, result.z)
 * 
 * def aabb_contains_point(aabb_min: vec2, aabb_max: vec2, point: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_aabb_contains_point(aabb_min.c_vec2, aabb_max.c_vec2, point.c_vec2)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_253aabb_contains_point, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_aabb_contains_point, __pyx_t_1) < 0) __PYX_ERR(0, 3129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3132
 *     return CGL_aabb_contains_point(aabb_min.c_vec2, aabb_max.c_vec2, point.c_vec2)
 * 
 * def aabb_intersects_aabb(aabb_min_a: vec2, aabb_max_a: vec2, aabb_min_b: vec2, aabb_max_b: vec2) -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_aabb_intersects_aabb(aabb_min_a.c_vec2, aabb_max_a.c_vec2, aabb_min_b.c_vec2, aabb_max_b.c_vec2)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_255aabb_intersects_aabb, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_aabb_intersects_aabb, __pyx_t_1) < 0) __PYX_ERR(0, 3132, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3135
 *     return CGL_aabb_intersects_aabb(aabb_min_a.c_vec2, aabb_max_a.c_vec2, aabb_min_b.c_vec2, aabb_max_b.c_vec2)
 * 
 * def triangulate_points_incremental(points: list) -> list:             # <<<<<<<<<<<<<<
 *     cdef CGL_vec2* c_points = <CGL_vec2*>stdlib.malloc(len(points) * sizeof(CGL_vec2))
 *     for i in range(len(points)):
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_257triangulate_points_incremental, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_triangulate_points_incremental, __pyx_t_1) < 0) __PYX_ERR(0, 3135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3150
 *     return indices
 * 
 * BLOOM_SHADER_MODE_PREFILTER    = 0             # <<<<<<<<<<<<<<
 * BLOOM_SHADER_MODE_DOWNSAMPLE   = 1
 * BLOOM_SHADER_MODE_UPSAMPLE     = 2
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BLOOM_SHADER_MODE_PREFILTER, __pyx_int_0) < 0) __PYX_ERR(0, 3150, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3151
 * 
 * BLOOM_SHADER_MODE_PREFILTER    = 0
 * BLOOM_SHADER_MODE_DOWNSAMPLE   = 1             # <<<<<<<<<<<<<<
 * BLOOM_SHADER_MODE_UPSAMPLE     = 2
 * BLOOM_SHADER_MODE_COMPOSITE    = 3
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BLOOM_SHADER_MODE_DOWNSAMPLE, __pyx_int_1) < 0) __PYX_ERR(0, 3151, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3152
 * BLOOM_SHADER_MODE_PREFILTER    = 0
 * BLOOM_SHADER_MODE_DOWNSAMPLE   = 1
 * BLOOM_SHADER_MODE_UPSAMPLE     = 2             # <<<<<<<<<<<<<<
 * BLOOM_SHADER_MODE_COMPOSITE    = 3
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BLOOM_SHADER_MODE_UPSAMPLE, __pyx_int_2) < 0) __PYX_ERR(0, 3152, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3153
 * BLOOM_SHADER_MODE_DOWNSAMPLE   = 1
 * BLOOM_SHADER_MODE_UPSAMPLE     = 2
 * BLOOM_SHADER_MODE_COMPOSITE    = 3             # <<<<<<<<<<<<<<
 * 
 * cdef class bloom:
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_BLOOM_SHADER_MODE_COMPOSITE, __pyx_int_3) < 0) __PYX_ERR(0, 3153, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3447
 * 
 * 
 * def text_init() -> bool:             # <<<<<<<<<<<<<<
 *     return CGL_text_init()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_259text_init, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3447, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_text_init, __pyx_t_1) < 0) __PYX_ERR(0, 3447, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3450
 *     return CGL_text_init()
 * 
 * def text_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_text_shutdown()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_261text_shutdown, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3450, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_text_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 3450, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "cgl_wrapper.pyx":3460
 * 
 *     @staticmethod
 *     def create_context(max_vertices: int, max_indices: int) -> object:             # <<<<<<<<<<<<<<
 *         return <object>CGL_widgets_context_create(max_vertices, max_indices)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_3create_context, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_create_context, __pyx_t_1) < 0) __PYX_ERR(0, 3460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3459
 *         raise RuntimeError("widgets is a static class")
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def create_context(max_vertices: int, max_indices: int) -> object:
 *         return <object>CGL_widgets_context_create(max_vertices, max_indices)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_create_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3460, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3459, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_create_context, __pyx_t_2) < 0) __PYX_ERR(0, 3460, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3464
 * 
 *     @staticmethod
 *     def destroy_context(ctx: object):             # <<<<<<<<<<<<<<
 *         CGL_widgets_context_destory(<CGL_widgets_context*>ctx)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_5destroy_context, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_destroy_context, __pyx_t_2) < 0) __PYX_ERR(0, 3464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3463
 *         return <object>CGL_widgets_context_create(max_vertices, max_indices)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def destroy_context(ctx: object):
 *         CGL_widgets_context_destory(<CGL_widgets_context*>ctx)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_destroy_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3464, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_destroy_context, __pyx_t_1) < 0) __PYX_ERR(0, 3464, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3468
 * 
 *     @staticmethod
 *     def get_current_context() -> object:             # <<<<<<<<<<<<<<
 *         # NOTE: this is a type in the original C code,
 *         #       not some kind of a bug here
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_7get_current_context, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_get_current_context, __pyx_t_1) < 0) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3467
 *         CGL_widgets_context_destory(<CGL_widgets_context*>ctx)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def get_current_context() -> object:
 *         # NOTE: this is a type in the original C code,
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_get_current_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3467, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_get_current_context, __pyx_t_2) < 0) __PYX_ERR(0, 3468, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3475
 * 
 *     @staticmethod
 *     def set_current_context(ctx: object):             # <<<<<<<<<<<<<<
 *         # NOTE: this is a type in the original C code,
 *         #       not some kind of a bug here
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_9set_current_context, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_current_context, __pyx_t_2) < 0) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3474
 *         return <object>CGL_window_get_current_context()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_current_context(ctx: object):
 *         # NOTE: this is a type in the original C code,
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_current_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3474, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_current_context, __pyx_t_1) < 0) __PYX_ERR(0, 3475, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3482
 * 
 *     @staticmethod
 *     def init():             # <<<<<<<<<<<<<<
 *         CGL_widgets_init()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_11init, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 3482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3481
 *         CGL_window_set_current_context(<CGL_widgets_context*>ctx)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def init():
 *         CGL_widgets_init()
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3481, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 3482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3486
 * 
 *     @staticmethod
 *     def shutdown():             # <<<<<<<<<<<<<<
 *         CGL_widgets_shutdown()
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_13shutdown, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_shutdown, __pyx_t_2) < 0) __PYX_ERR(0, 3486, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3485
 *         CGL_widgets_init()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def shutdown():
 *         CGL_widgets_shutdown()
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3486, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3485, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_shutdown, __pyx_t_1) < 0) __PYX_ERR(0, 3486, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3490
 * 
 *     @staticmethod
 *     def begin():             # <<<<<<<<<<<<<<
 *         CGL_widgets_begin()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_15begin, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_begin, __pyx_t_1) < 0) __PYX_ERR(0, 3490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3489
 *         CGL_widgets_shutdown()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def begin():
 *         CGL_widgets_begin()
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_begin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3490, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_begin, __pyx_t_2) < 0) __PYX_ERR(0, 3490, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3494
 * 
 *     @staticmethod
 *     def begin_int(scale_x: float, scale_y: float, offset_x: float, offset_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_begin_int(scale_x, scale_y, offset_x, offset_y)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_17begin_int, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_begin_int, __pyx_t_2) < 0) __PYX_ERR(0, 3494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3493
 *         CGL_widgets_begin()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def begin_int(scale_x: float, scale_y: float, offset_x: float, offset_y: float):
 *         CGL_widgets_begin_int(scale_x, scale_y, offset_x, offset_y)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_begin_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3494, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_begin_int, __pyx_t_1) < 0) __PYX_ERR(0, 3494, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3498
 * 
 *     @staticmethod
 *     def end():             # <<<<<<<<<<<<<<
 *         CGL_widgets_end()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_19end, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_end, __pyx_t_1) < 0) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3497
 *         CGL_widgets_begin_int(scale_x, scale_y, offset_x, offset_y)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def end():
 *         CGL_widgets_end()
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_end, __pyx_t_2) < 0) __PYX_ERR(0, 3498, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3502
 * 
 *     @staticmethod
 *     def flush():             # <<<<<<<<<<<<<<
 *         CGL_widgets_flush()
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_21flush, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_flush, __pyx_t_2) < 0) __PYX_ERR(0, 3502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3501
 *         CGL_widgets_end()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def flush():
 *         CGL_widgets_flush()
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_flush); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_flush, __pyx_t_1) < 0) __PYX_ERR(0, 3502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3506
 * 
 *     @staticmethod
 *     def flush_if_required():             # <<<<<<<<<<<<<<
 *         CGL_widgets_flush_if_required()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_23flush_if_required, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_flush_if_required, __pyx_t_1) < 0) __PYX_ERR(0, 3506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3505
 *         CGL_widgets_flush()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def flush_if_required():
 *         CGL_widgets_flush_if_required()
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_flush_if_required); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3505, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_flush_if_required, __pyx_t_2) < 0) __PYX_ERR(0, 3506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3510
 * 
 *     @staticmethod
 *     def add_vertex(v: mesh_vertex):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex(&v.c_vertex)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_25add_vertex, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex, __pyx_t_2) < 0) __PYX_ERR(0, 3510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3509
 *         CGL_widgets_flush_if_required()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_vertex(v: mesh_vertex):
 *         CGL_widgets_add_vertex(&v.c_vertex)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_vertex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex, __pyx_t_1) < 0) __PYX_ERR(0, 3510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3514
 * 
 *     @staticmethod
 *     def add_mesh(m: mesh_cpu):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_mesh(m.c_mesh)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_27add_mesh, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_mesh, __pyx_t_1) < 0) __PYX_ERR(0, 3514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3513
 *         CGL_widgets_add_vertex(&v.c_vertex)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_mesh(m: mesh_cpu):
 *         CGL_widgets_add_mesh(m.c_mesh)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_mesh); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_mesh, __pyx_t_2) < 0) __PYX_ERR(0, 3514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3518
 * 
 *     @staticmethod
 *     def add_vertex_p(v: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p(v.c_vec3)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_29add_vertex_p, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_p, __pyx_t_2) < 0) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3517
 *         CGL_widgets_add_mesh(m.c_mesh)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_vertex_p(v: vec3):
 *         CGL_widgets_add_vertex_p(v.c_vec3)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_vertex_p); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3517, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_p, __pyx_t_1) < 0) __PYX_ERR(0, 3518, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3522
 * 
 *     @staticmethod
 *     def add_vertex_p3f(x: float, y: float, z: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3f(x, y, z)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_31add_vertex_p3f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_p3f, __pyx_t_1) < 0) __PYX_ERR(0, 3522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3521
 *         CGL_widgets_add_vertex_p(v.c_vec3)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_vertex_p3f(x: float, y: float, z: float):
 *         CGL_widgets_add_vertex_p3f(x, y, z)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_vertex_p3f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3522, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_p3f, __pyx_t_2) < 0) __PYX_ERR(0, 3522, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3526
 * 
 *     @staticmethod
 *     def add_vertex_pt(v: vec3, t: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_pt(v.c_vec3, t.c_vec2)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_33add_vertex_pt, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_pt, __pyx_t_2) < 0) __PYX_ERR(0, 3526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3525
 *         CGL_widgets_add_vertex_p3f(x, y, z)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_vertex_pt(v: vec3, t: vec2):
 *         CGL_widgets_add_vertex_pt(v.c_vec3, t.c_vec2)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_vertex_pt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3525, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_pt, __pyx_t_1) < 0) __PYX_ERR(0, 3526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3530
 * 
 *     @staticmethod
 *     def add_vertex_p3ft(x: float, y: float, z: float, t: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3ft(x, y, z, t.c_vec2)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_35add_vertex_p3ft, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_p3ft, __pyx_t_1) < 0) __PYX_ERR(0, 3530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3529
 *         CGL_widgets_add_vertex_pt(v.c_vec3, t.c_vec2)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_vertex_p3ft(x: float, y: float, z: float, t: vec2):
 *         CGL_widgets_add_vertex_p3ft(x, y, z, t.c_vec2)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_vertex_p3ft); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3529, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_p3ft, __pyx_t_2) < 0) __PYX_ERR(0, 3530, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3534
 * 
 *     @staticmethod
 *     def add_vertex_pt2f(v: vec3, t0: float, t1: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_pt2f(v.c_vec3, t0, t1)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_37add_vertex_pt2f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_pt2f, __pyx_t_2) < 0) __PYX_ERR(0, 3534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3533
 *         CGL_widgets_add_vertex_p3ft(x, y, z, t.c_vec2)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_vertex_pt2f(v: vec3, t0: float, t1: float):
 *         CGL_widgets_add_vertex_pt2f(v.c_vec3, t0, t1)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_vertex_pt2f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3534, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_pt2f, __pyx_t_1) < 0) __PYX_ERR(0, 3534, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3538
 * 
 *     @staticmethod
 *     def add_vertex_p3ft2f(x: float, y: float, z: float, u: float, v: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_vertex_p3ft2f(x, y, z, u, v)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_39add_vertex_p3ft2f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_p3ft2f, __pyx_t_1) < 0) __PYX_ERR(0, 3538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3537
 *         CGL_widgets_add_vertex_pt2f(v.c_vec3, t0, t1)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_vertex_p3ft2f(x: float, y: float, z: float, u: float, v: float):
 *         CGL_widgets_add_vertex_p3ft2f(x, y, z, u, v)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_vertex_p3ft2f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3538, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3537, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_vertex_p3ft2f, __pyx_t_2) < 0) __PYX_ERR(0, 3538, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3542
 * 
 *     @staticmethod
 *     def set_stroke_color(c: vec4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_color(c.c_vec4)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_41set_stroke_color, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_stroke_color, __pyx_t_2) < 0) __PYX_ERR(0, 3542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3541
 *         CGL_widgets_add_vertex_p3ft2f(x, y, z, u, v)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_stroke_color(c: vec4):
 *         CGL_widgets_set_stroke_color(c.c_vec4)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_stroke_color); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3542, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_stroke_color, __pyx_t_1) < 0) __PYX_ERR(0, 3542, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3546
 * 
 *     @staticmethod
 *     def set_stroke_colorf(r: float, g: float, b: float, a: float = 1.0):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_colorf(r, g, b, a)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_43set_stroke_colorf, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_stroke_colorf, __pyx_t_1) < 0) __PYX_ERR(0, 3546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3545
 *         CGL_widgets_set_stroke_color(c.c_vec4)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_stroke_colorf(r: float, g: float, b: float, a: float = 1.0):
 *         CGL_widgets_set_stroke_colorf(r, g, b, a)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_stroke_colorf); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3546, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_stroke_colorf, __pyx_t_2) < 0) __PYX_ERR(0, 3546, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3550
 * 
 *     @staticmethod
 *     def set_stroke_thickness(t: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_stroke_thicnkess(t)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_45set_stroke_thickness, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_stroke_thickness, __pyx_t_2) < 0) __PYX_ERR(0, 3550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3549
 *         CGL_widgets_set_stroke_colorf(r, g, b, a)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_stroke_thickness(t: float):
 *         CGL_widgets_set_stroke_thicnkess(t)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_stroke_thickness); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3549, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_stroke_thickness, __pyx_t_1) < 0) __PYX_ERR(0, 3550, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3554
 * 
 *     @staticmethod
 *     def set_fill_color(c: vec4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_color(c.c_vec4)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_47set_fill_color, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_fill_color, __pyx_t_1) < 0) __PYX_ERR(0, 3554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3553
 *         CGL_widgets_set_stroke_thicnkess(t)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_fill_color(c: vec4):
 *         CGL_widgets_set_fill_color(c.c_vec4)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_fill_color); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_fill_color, __pyx_t_2) < 0) __PYX_ERR(0, 3554, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3558
 * 
 *     @staticmethod
 *     def set_fill_colorf(r: float, g: float, b: float, a: float = 1.0):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_colorf(r, g, b, a)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_49set_fill_colorf, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_fill_colorf, __pyx_t_2) < 0) __PYX_ERR(0, 3558, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3557
 *         CGL_widgets_set_fill_color(c.c_vec4)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_fill_colorf(r: float, g: float, b: float, a: float = 1.0):
 *         CGL_widgets_set_fill_colorf(r, g, b, a)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_fill_colorf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3557, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_fill_colorf, __pyx_t_1) < 0) __PYX_ERR(0, 3558, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3562
 * 
 *     @staticmethod
 *     def set_fill_mode(enebled: bool):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_fill_mode(enebled)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_51set_fill_mode, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_fill_mode, __pyx_t_1) < 0) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3561
 *         CGL_widgets_set_fill_colorf(r, g, b, a)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_fill_mode(enebled: bool):
 *         CGL_widgets_set_fill_mode(enebled)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_fill_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_fill_mode, __pyx_t_2) < 0) __PYX_ERR(0, 3562, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3566
 * 
 *     @staticmethod
 *     def set_projection_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_projection_matrix(&m.c_mat4)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_53set_projection_matrix, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_projection_matrix, __pyx_t_2) < 0) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3565
 *         CGL_widgets_set_fill_mode(enebled)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_projection_matrix(m: mat4):
 *         CGL_widgets_set_projection_matrix(&m.c_mat4)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_projection_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_projection_matrix, __pyx_t_1) < 0) __PYX_ERR(0, 3566, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3570
 * 
 *     @staticmethod
 *     def enable_diffuse_shading(light_pos: vec3, light_color: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_enable_diffuse_shading(light_pos.c_vec3, light_color.c_vec3)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_55enable_diffuse_shading, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_enable_diffuse_shading, __pyx_t_1) < 0) __PYX_ERR(0, 3570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3569
 *         CGL_widgets_set_projection_matrix(&m.c_mat4)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def enable_diffuse_shading(light_pos: vec3, light_color: vec3):
 *         CGL_widgets_enable_diffuse_shading(light_pos.c_vec3, light_color.c_vec3)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_enable_diffuse_shading); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3570, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3569, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_enable_diffuse_shading, __pyx_t_2) < 0) __PYX_ERR(0, 3570, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3574
 * 
 *     @staticmethod
 *     def disable_diffuse_shading():             # <<<<<<<<<<<<<<
 *         CGL_widgets_disable_diffuse_shading()
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_57disable_diffuse_shading, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_disable_diffuse_shading, __pyx_t_2) < 0) __PYX_ERR(0, 3574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3573
 *         CGL_widgets_enable_diffuse_shading(light_pos.c_vec3, light_color.c_vec3)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def disable_diffuse_shading():
 *         CGL_widgets_disable_diffuse_shading()
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_disable_diffuse_shading); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_disable_diffuse_shading, __pyx_t_1) < 0) __PYX_ERR(0, 3574, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3578
 * 
 *     @staticmethod
 *     def set_view_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_view_matrix(&m.c_mat4)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_59set_view_matrix, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_view_matrix, __pyx_t_1) < 0) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3577
 *         CGL_widgets_disable_diffuse_shading()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_view_matrix(m: mat4):
 *         CGL_widgets_set_view_matrix(&m.c_mat4)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_view_matrix); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3577, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_view_matrix, __pyx_t_2) < 0) __PYX_ERR(0, 3578, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3582
 * 
 *     @staticmethod
 *     def set_model_matrix(m: mat4):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_model_matrix(&m.c_mat4)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_61set_model_matrix, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_model_matrix, __pyx_t_2) < 0) __PYX_ERR(0, 3582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3581
 *         CGL_widgets_set_view_matrix(&m.c_mat4)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_model_matrix(m: mat4):
 *         CGL_widgets_set_model_matrix(&m.c_mat4)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_model_matrix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_model_matrix, __pyx_t_1) < 0) __PYX_ERR(0, 3582, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3586
 * 
 *     @staticmethod
 *     def set_texture(tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_texture(tex.c_texture)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_63set_texture, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_texture, __pyx_t_1) < 0) __PYX_ERR(0, 3586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3585
 *         CGL_widgets_set_model_matrix(&m.c_mat4)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_texture(tex: texture):
 *         CGL_widgets_set_texture(tex.c_texture)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_texture); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3586, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_texture, __pyx_t_2) < 0) __PYX_ERR(0, 3586, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3590
 * 
 *     @staticmethod
 *     def set_font_texture(tex: texture):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_font_texture(tex.c_texture)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_65set_font_texture, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_font_texture, __pyx_t_2) < 0) __PYX_ERR(0, 3590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3589
 *         CGL_widgets_set_texture(tex.c_texture)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_font_texture(tex: texture):
 *         CGL_widgets_set_font_texture(tex.c_texture)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_font_texture); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3589, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_font_texture, __pyx_t_1) < 0) __PYX_ERR(0, 3590, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3594
 * 
 *     @staticmethod
 *     def set_texture_coordinate_so(scale_x: float, scale_y: float, offset_x: float, offset_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_set_texture_coordinate_so(scale_x, scale_y, offset_x, offset_y)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_67set_texture_coordinate_so, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_texture_coordinate_so, __pyx_t_1) < 0) __PYX_ERR(0, 3594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3593
 *         CGL_widgets_set_font_texture(tex.c_texture)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def set_texture_coordinate_so(scale_x: float, scale_y: float, offset_x: float, offset_y: float):
 *         CGL_widgets_set_texture_coordinate_so(scale_x, scale_y, offset_x, offset_y)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_set_texture_coordinate_so); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3594, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3593, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_set_texture_coordinate_so, __pyx_t_2) < 0) __PYX_ERR(0, 3594, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3598
 * 
 *     @staticmethod
 *     def apply_transformations_on_cpu():             # <<<<<<<<<<<<<<
 *         CGL_widgets_apply_transformations_on_cpu()
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_69apply_transformations_on_cpu, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_apply_transformations_on_cpu, __pyx_t_2) < 0) __PYX_ERR(0, 3598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3597
 *         CGL_widgets_set_texture_coordinate_so(scale_x, scale_y, offset_x, offset_y)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def apply_transformations_on_cpu():
 *         CGL_widgets_apply_transformations_on_cpu()
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_apply_transformations_on_cpu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_apply_transformations_on_cpu, __pyx_t_1) < 0) __PYX_ERR(0, 3598, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3602
 * 
 *     @staticmethod
 *     def apply_transformations_on_gpu():             # <<<<<<<<<<<<<<
 *         CGL_widgets_apply_transformations_on_gpu()
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_71apply_transformations_on_gpu, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_apply_transformations_on_gpu, __pyx_t_1) < 0) __PYX_ERR(0, 3602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3601
 *         CGL_widgets_apply_transformations_on_cpu()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def apply_transformations_on_gpu():
 *         CGL_widgets_apply_transformations_on_gpu()
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_apply_transformations_on_gpu); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3602, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3601, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_apply_transformations_on_gpu, __pyx_t_2) < 0) __PYX_ERR(0, 3602, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3606
 * 
 *     @staticmethod
 *     def add_triangle(a: vec3, b: vec3, c: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_73add_triangle, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_triangle, __pyx_t_2) < 0) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3605
 *         CGL_widgets_apply_transformations_on_gpu()
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_triangle(a: vec3, b: vec3, c: vec3):
 *         CGL_widgets_add_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_triangle); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3605, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_triangle, __pyx_t_1) < 0) __PYX_ERR(0, 3606, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3610
 * 
 *     @staticmethod
 *     def add_quad(a: vec3, b: vec3, c: vec3, d: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_75add_quad, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_quad, __pyx_t_1) < 0) __PYX_ERR(0, 3610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3609
 *         CGL_widgets_add_triangle(a.c_vec3, b.c_vec3, c.c_vec3)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_quad(a: vec3, b: vec3, c: vec3, d: vec3):
 *         CGL_widgets_add_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_quad); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3610, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3609, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_quad, __pyx_t_2) < 0) __PYX_ERR(0, 3610, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3614
 * 
 *     @staticmethod
 *     def add_quad_8f(a_x: float, a_y: float, b_x: float, b_y: float, c_x: float, c_y: float, d_x: float, d_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_quad_8f(a_x, a_y, b_x, b_y, c_x, c_y, d_x, d_y)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_77add_quad_8f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_quad_8f, __pyx_t_2) < 0) __PYX_ERR(0, 3614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3613
 *         CGL_widgets_add_quad(a.c_vec3, b.c_vec3, c.c_vec3, d.c_vec3)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_quad_8f(a_x: float, a_y: float, b_x: float, b_y: float, c_x: float, c_y: float, d_x: float, d_y: float):
 *         CGL_widgets_add_quad_8f(a_x, a_y, b_x, b_y, c_x, c_y, d_x, d_y)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_quad_8f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3614, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3613, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_quad_8f, __pyx_t_1) < 0) __PYX_ERR(0, 3614, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3618
 * 
 *     @staticmethod
 *     def add_line(start: vec3, end: vec3):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_line(start.c_vec3, end.c_vec3)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_79add_line, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_line, __pyx_t_1) < 0) __PYX_ERR(0, 3618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3617
 *         CGL_widgets_add_quad_8f(a_x, a_y, b_x, b_y, c_x, c_y, d_x, d_y)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_line(start: vec3, end: vec3):
 *         CGL_widgets_add_line(start.c_vec3, end.c_vec3)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_line); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3618, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3617, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_line, __pyx_t_2) < 0) __PYX_ERR(0, 3618, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3622
 * 
 *     @staticmethod
 *     def add_line2f(start_x: float, start_y: float, end_x: float, end_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_line2f(start_x, start_y, end_x, end_y)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_81add_line2f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_line2f, __pyx_t_2) < 0) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3621
 *         CGL_widgets_add_line(start.c_vec3, end.c_vec3)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_line2f(start_x: float, start_y: float, end_x: float, end_y: float):
 *         CGL_widgets_add_line2f(start_x, start_y, end_x, end_y)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_line2f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3621, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_line2f, __pyx_t_1) < 0) __PYX_ERR(0, 3622, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3626
 * 
 *     @staticmethod
 *     def add_rect(start: vec3, size: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_rect(start.c_vec3, size.c_vec2)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_83add_rect, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_rect, __pyx_t_1) < 0) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3625
 *         CGL_widgets_add_line2f(start_x, start_y, end_x, end_y)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_rect(start: vec3, size: vec2):
 *         CGL_widgets_add_rect(start.c_vec3, size.c_vec2)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_rect); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3625, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_rect, __pyx_t_2) < 0) __PYX_ERR(0, 3626, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3630
 * 
 *     @staticmethod
 *     def add_rect2f(start_x: float, start_y: float, size_x: float, size_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_rect2f(start_x, start_y, size_x, size_y)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_85add_rect2f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_rect2f, __pyx_t_2) < 0) __PYX_ERR(0, 3630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3629
 *         CGL_widgets_add_rect(start.c_vec3, size.c_vec2)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_rect2f(start_x: float, start_y: float, size_x: float, size_y: float):
 *         CGL_widgets_add_rect2f(start_x, start_y, size_x, size_y)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_rect2f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3630, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3629, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_rect2f, __pyx_t_1) < 0) __PYX_ERR(0, 3630, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3634
 * 
 *     @staticmethod
 *     def add_circle(position: vec3, radius: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle(position.c_vec3, radius)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_87add_circle, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_circle, __pyx_t_1) < 0) __PYX_ERR(0, 3634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3633
 *         CGL_widgets_add_rect2f(start_x, start_y, size_x, size_y)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_circle(position: vec3, radius: float):
 *         CGL_widgets_add_circle(position.c_vec3, radius)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_circle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_circle, __pyx_t_2) < 0) __PYX_ERR(0, 3634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3638
 * 
 *     @staticmethod
 *     def add_circle2f(position_x: float, position_y: float, radius: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle2f(position_x, position_y, radius)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_89add_circle2f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_circle2f, __pyx_t_2) < 0) __PYX_ERR(0, 3638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3637
 *         CGL_widgets_add_circle(position.c_vec3, radius)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_circle2f(position_x: float, position_y: float, radius: float):
 *         CGL_widgets_add_circle2f(position_x, position_y, radius)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_circle2f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_circle2f, __pyx_t_1) < 0) __PYX_ERR(0, 3638, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3642
 * 
 *     @staticmethod
 *     def add_circler(position: vec3, radius: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circler(position.c_vec3, radius, segments)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_91add_circler, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_circler, __pyx_t_1) < 0) __PYX_ERR(0, 3642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3641
 *         CGL_widgets_add_circle2f(position_x, position_y, radius)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_circler(position: vec3, radius: float, segments: int):
 *         CGL_widgets_add_circler(position.c_vec3, radius, segments)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_circler); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_circler, __pyx_t_2) < 0) __PYX_ERR(0, 3642, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3646
 * 
 *     @staticmethod
 *     def add_circler2fr(position_x: float, position_y: float, radius: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_circle2fr(position_x, position_y, radius, segments)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_93add_circler2fr, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_circler2fr, __pyx_t_2) < 0) __PYX_ERR(0, 3646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3645
 *         CGL_widgets_add_circler(position.c_vec3, radius, segments)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_circler2fr(position_x: float, position_y: float, radius: float, segments: int):
 *         CGL_widgets_add_circle2fr(position_x, position_y, radius, segments)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_circler2fr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3645, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_circler2fr, __pyx_t_1) < 0) __PYX_ERR(0, 3646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3650
 * 
 *     @staticmethod
 *     def add_oval(position: vec3, radius: vec2):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_oval(position.c_vec3, radius.c_vec2)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_95add_oval, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_oval, __pyx_t_1) < 0) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3649
 *         CGL_widgets_add_circle2fr(position_x, position_y, radius, segments)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_oval(position: vec3, radius: vec2):
 *         CGL_widgets_add_oval(position.c_vec3, radius.c_vec2)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_oval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_oval, __pyx_t_2) < 0) __PYX_ERR(0, 3650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3654
 * 
 *     @staticmethod
 *     def add_oval2f(position_x: float, position_y: float, radius_x: float, radius_y: float):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_oval2f(position_x, position_y, radius_x, radius_y)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_97add_oval2f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_oval2f, __pyx_t_2) < 0) __PYX_ERR(0, 3654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3653
 *         CGL_widgets_add_oval(position.c_vec3, radius.c_vec2)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_oval2f(position_x: float, position_y: float, radius_x: float, radius_y: float):
 *         CGL_widgets_add_oval2f(position_x, position_y, radius_x, radius_y)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_oval2f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_oval2f, __pyx_t_1) < 0) __PYX_ERR(0, 3654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3658
 * 
 *     @staticmethod
 *     def add_arc2f(position_x: float, position_y: float, radius: float, start_angle: float, end_angle: float, segments: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_arc2f(position_x, position_y, radius, start_angle, end_angle, segments)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_99add_arc2f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_arc2f, __pyx_t_1) < 0) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3657
 *         CGL_widgets_add_oval2f(position_x, position_y, radius_x, radius_y)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_arc2f(position_x: float, position_y: float, radius: float, start_angle: float, end_angle: float, segments: int):
 *         CGL_widgets_add_arc2f(position_x, position_y, radius, start_angle, end_angle, segments)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_arc2f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_arc2f, __pyx_t_2) < 0) __PYX_ERR(0, 3658, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3662
 * 
 *     @staticmethod
 *     def add_character(ch: str, x: float, y: float, sx: float, sy: float) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_character(ch[0], x, y, sx, sy)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_101add_character, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_character, __pyx_t_2) < 0) __PYX_ERR(0, 3662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3661
 *         CGL_widgets_add_arc2f(position_x, position_y, radius, start_angle, end_angle, segments)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_character(ch: str, x: float, y: float, sx: float, sy: float) -> bool:
 *         return CGL_widgets_add_character(ch[0], x, y, sx, sy)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_character); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3662, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_character, __pyx_t_1) < 0) __PYX_ERR(0, 3662, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3666
 * 
 *     @staticmethod
 *     def add_string(st: str, x: float, y: float, sx: float, sy: float) -> bool:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_string(st.encode('utf-8'), x, y, sx, sy)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_103add_string, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_string, __pyx_t_1) < 0) __PYX_ERR(0, 3666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3665
 *         return CGL_widgets_add_character(ch[0], x, y, sx, sy)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_string(st: str, x: float, y: float, sx: float, sy: float) -> bool:
 *         return CGL_widgets_add_string(st.encode('utf-8'), x, y, sx, sy)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3666, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3665, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_string, __pyx_t_2) < 0) __PYX_ERR(0, 3666, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3670
 * 
 *     @staticmethod
 *     def add_cubic_bazier(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_105add_cubic_bazier, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier, __pyx_t_2) < 0) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3669
 *         return CGL_widgets_add_string(st.encode('utf-8'), x, y, sx, sy)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_cubic_bazier(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):
 *         CGL_widgets_add_cubic_bazier(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_cubic_bazier); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier, __pyx_t_1) < 0) __PYX_ERR(0, 3670, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3674
 * 
 *     @staticmethod
 *     def add_cubic_bazier2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_107add_cubic_bazier2v, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier2v, __pyx_t_1) < 0) __PYX_ERR(0, 3674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3673
 *         CGL_widgets_add_cubic_bazier(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_cubic_bazier2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):
 *         CGL_widgets_add_cubic_bazier2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_cubic_bazier2v); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3674, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3673, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier2v, __pyx_t_2) < 0) __PYX_ERR(0, 3674, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3678
 * 
 *     @staticmethod
 *     def add_cubic_bazier2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_109add_cubic_bazier2f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier2f, __pyx_t_2) < 0) __PYX_ERR(0, 3678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3677
 *         CGL_widgets_add_cubic_bazier2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_cubic_bazier2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):
 *         CGL_widgets_add_cubic_bazier2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_cubic_bazier2f); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3678, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3677, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier2f, __pyx_t_1) < 0) __PYX_ERR(0, 3678, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3682
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_111add_cubic_bazier_points, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier_points, __pyx_t_1) < 0) __PYX_ERR(0, 3682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3681
 *         CGL_widgets_add_cubic_bazier2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_cubic_bazier_points(start: vec3, end: vec3, control_1: vec3, control_2: vec3, res: int):
 *         CGL_widgets_add_cubic_bazier_points(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_cubic_bazier_points); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3682, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3681, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier_points, __pyx_t_2) < 0) __PYX_ERR(0, 3682, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3686
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_113add_cubic_bazier_points2v, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier_points2v, __pyx_t_2) < 0) __PYX_ERR(0, 3686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3685
 *         CGL_widgets_add_cubic_bazier_points(start.c_vec3, end.c_vec3, control_1.c_vec3, control_2.c_vec3, res)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_cubic_bazier_points2v(start: vec2, end: vec2, control_1: vec2, control_2: vec2, res: int):
 *         CGL_widgets_add_cubic_bazier_points2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_cubic_bazier_points2v); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3686, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3685, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier_points2v, __pyx_t_1) < 0) __PYX_ERR(0, 3686, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3690
 * 
 *     @staticmethod
 *     def add_cubic_bazier_points2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_cubic_bazier_points2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_115add_cubic_bazier_points2f, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier_points2f, __pyx_t_1) < 0) __PYX_ERR(0, 3690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3689
 *         CGL_widgets_add_cubic_bazier_points2v(start.c_vec2, end.c_vec2, control_1.c_vec2, control_2.c_vec2, res)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_cubic_bazier_points2f(start_x: float, start_y: float, end_x: float, end_y: float, control_1_x: float, control_1_y: float, control_2_x: float, control_2_y: float, res: int):
 *         CGL_widgets_add_cubic_bazier_points2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_cubic_bazier_points2f); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_cubic_bazier_points2f, __pyx_t_2) < 0) __PYX_ERR(0, 3690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3694
 * 
 *     @staticmethod
 *     def add_shape_out_line(shape: shape):             # <<<<<<<<<<<<<<
 *         CGL_widgets_add_shape_out_line(&shape.c_shape)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_117add_shape_out_line, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_shape_out_line, __pyx_t_2) < 0) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3693
 *         CGL_widgets_add_cubic_bazier_points2f(start_x, start_y, end_x, end_y, control_1_x, control_1_y, control_2_x, control_2_y, res)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_shape_out_line(shape: shape):
 *         CGL_widgets_add_shape_out_line(&shape.c_shape)
 */
  __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_shape_out_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3693, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_shape_out_line, __pyx_t_1) < 0) __PYX_ERR(0, 3694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3698
 * 
 *     @staticmethod
 *     def add_string_with_font(st: str, font: font, x: float, y: float, sx: float, scale_y: float) -> float:             # <<<<<<<<<<<<<<
 *         return CGL_widgets_add_string_with_font(st.encode('utf-8'), font.c_font, x, y, sx, scale_y)
 * 
 */
  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_3cgl_7widgets_119add_string_with_font, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_string_with_font, __pyx_t_1) < 0) __PYX_ERR(0, 3698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3697
 *         CGL_widgets_add_shape_out_line(&shape.c_shape)
 * 
 *     @staticmethod             # <<<<<<<<<<<<<<
 *     def add_string_with_font(st: str, font: font, x: float, y: float, sx: float, scale_y: float) -> float:
 *         return CGL_widgets_add_string_with_font(st.encode('utf-8'), font.c_font, x, y, sx, scale_y)
 */
  __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_3cgl_widgets, __pyx_n_s_add_string_with_font); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3698, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_staticmethod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3697, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem((PyObject *)__pyx_ptype_3cgl_widgets->tp_dict, __pyx_n_s_add_string_with_font, __pyx_t_2) < 0) __PYX_ERR(0, 3698, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  PyType_Modified(__pyx_ptype_3cgl_widgets);

  /* "cgl_wrapper.pyx":3701
 *         return CGL_widgets_add_string_with_font(st.encode('utf-8'), font.c_font, x, y, sx, scale_y)
 * 
 * NOISE_TYPE_PERLIN        = 0             # <<<<<<<<<<<<<<
 * NOISE_TYPE_OPENSIMPLEX   = 1
 * NOISE_TYPE_OPENSIMPLEX2S = 2
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_TYPE_PERLIN, __pyx_int_0) < 0) __PYX_ERR(0, 3701, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3702
 * 
 * NOISE_TYPE_PERLIN        = 0
 * NOISE_TYPE_OPENSIMPLEX   = 1             # <<<<<<<<<<<<<<
 * NOISE_TYPE_OPENSIMPLEX2S = 2
 * NOISE_TYPE_VALUE         = 3
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_TYPE_OPENSIMPLEX, __pyx_int_1) < 0) __PYX_ERR(0, 3702, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3703
 * NOISE_TYPE_PERLIN        = 0
 * NOISE_TYPE_OPENSIMPLEX   = 1
 * NOISE_TYPE_OPENSIMPLEX2S = 2             # <<<<<<<<<<<<<<
 * NOISE_TYPE_VALUE         = 3
 * NOISE_TYPE_VALUECUBIC    = 4
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_TYPE_OPENSIMPLEX2S, __pyx_int_2) < 0) __PYX_ERR(0, 3703, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3704
 * NOISE_TYPE_OPENSIMPLEX   = 1
 * NOISE_TYPE_OPENSIMPLEX2S = 2
 * NOISE_TYPE_VALUE         = 3             # <<<<<<<<<<<<<<
 * NOISE_TYPE_VALUECUBIC    = 4
 * NOISE_TYPE_WORLEY        = 5
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_TYPE_VALUE, __pyx_int_3) < 0) __PYX_ERR(0, 3704, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3705
 * NOISE_TYPE_OPENSIMPLEX2S = 2
 * NOISE_TYPE_VALUE         = 3
 * NOISE_TYPE_VALUECUBIC    = 4             # <<<<<<<<<<<<<<
 * NOISE_TYPE_WORLEY        = 5
 * NOISE_TYPE_COUNT         = 6
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_TYPE_VALUECUBIC, __pyx_int_4) < 0) __PYX_ERR(0, 3705, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3706
 * NOISE_TYPE_VALUE         = 3
 * NOISE_TYPE_VALUECUBIC    = 4
 * NOISE_TYPE_WORLEY        = 5             # <<<<<<<<<<<<<<
 * NOISE_TYPE_COUNT         = 6
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_TYPE_WORLEY, __pyx_int_5) < 0) __PYX_ERR(0, 3706, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3707
 * NOISE_TYPE_VALUECUBIC    = 4
 * NOISE_TYPE_WORLEY        = 5
 * NOISE_TYPE_COUNT         = 6             # <<<<<<<<<<<<<<
 * 
 * NOISE_FRACTAL_TYPE_NONE     = 0
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_TYPE_COUNT, __pyx_int_6) < 0) __PYX_ERR(0, 3707, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3709
 * NOISE_TYPE_COUNT         = 6
 * 
 * NOISE_FRACTAL_TYPE_NONE     = 0             # <<<<<<<<<<<<<<
 * NOISE_FRACTAL_TYPE_FBM      = 1
 * NOISE_FRACTAL_TYPE_BILLOW   = 2
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_FRACTAL_TYPE_NONE, __pyx_int_0) < 0) __PYX_ERR(0, 3709, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3710
 * 
 * NOISE_FRACTAL_TYPE_NONE     = 0
 * NOISE_FRACTAL_TYPE_FBM      = 1             # <<<<<<<<<<<<<<
 * NOISE_FRACTAL_TYPE_BILLOW   = 2
 * NOISE_FRACTAL_TYPE_RIGID    = 3
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_FRACTAL_TYPE_FBM, __pyx_int_1) < 0) __PYX_ERR(0, 3710, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3711
 * NOISE_FRACTAL_TYPE_NONE     = 0
 * NOISE_FRACTAL_TYPE_FBM      = 1
 * NOISE_FRACTAL_TYPE_BILLOW   = 2             # <<<<<<<<<<<<<<
 * NOISE_FRACTAL_TYPE_RIGID    = 3
 * NOISE_FRACTAL_TYPE_PINGPONG = 4
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_FRACTAL_TYPE_BILLOW, __pyx_int_2) < 0) __PYX_ERR(0, 3711, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3712
 * NOISE_FRACTAL_TYPE_FBM      = 1
 * NOISE_FRACTAL_TYPE_BILLOW   = 2
 * NOISE_FRACTAL_TYPE_RIGID    = 3             # <<<<<<<<<<<<<<
 * NOISE_FRACTAL_TYPE_PINGPONG = 4
 * NOISE_FRACTAL_TYPE_COUNT    = 5
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_FRACTAL_TYPE_RIGID, __pyx_int_3) < 0) __PYX_ERR(0, 3712, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3713
 * NOISE_FRACTAL_TYPE_BILLOW   = 2
 * NOISE_FRACTAL_TYPE_RIGID    = 3
 * NOISE_FRACTAL_TYPE_PINGPONG = 4             # <<<<<<<<<<<<<<
 * NOISE_FRACTAL_TYPE_COUNT    = 5
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_FRACTAL_TYPE_PINGPONG, __pyx_int_4) < 0) __PYX_ERR(0, 3713, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3714
 * NOISE_FRACTAL_TYPE_RIGID    = 3
 * NOISE_FRACTAL_TYPE_PINGPONG = 4
 * NOISE_FRACTAL_TYPE_COUNT    = 5             # <<<<<<<<<<<<<<
 * 
 * cdef class noise_params:
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_NOISE_FRACTAL_TYPE_COUNT, __pyx_int_5) < 0) __PYX_ERR(0, 3714, __pyx_L1_error)

  /* "cgl_wrapper.pyx":3793
 *         return f"noise_params(type={self.type}, fractal_type={self.fractal_type}, octaves={self.octaves}, lacunarity={self.lacunarity}, gain={self.gain}, frequency={self.frequency}, weighted_strength={self.weighted_strength}, ping_pong_strength={self.ping_pong_strength})"
 * 
 * def noise_init():             # <<<<<<<<<<<<<<
 *     CGL_noise_init()
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_263noise_init, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3793, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_noise_init, __pyx_t_2) < 0) __PYX_ERR(0, 3793, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3796
 *     CGL_noise_init()
 * 
 * def noise_shutdown():             # <<<<<<<<<<<<<<
 *     CGL_noise_shutdown()
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_265noise_shutdown, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3796, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_noise_shutdown, __pyx_t_2) < 0) __PYX_ERR(0, 3796, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3799
 *     CGL_noise_shutdown()
 * 
 * def noise_get(x: float, y: float, z: float, np: noise_params = noise_params() ) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_get(&np.c_noise_params, x, y, z)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_3cgl_noise_params)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_k__85 = ((struct __pyx_obj_3cgl_noise_params *)__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_267noise_get, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_noise_get, __pyx_t_2) < 0) __PYX_ERR(0, 3799, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3802
 *     return CGL_noise_get(&np.c_noise_params, x, y, z)
 * 
 * def noise_perlin(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_perlin(x, y, z)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_269noise_perlin, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3802, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_noise_perlin, __pyx_t_2) < 0) __PYX_ERR(0, 3802, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3805
 *     return CGL_noise_perlin(x, y, z)
 * 
 * def noise_opensimplex(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_opensimplex(x, y, z)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_271noise_opensimplex, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3805, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_noise_opensimplex, __pyx_t_2) < 0) __PYX_ERR(0, 3805, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3808
 *     return CGL_noise_opensimplex(x, y, z)
 * 
 * def noise_opensimplex2s(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_opensimplex2s(x, y, z)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_273noise_opensimplex2s, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3808, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_noise_opensimplex2s, __pyx_t_2) < 0) __PYX_ERR(0, 3808, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3811
 *     return CGL_noise_opensimplex2s(x, y, z)
 * 
 * def noise_value(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_value(x, y, z)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_275noise_value, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_noise_value, __pyx_t_2) < 0) __PYX_ERR(0, 3811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3814
 *     return CGL_noise_value(x, y, z)
 * 
 * def noise_valuecubic(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_valuecubic(x, y, z)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_277noise_valuecubic, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_noise_valuecubic, __pyx_t_2) < 0) __PYX_ERR(0, 3814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":3817
 *     return CGL_noise_valuecubic(x, y, z)
 * 
 * def noise_worley(x: float, y: float, z: float) -> float:             # <<<<<<<<<<<<<<
 *     return CGL_noise_worley(x, y, z)
 * 
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_279noise_worley, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_noise_worley, __pyx_t_2) < 0) __PYX_ERR(0, 3817, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "(tree fragment)":1
 * def __pyx_unpickle_widgets(__pyx_type, long __pyx_checksum, __pyx_state):             # <<<<<<<<<<<<<<
 *     cdef object __pyx_PickleError
 *     cdef object __pyx_result
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_3cgl_281__pyx_unpickle_widgets, NULL, __pyx_n_s_cgl); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_widgets, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "cgl_wrapper.pyx":1
 * from libcpp cimport bool             # <<<<<<<<<<<<<<
 * from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, int8_t, int16_t, int32_t, int64_t, uintptr_t, intptr_t
 * cimport libc.stdlib as stdlib
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "FromPyStructUtility":11
 * 
 * @cname("__pyx_convert__from_py_struct__CGL_mesh_vertex")
 * cdef struct_type __pyx_convert__from_py_struct__CGL_mesh_vertex(obj) except *:             # <<<<<<<<<<<<<<
 *     cdef struct_type result
 *     if not PyMapping_Check(obj):
 */

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init cgl", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_CLEAR(__pyx_m);
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init cgl");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* PyCFunctionFastCall */
#if CYTHON_FAST_PYCCALL
static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
    PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
    PyCFunction meth = PyCFunction_GET_FUNCTION(func);
    PyObject *self = PyCFunction_GET_SELF(func);
    int flags = PyCFunction_GET_FLAGS(func);
    assert(PyCFunction_Check(func));
    assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
    assert(nargs >= 0);
    assert(nargs == 0 || args != NULL);
    /* _PyCFunction_FastCallDict() must not be called with an exception set,
       because it may clear it (directly or indirectly) and so the
       caller loses its exception */
    assert(!PyErr_Occurred());
    if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
        return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
#if 1 || PY_VERSION_HEX < 0x030600B1
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
        return NULL;
    }
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCall2Args */
static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args, *result = NULL;
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyFunction_FastCall(function, args, 2);
    }
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(function)) {
        PyObject *args[2] = {arg1, arg2};
        return __Pyx_PyCFunction_FastCall(function, args, 2);
    }
    #endif
    args = PyTuple_New(2);
    if (unlikely(!args)) goto done;
    Py_INCREF(arg1);
    PyTuple_SET_ITEM(args, 0, arg1);
    Py_INCREF(arg2);
    PyTuple_SET_ITEM(args, 1, arg2);
    Py_INCREF(function);
    result = __Pyx_PyObject_Call(function, args, NULL);
    Py_DECREF(args);
    Py_DECREF(function);
done:
    return result;
}

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallOneArg */
#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, &arg, 1);
    }
#endif
    if (likely(PyCFunction_Check(func))) {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
#if CYTHON_FAST_PYCCALL
        } else if (__Pyx_PyFastCFunction_Check(func)) {
            return __Pyx_PyCFunction_FastCall(func, &arg, 1);
#endif
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

/* UnpackUnboundCMethod */
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    }
#endif
    return 0;
}

/* CallUnboundCMethod0 */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

/* decode_c_string */
static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
         const char* cstring, Py_ssize_t start, Py_ssize_t stop,
         const char* encoding, const char* errors,
         PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
    Py_ssize_t length;
    if (unlikely((start < 0) | (stop < 0))) {
        size_t slen = strlen(cstring);
        if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
            PyErr_SetString(PyExc_OverflowError,
                            "c-string too long to convert to Python");
            return NULL;
        }
        length = (Py_ssize_t) slen;
        if (start < 0) {
            start += length;
            if (start < 0)
                start = 0;
        }
        if (stop < 0)
            stop += length;
    }
    if (unlikely(stop <= start))
        return __Pyx_NewRef(__pyx_empty_unicode);
    length = stop - start;
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* PyObjectCallNoArg */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCall(func, NULL, 0);
    }
#endif
#if defined(__Pyx_CyFunction_USED) && defined(NDEBUG)
    if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
#else
    if (likely(PyCFunction_Check(func)))
#endif
    {
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    __Pyx_PyThreadState_declare
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_DivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    (void)inplace;
    (void)zerodivision_check;
    if (likely(PyFloat_CheckExact(op1))) {
        a = PyFloat_AS_DOUBLE(op1);
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        switch (size) {
            case  0: a = 0.0; break;
            case -1: a = -(double) digits[0]; break;
            case  1: a = (double) digits[0]; break;
            case -2:
            case 2:
                if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                    a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -2)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -3:
            case 3:
                if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -3)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -4:
            case 4:
                if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                    a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -4)
                            a = -a;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            default:
        #else
        {
        #endif
            a = PyLong_AsDouble(op1);
            if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
            
        }
    } else {
        return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
    }
        
        PyFPE_START_PROTECT("divide", return NULL)
        result = a / b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* PyFloatBinop */
  #if !CYTHON_COMPILING_IN_PYPY
#define __Pyx_PyFloat_DivideCObj_ZeroDivisionError(operand) if (unlikely(zerodivision_check && ((operand) == 0))) {\
    PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero");\
    return NULL;\
}
static PyObject* __Pyx_PyFloat_DivideCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double a = floatval;
    double b, result;
    (void)inplace;
    (void)zerodivision_check;
    if (likely(PyFloat_CheckExact(op2))) {
        b = PyFloat_AS_DOUBLE(op2);
        __Pyx_PyFloat_DivideCObj_ZeroDivisionError(b)
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        b = (double) PyInt_AS_LONG(op2);
        __Pyx_PyFloat_DivideCObj_ZeroDivisionError(b)
    } else
    #endif
    if (likely(PyLong_CheckExact(op2))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        const digit* digits = ((PyLongObject*)op2)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op2);
        switch (size) {
            case  0: __Pyx_PyFloat_DivideCObj_ZeroDivisionError(0) break;
            case -1: b = -(double) digits[0]; break;
            case  1: b = (double) digits[0]; break;
            case -2:
            case 2:
                if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                    b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -2)
                            b = -b;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -3:
            case 3:
                if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                    b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -3)
                            b = -b;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            case -4:
            case 4:
                if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                    b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                    if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
                        if (size == -4)
                            b = -b;
                        break;
                    }
                }
                CYTHON_FALLTHROUGH;
            default:
        #else
        {
        #endif
            b = PyLong_AsDouble(op2);
            if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL;
            __Pyx_PyFloat_DivideCObj_ZeroDivisionError(b)
        }
    } else {
        return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2));
    }
        __Pyx_PyFloat_DivideCObj_ZeroDivisionError(b)
        PyFPE_START_PROTECT("divide", return NULL)
        result = a / b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* JoinPyUnicode */
    static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      CYTHON_UNUSED Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind;
    Py_ssize_t i, char_pos;
    void *result_udata;
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely(char_pos + ulength < 0))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind));
        } else {
            #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    result_ulength++;
    value_count++;
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* PyIntCompare */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
    if (op1 == op2) {
        Py_RETURN_TRUE;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = Py_SIZE(op1);
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        if (intval == 0) {
            if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
        } else if (intval < 0) {
            if (size >= 0)
                Py_RETURN_FALSE;
            intval = -intval;
            size = -size;
        } else {
            if (size <= 0)
                Py_RETURN_FALSE;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
        if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
    }
    return (
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* KeywordStringCheck */
    static int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

/* ObjectGetItem */
    #if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
    if (unlikely(!(m && m->sq_item))) {
        PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
        return NULL;
    }
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
    PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
    if (likely(m && m->mp_subscript)) {
        return m->mp_subscript(obj, key);
    }
    return __Pyx_PyObject_GetIndex(obj, key);
}
#endif

/* WriteUnraisableException */
    static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
    __Pyx_PyThreadState_declare
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
    else state = (PyGILState_STATE)0;
#endif
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

/* CallUnboundCMethod1 */
    #if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) {
    if (likely(cfunc->func)) {
        int flag = cfunc->flag;
        if (flag == METH_O) {
            return (*(cfunc->func))(self, arg);
        } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) {
            #if PY_VERSION_HEX >= 0x030700A0
                return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1);
            #else
                return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
            #endif
        } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) {
            return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL);
        }
    }
    return __Pyx__CallUnboundCMethod1(cfunc, self, arg);
}
#endif
static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_COMPILING_IN_CPYTHON
    if (cfunc->func && (cfunc->flag & METH_VARARGS)) {
        args = PyTuple_New(1);
        if (unlikely(!args)) goto bad;
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 0, arg);
        if (cfunc->flag & METH_KEYWORDS)
            result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL);
        else
            result = (*cfunc->func)(self, args);
    } else {
        args = PyTuple_New(2);
        if (unlikely(!args)) goto bad;
        Py_INCREF(self);
        PyTuple_SET_ITEM(args, 0, self);
        Py_INCREF(arg);
        PyTuple_SET_ITEM(args, 1, arg);
        result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    }
#else
    args = PyTuple_Pack(2, self, arg);
    if (unlikely(!args)) goto bad;
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
#endif
bad:
    Py_XDECREF(args);
    return result;
}

/* DictGetItem */
    #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* ExtTypeTest */
    static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(__Pyx_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

/* DivInt[long] */
    static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
    long q = a / b;
    long r = a - q*b;
    q -= ((r != 0) & ((r ^ b) < 0));
    return q;
}

/* PyIntBinop */
    #if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) {
    (void)inplace;
    (void)zerodivision_check;
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
            x = (long)((unsigned long)a + b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        const digit* digits = ((PyLongObject*)op1)->ob_digit;
        const Py_ssize_t size = Py_SIZE(op1);
        if (likely(__Pyx_sst_abs(size) <= 1)) {
            a = likely(size) ? digits[0] : 0;
            if (size == -1) a = -a;
        } else {
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
#ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
#endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
        double a = PyFloat_AS_DOUBLE(op1);
            double result;
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* CIntToDigits */
    static const char DIGIT_PAIRS_10[2*10*10+1] = {
    "00010203040506070809"
    "10111213141516171819"
    "20212223242526272829"
    "30313233343536373839"
    "40414243444546474849"
    "50515253545556575859"
    "60616263646566676869"
    "70717273747576777879"
    "80818283848586878889"
    "90919293949596979899"
};
static const char DIGIT_PAIRS_8[2*8*8+1] = {
    "0001020304050607"
    "1011121314151617"
    "2021222324252627"
    "3031323334353637"
    "4041424344454647"
    "5051525354555657"
    "6061626364656667"
    "7071727374757677"
};
static const char DIGITS_HEX[2*16+1] = {
    "0123456789abcdef"
    "0123456789ABCDEF"
};

/* BuildPyUnicode */
    static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength,
                                                int prepend_sign, char padding_char) {
    PyObject *uval;
    Py_ssize_t uoffset = ulength - clength;
#if CYTHON_USE_UNICODE_INTERNALS
    Py_ssize_t i;
#if CYTHON_PEP393_ENABLED
    void *udata;
    uval = PyUnicode_New(ulength, 127);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_DATA(uval);
#else
    Py_UNICODE *udata;
    uval = PyUnicode_FromUnicode(NULL, ulength);
    if (unlikely(!uval)) return NULL;
    udata = PyUnicode_AS_UNICODE(uval);
#endif
    if (uoffset > 0) {
        i = 0;
        if (prepend_sign) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-');
            i++;
        }
        for (; i < uoffset; i++) {
            __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char);
        }
    }
    for (i=0; i < clength; i++) {
        __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]);
    }
#else
    {
        PyObject *sign = NULL, *padding = NULL;
        uval = NULL;
        if (uoffset > 0) {
            prepend_sign = !!prepend_sign;
            if (uoffset > prepend_sign) {
                padding = PyUnicode_FromOrdinal(padding_char);
                if (likely(padding) && uoffset > prepend_sign + 1) {
                    PyObject *tmp;
                    PyObject *repeat = PyInt_FromSsize_t(uoffset - prepend_sign);
                    if (unlikely(!repeat)) goto done_or_error;
                    tmp = PyNumber_Multiply(padding, repeat);
                    Py_DECREF(repeat);
                    Py_DECREF(padding);
                    padding = tmp;
                }
                if (unlikely(!padding)) goto done_or_error;
            }
            if (prepend_sign) {
                sign = PyUnicode_FromOrdinal('-');
                if (unlikely(!sign)) goto done_or_error;
            }
        }
        uval = PyUnicode_DecodeASCII(chars, clength, NULL);
        if (likely(uval) && padding) {
            PyObject *tmp = PyNumber_Add(padding, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
        if (likely(uval) && sign) {
            PyObject *tmp = PyNumber_Add(sign, uval);
            Py_DECREF(uval);
            uval = tmp;
        }
done_or_error:
        Py_XDECREF(padding);
        Py_XDECREF(sign);
    }
#endif
    return uval;
}

/* CIntToPyUnicode */
    static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) {
    char digits[sizeof(int)*3+2];
    char *dpos, *end = digits + sizeof(int)*3+2;
    const char *hex_digits = DIGITS_HEX;
    Py_ssize_t length, ulength;
    int prepend_sign, last_one_off;
    int remaining;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (format_char == 'X') {
        hex_digits += 16;
        format_char = 'x';
    }
    remaining = value;
    last_one_off = 0;
    dpos = end;
    do {
        int digit_pos;
        switch (format_char) {
        case 'o':
            digit_pos = abs((int)(remaining % (8*8)));
            remaining = (int) (remaining / (8*8));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 8);
            break;
        case 'd':
            digit_pos = abs((int)(remaining % (10*10)));
            remaining = (int) (remaining / (10*10));
            dpos -= 2;
            memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2);
            last_one_off = (digit_pos < 10);
            break;
        case 'x':
            *(--dpos) = hex_digits[abs((int)(remaining % 16))];
            remaining = (int) (remaining / 16);
            break;
        default:
            assert(0);
            break;
        }
    } while (unlikely(remaining != 0));
    if (last_one_off) {
        assert(*dpos == '0');
        dpos++;
    }
    length = end - dpos;
    ulength = length;
    prepend_sign = 0;
    if (!is_unsigned && value <= neg_one) {
        if (padding_char == ' ' || width <= length + 1) {
            *(--dpos) = '-';
            ++length;
        } else {
            prepend_sign = 1;
        }
        ++ulength;
    }
    if (width > ulength) {
        ulength = width;
    }
    if (ulength == 1) {
        return PyUnicode_FromOrdinal(*dpos);
    }
    return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char);
}

/* PyErrExceptionMatches */
    #if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    PyObject *exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
    if (unlikely(PyTuple_Check(err)))
        return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
}
#endif

/* GetAttr */
    static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* GetAttr3 */
    static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    Py_INCREF(d);
    return d;
}
static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
    PyObject *r = __Pyx_GetAttr(o, n);
    return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
}

/* Import */
    static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (!py_import)
        goto bad;
    #endif
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
                module = PyImport_ImportModuleLevelObject(
                    name, global_dict, empty_dict, list, 1);
                if (!module) {
                    if (!PyErr_ExceptionMatches(PyExc_ImportError))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (!py_level)
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, global_dict, empty_dict, list, level);
            #endif
        }
    }
bad:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    Py_XDECREF(empty_list);
    Py_XDECREF(empty_dict);
    return module;
}

/* ImportFrom */
    static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* HasAttr */
    static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
    PyObject *r;
    if (unlikely(!__Pyx_PyBaseString_Check(n))) {
        PyErr_SetString(PyExc_TypeError,
                        "hasattr(): attribute name must be string");
        return -1;
    }
    r = __Pyx_GetAttr(o, n);
    if (unlikely(!r)) {
        PyErr_Clear();
        return 0;
    } else {
        Py_DECREF(r);
        return 1;
    }
}

/* GetTopmostException */
    #if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
    #if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    #endif
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}
#endif

/* GetException */
    #if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* PyObject_GenericGetAttrNoDict */
    #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'%.50s' object has no attribute '%U'",
                 tp->tp_name, attr_name);
#else
                 "'%.50s' object has no attribute '%.400s'",
                 tp->tp_name, PyString_AS_STRING(attr_name));
#endif
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* PyObject_GenericGetAttr */
    #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
    if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
    static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
}

/* SetupReduce */
    static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
  int ret;
  PyObject *name_attr;
  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
  if (likely(name_attr)) {
      ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
  } else {
      ret = -1;
  }
  if (unlikely(ret < 0)) {
      PyErr_Clear();
      ret = 0;
  }
  Py_XDECREF(name_attr);
  return ret;
}
static int __Pyx_setup_reduce(PyObject* type_obj) {
    int ret = 0;
    PyObject *object_reduce = NULL;
    PyObject *object_getstate = NULL;
    PyObject *object_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
    PyObject *getstate = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
#else
    getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
    if (!getstate && PyErr_Occurred()) {
        goto __PYX_BAD;
    }
#endif
    if (getstate) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
#else
        object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
        if (!object_getstate && PyErr_Occurred()) {
            goto __PYX_BAD;
        }
#endif
        if (object_getstate != getstate) {
            goto __PYX_GOOD;
        }
    }
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
    if (reduce_ex == object_reduce_ex) {
#if CYTHON_USE_PYTYPE_LOOKUP
        object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
            if (likely(reduce_cython)) {
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
            } else if (reduce == object_reduce || PyErr_Occurred()) {
                goto __PYX_BAD;
            }
            setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
            if (!setstate) PyErr_Clear();
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
                setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
                if (likely(setstate_cython)) {
                    ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                    ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
                } else if (!setstate || PyErr_Occurred()) {
                    goto __PYX_BAD;
                }
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto __PYX_GOOD;
__PYX_BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
__PYX_GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
    Py_XDECREF(object_getstate);
    Py_XDECREF(getstate);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* SetVTable */
    static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

/* GetNameInClass */
    static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) {
    PyObject *result;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        return NULL;
    __Pyx_PyErr_Clear();
    __Pyx_GetModuleGlobalNameUncached(result, name);
    return result;
}
static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) {
    PyObject *result;
    result = __Pyx_PyObject_GetAttrStr(nmspace, name);
    if (!result) {
        result = __Pyx_GetGlobalNameAfterAttributeLookup(name);
    }
    return result;
}

/* CLineInTraceback */
    #ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
    static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

/* AddTraceback */
    #include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);  // XDECREF since it's only set on Py3 if cline
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

/* CIntFromPyVerify */
    #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

static PyObject* __pyx_convert__to_py_struct__CGL_vec2(struct CGL_vec2 s) {
      PyObject* res;
      PyObject* member;
      res = __Pyx_PyDict_NewPresized(2); if (unlikely(!res)) return NULL;
      member = PyFloat_FromDouble(s.x); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_x, member) < 0)) goto bad;
      Py_DECREF(member);
      member = PyFloat_FromDouble(s.y); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_y, member) < 0)) goto bad;
      Py_DECREF(member);
      return res;
      bad:
      Py_XDECREF(member);
      Py_DECREF(res);
      return NULL;
    }
    static PyObject* __pyx_convert__to_py_struct__CGL_vec3(struct CGL_vec3 s) {
      PyObject* res;
      PyObject* member;
      res = __Pyx_PyDict_NewPresized(3); if (unlikely(!res)) return NULL;
      member = PyFloat_FromDouble(s.x); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_x, member) < 0)) goto bad;
      Py_DECREF(member);
      member = PyFloat_FromDouble(s.y); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_y, member) < 0)) goto bad;
      Py_DECREF(member);
      member = PyFloat_FromDouble(s.z); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_z, member) < 0)) goto bad;
      Py_DECREF(member);
      return res;
      bad:
      Py_XDECREF(member);
      Py_DECREF(res);
      return NULL;
    }
    static PyObject* __pyx_convert__to_py_struct__CGL_vec4(struct CGL_vec4 s) {
      PyObject* res;
      PyObject* member;
      res = __Pyx_PyDict_NewPresized(4); if (unlikely(!res)) return NULL;
      member = PyFloat_FromDouble(s.x); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_x, member) < 0)) goto bad;
      Py_DECREF(member);
      member = PyFloat_FromDouble(s.y); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_y, member) < 0)) goto bad;
      Py_DECREF(member);
      member = PyFloat_FromDouble(s.z); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_z, member) < 0)) goto bad;
      Py_DECREF(member);
      member = PyFloat_FromDouble(s.w); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_w, member) < 0)) goto bad;
      Py_DECREF(member);
      return res;
      bad:
      Py_XDECREF(member);
      Py_DECREF(res);
      return NULL;
    }
    static PyObject* __pyx_convert__to_py_struct__CGL_mat4(struct CGL_mat4 s) {
      PyObject* res;
      PyObject* member;
      res = __Pyx_PyDict_NewPresized(1); if (unlikely(!res)) return NULL;
      member = __Pyx_carray_to_py_CGL_float(s.m, 16); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_m, member) < 0)) goto bad;
      Py_DECREF(member);
      return res;
      bad:
      Py_XDECREF(member);
      Py_DECREF(res);
      return NULL;
    }
    static PyObject* __pyx_convert__to_py_struct__CGL_ivec4(struct CGL_ivec4 s) {
      PyObject* res;
      PyObject* member;
      res = __Pyx_PyDict_NewPresized(4); if (unlikely(!res)) return NULL;
      member = __Pyx_PyInt_From_CGL_int(s.x); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_x, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_CGL_int(s.y); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_y, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_CGL_int(s.z); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_z, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_CGL_int(s.w); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_w, member) < 0)) goto bad;
      Py_DECREF(member);
      return res;
      bad:
      Py_XDECREF(member);
      Py_DECREF(res);
      return NULL;
    }
    static PyObject* __pyx_convert__to_py_struct__CGL_mesh_vertex(struct CGL_mesh_vertex s) {
      PyObject* res;
      PyObject* member;
      res = __Pyx_PyDict_NewPresized(5); if (unlikely(!res)) return NULL;
      member = __pyx_convert__to_py_struct__CGL_vec4(s.position); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_position, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_vec4(s.normal); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_normal, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_vec4(s.texture_coordinates); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_texture_coordinates, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_vec4(s.bone_wieghts); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_bone_wieghts, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_ivec4(s.bone_ids); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_bone_ids, member) < 0)) goto bad;
      Py_DECREF(member);
      return res;
      bad:
      Py_XDECREF(member);
      Py_DECREF(res);
      return NULL;
    }
    static PyObject* __pyx_convert__to_py_struct__CGL_font_character(struct CGL_font_character s) {
      PyObject* res;
      PyObject* member;
      res = __Pyx_PyDict_NewPresized(10); if (unlikely(!res)) return NULL;
      member = __pyx_convert__to_py_struct__CGL_vec2(s.size); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_size, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_vec2(s.normalized_size); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_normalized_size, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_vec2(s.offset); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_offset, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_vec2(s.normalized_offset); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_normalized_offset, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_vec2(s.bearing); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_bearing, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_vec2(s.bearing_normalized); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_bearing_normalized, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_vec2(s.advance); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_advance, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __pyx_convert__to_py_struct__CGL_vec2(s.advance_normalized); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_advance_normalized, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyObject_FromCString(s.bitmap); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_bitmap, member) < 0)) goto bad;
      Py_DECREF(member);
      member = __Pyx_PyInt_From_char(s.ch); if (unlikely(!member)) goto bad;
      if (unlikely(PyDict_SetItem(res, __pyx_n_s_ch, member) < 0)) goto bad;
      Py_DECREF(member);
      return res;
      bad:
      Py_XDECREF(member);
      Py_DECREF(res);
      return NULL;
    }
    /* CIntFromPy */
    static CYTHON_INLINE CGL_uint __Pyx_PyInt_As_CGL_uint(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CGL_uint neg_one = (CGL_uint) -1, const_zero = (CGL_uint) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(CGL_uint) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(CGL_uint, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (CGL_uint) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (CGL_uint) 0;
                case  1: __PYX_VERIFY_RETURN_INT(CGL_uint, digit, digits[0])
                case 2:
                    if (8 * sizeof(CGL_uint) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_uint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_uint) >= 2 * PyLong_SHIFT) {
                            return (CGL_uint) (((((CGL_uint)digits[1]) << PyLong_SHIFT) | (CGL_uint)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(CGL_uint) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_uint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_uint) >= 3 * PyLong_SHIFT) {
                            return (CGL_uint) (((((((CGL_uint)digits[2]) << PyLong_SHIFT) | (CGL_uint)digits[1]) << PyLong_SHIFT) | (CGL_uint)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(CGL_uint) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_uint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_uint) >= 4 * PyLong_SHIFT) {
                            return (CGL_uint) (((((((((CGL_uint)digits[3]) << PyLong_SHIFT) | (CGL_uint)digits[2]) << PyLong_SHIFT) | (CGL_uint)digits[1]) << PyLong_SHIFT) | (CGL_uint)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (CGL_uint) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(CGL_uint) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_uint, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(CGL_uint) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_uint, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (CGL_uint) 0;
                case -1: __PYX_VERIFY_RETURN_INT(CGL_uint, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(CGL_uint,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(CGL_uint) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_uint, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_uint) - 1 > 2 * PyLong_SHIFT) {
                            return (CGL_uint) (((CGL_uint)-1)*(((((CGL_uint)digits[1]) << PyLong_SHIFT) | (CGL_uint)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(CGL_uint) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_uint, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_uint) - 1 > 2 * PyLong_SHIFT) {
                            return (CGL_uint) ((((((CGL_uint)digits[1]) << PyLong_SHIFT) | (CGL_uint)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(CGL_uint) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_uint, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_uint) - 1 > 3 * PyLong_SHIFT) {
                            return (CGL_uint) (((CGL_uint)-1)*(((((((CGL_uint)digits[2]) << PyLong_SHIFT) | (CGL_uint)digits[1]) << PyLong_SHIFT) | (CGL_uint)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(CGL_uint) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_uint, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_uint) - 1 > 3 * PyLong_SHIFT) {
                            return (CGL_uint) ((((((((CGL_uint)digits[2]) << PyLong_SHIFT) | (CGL_uint)digits[1]) << PyLong_SHIFT) | (CGL_uint)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(CGL_uint) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_uint, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_uint) - 1 > 4 * PyLong_SHIFT) {
                            return (CGL_uint) (((CGL_uint)-1)*(((((((((CGL_uint)digits[3]) << PyLong_SHIFT) | (CGL_uint)digits[2]) << PyLong_SHIFT) | (CGL_uint)digits[1]) << PyLong_SHIFT) | (CGL_uint)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(CGL_uint) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_uint, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_uint) - 1 > 4 * PyLong_SHIFT) {
                            return (CGL_uint) ((((((((((CGL_uint)digits[3]) << PyLong_SHIFT) | (CGL_uint)digits[2]) << PyLong_SHIFT) | (CGL_uint)digits[1]) << PyLong_SHIFT) | (CGL_uint)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(CGL_uint) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_uint, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(CGL_uint) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_uint, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            CGL_uint val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (CGL_uint) -1;
        }
    } else {
        CGL_uint val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (CGL_uint) -1;
        val = __Pyx_PyInt_As_CGL_uint(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to CGL_uint");
    return (CGL_uint) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to CGL_uint");
    return (CGL_uint) -1;
}

/* CIntFromPy */
    static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            char val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -1;
}

/* CIntFromPy */
    static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
    static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT) {
                            return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT) {
                            return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT) {
                            return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint64_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint64_t) -1;
        }
    } else {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyInt_As_uint64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint64_t");
    return (uint64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint64_t");
    return (uint64_t) -1;
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
    static CYTHON_INLINE CGL_int __Pyx_PyInt_As_CGL_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CGL_int neg_one = (CGL_int) -1, const_zero = (CGL_int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(CGL_int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(CGL_int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (CGL_int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (CGL_int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(CGL_int, digit, digits[0])
                case 2:
                    if (8 * sizeof(CGL_int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_int) >= 2 * PyLong_SHIFT) {
                            return (CGL_int) (((((CGL_int)digits[1]) << PyLong_SHIFT) | (CGL_int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(CGL_int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_int) >= 3 * PyLong_SHIFT) {
                            return (CGL_int) (((((((CGL_int)digits[2]) << PyLong_SHIFT) | (CGL_int)digits[1]) << PyLong_SHIFT) | (CGL_int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(CGL_int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_int) >= 4 * PyLong_SHIFT) {
                            return (CGL_int) (((((((((CGL_int)digits[3]) << PyLong_SHIFT) | (CGL_int)digits[2]) << PyLong_SHIFT) | (CGL_int)digits[1]) << PyLong_SHIFT) | (CGL_int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (CGL_int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(CGL_int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(CGL_int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (CGL_int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(CGL_int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(CGL_int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(CGL_int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_int) - 1 > 2 * PyLong_SHIFT) {
                            return (CGL_int) (((CGL_int)-1)*(((((CGL_int)digits[1]) << PyLong_SHIFT) | (CGL_int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(CGL_int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_int) - 1 > 2 * PyLong_SHIFT) {
                            return (CGL_int) ((((((CGL_int)digits[1]) << PyLong_SHIFT) | (CGL_int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(CGL_int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_int) - 1 > 3 * PyLong_SHIFT) {
                            return (CGL_int) (((CGL_int)-1)*(((((((CGL_int)digits[2]) << PyLong_SHIFT) | (CGL_int)digits[1]) << PyLong_SHIFT) | (CGL_int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(CGL_int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_int) - 1 > 3 * PyLong_SHIFT) {
                            return (CGL_int) ((((((((CGL_int)digits[2]) << PyLong_SHIFT) | (CGL_int)digits[1]) << PyLong_SHIFT) | (CGL_int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(CGL_int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_int) - 1 > 4 * PyLong_SHIFT) {
                            return (CGL_int) (((CGL_int)-1)*(((((((((CGL_int)digits[3]) << PyLong_SHIFT) | (CGL_int)digits[2]) << PyLong_SHIFT) | (CGL_int)digits[1]) << PyLong_SHIFT) | (CGL_int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(CGL_int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_int) - 1 > 4 * PyLong_SHIFT) {
                            return (CGL_int) ((((((((((CGL_int)digits[3]) << PyLong_SHIFT) | (CGL_int)digits[2]) << PyLong_SHIFT) | (CGL_int)digits[1]) << PyLong_SHIFT) | (CGL_int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(CGL_int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(CGL_int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            CGL_int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (CGL_int) -1;
        }
    } else {
        CGL_int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (CGL_int) -1;
        val = __Pyx_PyInt_As_CGL_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to CGL_int");
    return (CGL_int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to CGL_int");
    return (CGL_int) -1;
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CGL_int(CGL_int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CGL_int neg_one = (CGL_int) -1, const_zero = (CGL_int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(CGL_int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(CGL_int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CGL_int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(CGL_int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CGL_int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(CGL_int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CGL_ulong(CGL_ulong value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CGL_ulong neg_one = (CGL_ulong) -1, const_zero = (CGL_ulong) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(CGL_ulong) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(CGL_ulong) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CGL_ulong) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(CGL_ulong) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CGL_ulong) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(CGL_ulong),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_CGL_uint(CGL_uint value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CGL_uint neg_one = (CGL_uint) -1, const_zero = (CGL_uint) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(CGL_uint) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(CGL_uint) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CGL_uint) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(CGL_uint) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(CGL_uint) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(CGL_uint),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
    static CYTHON_INLINE uint8_t __Pyx_PyInt_As_uint8_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint8_t neg_one = (uint8_t) -1, const_zero = (uint8_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint8_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint8_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint8_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint8_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint8_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint8_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) >= 2 * PyLong_SHIFT) {
                            return (uint8_t) (((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint8_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) >= 3 * PyLong_SHIFT) {
                            return (uint8_t) (((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint8_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) >= 4 * PyLong_SHIFT) {
                            return (uint8_t) (((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint8_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint8_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint8_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint8_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint8_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint8_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint8_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint8_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint8_t) ((((((uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint8_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint8_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint8_t) ((((((((uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint8_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint8_t) (((uint8_t)-1)*(((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint8_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint8_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint8_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint8_t) ((((((((((uint8_t)digits[3]) << PyLong_SHIFT) | (uint8_t)digits[2]) << PyLong_SHIFT) | (uint8_t)digits[1]) << PyLong_SHIFT) | (uint8_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint8_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint8_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint8_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint8_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint8_t) -1;
        }
    } else {
        uint8_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint8_t) -1;
        val = __Pyx_PyInt_As_uint8_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint8_t");
    return (uint8_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint8_t");
    return (uint8_t) -1;
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
    static CYTHON_INLINE CGL_byte __Pyx_PyInt_As_CGL_byte(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const CGL_byte neg_one = (CGL_byte) -1, const_zero = (CGL_byte) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(CGL_byte) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(CGL_byte, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (CGL_byte) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (CGL_byte) 0;
                case  1: __PYX_VERIFY_RETURN_INT(CGL_byte, digit, digits[0])
                case 2:
                    if (8 * sizeof(CGL_byte) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_byte, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_byte) >= 2 * PyLong_SHIFT) {
                            return (CGL_byte) (((((CGL_byte)digits[1]) << PyLong_SHIFT) | (CGL_byte)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(CGL_byte) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_byte, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_byte) >= 3 * PyLong_SHIFT) {
                            return (CGL_byte) (((((((CGL_byte)digits[2]) << PyLong_SHIFT) | (CGL_byte)digits[1]) << PyLong_SHIFT) | (CGL_byte)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(CGL_byte) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_byte, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_byte) >= 4 * PyLong_SHIFT) {
                            return (CGL_byte) (((((((((CGL_byte)digits[3]) << PyLong_SHIFT) | (CGL_byte)digits[2]) << PyLong_SHIFT) | (CGL_byte)digits[1]) << PyLong_SHIFT) | (CGL_byte)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (CGL_byte) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(CGL_byte) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_byte, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(CGL_byte) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_byte, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (CGL_byte) 0;
                case -1: __PYX_VERIFY_RETURN_INT(CGL_byte, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(CGL_byte,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(CGL_byte) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_byte, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_byte) - 1 > 2 * PyLong_SHIFT) {
                            return (CGL_byte) (((CGL_byte)-1)*(((((CGL_byte)digits[1]) << PyLong_SHIFT) | (CGL_byte)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(CGL_byte) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_byte, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_byte) - 1 > 2 * PyLong_SHIFT) {
                            return (CGL_byte) ((((((CGL_byte)digits[1]) << PyLong_SHIFT) | (CGL_byte)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(CGL_byte) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_byte, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_byte) - 1 > 3 * PyLong_SHIFT) {
                            return (CGL_byte) (((CGL_byte)-1)*(((((((CGL_byte)digits[2]) << PyLong_SHIFT) | (CGL_byte)digits[1]) << PyLong_SHIFT) | (CGL_byte)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(CGL_byte) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_byte, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_byte) - 1 > 3 * PyLong_SHIFT) {
                            return (CGL_byte) ((((((((CGL_byte)digits[2]) << PyLong_SHIFT) | (CGL_byte)digits[1]) << PyLong_SHIFT) | (CGL_byte)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(CGL_byte) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_byte, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_byte) - 1 > 4 * PyLong_SHIFT) {
                            return (CGL_byte) (((CGL_byte)-1)*(((((((((CGL_byte)digits[3]) << PyLong_SHIFT) | (CGL_byte)digits[2]) << PyLong_SHIFT) | (CGL_byte)digits[1]) << PyLong_SHIFT) | (CGL_byte)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(CGL_byte) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(CGL_byte, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(CGL_byte) - 1 > 4 * PyLong_SHIFT) {
                            return (CGL_byte) ((((((((((CGL_byte)digits[3]) << PyLong_SHIFT) | (CGL_byte)digits[2]) << PyLong_SHIFT) | (CGL_byte)digits[1]) << PyLong_SHIFT) | (CGL_byte)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(CGL_byte) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_byte, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(CGL_byte) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(CGL_byte, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            CGL_byte val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (CGL_byte) -1;
        }
    } else {
        CGL_byte val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (CGL_byte) -1;
        val = __Pyx_PyInt_As_CGL_byte(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to CGL_byte");
    return (CGL_byte) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to CGL_byte");
    return (CGL_byte) -1;
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

/* CIntFromPy */
    static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* CIntFromPy */
    static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
                            return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

/* CIntFromPy */
    static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT) {
                            return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT) {
                            return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT) {
                            return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint32_t val;
            PyObject *v = __Pyx_PyNumber_IntOrLong(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint32_t) -1;
        }
    } else {
        uint32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (uint32_t) -1;
        val = __Pyx_PyInt_As_uint32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint32_t");
    return (uint32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint32_t");
    return (uint32_t) -1;
}

/* CIntToPy */
    static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const char neg_one = (char) -1, const_zero = (char) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(char) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(char) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(char),
                                     little, !is_unsigned);
    }
}

/* FastTypeChecks */
    #if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = a->tp_base;
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
    if (!res) {
        res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
    return res;
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CheckBinaryVersion */
    static int __Pyx_check_binary_version(void) {
    char ctversion[5];
    int same=1, i, found_dot;
    const char* rt_from_call = Py_GetVersion();
    PyOS_snprintf(ctversion, 5, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    found_dot = 0;
    for (i = 0; i < 4; i++) {
        if (!ctversion[i]) {
            same = (rt_from_call[i] < '0' || rt_from_call[i] > '9');
            break;
        }
        if (rt_from_call[i] != ctversion[i]) {
            same = 0;
            break;
        }
    }
    if (!same) {
        char rtversion[5] = {'\0'};
        char message[200];
        for (i=0; i<4; ++i) {
            if (rt_from_call[i] == '.') {
                if (found_dot) break;
                found_dot = 1;
            } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') {
                break;
            }
            rtversion[i] = rt_from_call[i];
        }
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

/* InitStrings */
    static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        ++t;
    }
    return 0;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type %.200s).  "
                "The ability to return an instance of a strict subclass of int "
                "is deprecated, and may be removed in a future version of Python.",
                Py_TYPE(result)->tp_name)) {
            Py_DECREF(result);
            return NULL;
        }
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type %.200s)",
                 type_name, type_name, Py_TYPE(result)->tp_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
