/* Generated by Cython 0.27.3 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": [],
        "language": "c++",
        "name": "psychxr.ovr.capi",
        "sources": [
            "psychxr/ovr/capi.pyx"
        ]
    },
    "module_name": "psychxr.ovr.capi"
}
END: Cython Metadata */

#define 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_27_3"
#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
  #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
#elif defined(PYSTON_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 1
  #define CYTHON_COMPILING_IN_CPYTHON 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
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_PYSTON 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #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 1
  #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
    #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
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
  #undef SHIFT
  #undef BASE
  #undef MASK
#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_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 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
#if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **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)))))
#else
#define __Pyx_PyFastCFunction_Check(func) 0
#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 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 PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #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)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
#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
#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_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
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? 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
#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
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
#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   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#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
#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 __cplusplus
  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
#endif
#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #else
    #define CYTHON_INLINE inline
  #endif
#endif
template<typename T>
void __Pyx_call_destructor(T& x) {
    x.~T();
}
template<typename T>
class __Pyx_FakeReference {
  public:
    __Pyx_FakeReference() : ptr(NULL) { }
    __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
    T *operator->() { return ptr; }
    T *operator&() { return ptr; }
    operator T&() { return *ptr; }
    template<typename U> bool operator ==(U other) { return *ptr == other; }
    template<typename U> bool operator !=(U other) { return *ptr != other; }
  private:
    T *ptr;
};

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#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_ERR(f_index, lineno, Ln_error) \
{ \
  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; 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__psychxr__ovr__capi
#define __PYX_HAVE_API__psychxr__ovr__capi
#include <stdint.h>
#include "OVR_ErrorCode.h"
#include "OVR_CAPI.h"
#include "OVR_CAPI_GL.h"
#include "OVR_CAPI_Util.h"
#include "OVR_Math.h"
#include "ios"
#include "new"
#include "stdexcept"
#include "typeinfo"
#include <math.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_DEFAULT 0
#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)))  )
#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)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(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);
#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));
    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;
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[] = {
  "psychxr\\ovr\\capi.pyx",
  "stringsource",
  "psychxr\\ovr\\math.pxd",
};

/*--- Type declarations ---*/
struct __pyx_obj_7psychxr_3ovr_4math_ovrVector2i;
struct __pyx_obj_7psychxr_3ovr_4math_ovrSizei;
struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti;
struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f;
struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort;
struct __pyx_obj_7psychxr_3ovr_4math_ovrQuatf;
struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef;
struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f;
struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf;
struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc;
struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc;
struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef;
struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData;
struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc;
struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus;
struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState;
struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame;
struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats;
struct __pyx_t_7psychxr_3ovr_8ovr_capi_ovrVector4f;
typedef struct __pyx_t_7psychxr_3ovr_8ovr_capi_ovrVector4f __pyx_t_7psychxr_3ovr_8ovr_capi_ovrVector4f;

/* "ovr_capi.pxd":695
 * 
 * # additional types
 * ctypedef struct ovrVector4f:             # <<<<<<<<<<<<<<
 *     float x
 *     float y
 */
struct __pyx_t_7psychxr_3ovr_8ovr_capi_ovrVector4f {
  float x;
  float y;
  float z;
  float w;
};
struct __pyx_opt_args_7psychxr_3ovr_4capi_isOculusServiceRunning;
struct __pyx_opt_args_7psychxr_3ovr_4capi_isHmdConnected;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getFovTextureSize;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getBufferSize;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getTrackingState;
struct __pyx_opt_args_7psychxr_3ovr_4capi_setTrackingOriginType;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getEyeProjectionMatrix;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getDisplayTime;
struct __pyx_opt_args_7psychxr_3ovr_4capi_waitToBeginFrame;
struct __pyx_opt_args_7psychxr_3ovr_4capi_beginFrame;
struct __pyx_opt_args_7psychxr_3ovr_4capi_endFrame;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getInputState;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getIndexTriggerValues;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getHandTriggerValues;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getThumbstickValues;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getButtons;
struct __pyx_opt_args_7psychxr_3ovr_4capi_getTouches;
struct __pyx_opt_args_7psychxr_3ovr_4capi_perfHudMode;
struct __pyx_opt_args_7psychxr_3ovr_4capi_showBoundry;

/* "psychxr/ovr/capi.pyx":103
 * # Controller indices in controller state array.
 * #
 * ctypedef enum LibOVRControllers:             # <<<<<<<<<<<<<<
 *     xbox = 0
 *     remote = 1
 */
enum __pyx_t_7psychxr_3ovr_4capi_LibOVRControllers {
  __pyx_e_7psychxr_3ovr_4capi_xbox = 0,
  __pyx_e_7psychxr_3ovr_4capi_remote = 1,
  __pyx_e_7psychxr_3ovr_4capi_touch = 2,
  __pyx_e_7psychxr_3ovr_4capi_left_touch = 3,
  __pyx_e_7psychxr_3ovr_4capi_right_touch = 4,
  __pyx_e_7psychxr_3ovr_4capi_count = 5
};
typedef enum __pyx_t_7psychxr_3ovr_4capi_LibOVRControllers __pyx_t_7psychxr_3ovr_4capi_LibOVRControllers;

/* "psychxr/ovr/capi.pyx":311
 * # -----------------
 * #
 * cpdef bint isOculusServiceRunning(int timeout_milliseconds=100):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi_util.ovrDetectResult result = ovr_capi_util.ovr_Detect(
 *         timeout_milliseconds)
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_isOculusServiceRunning {
  int __pyx_n;
  int timeout_milliseconds;
};

/* "psychxr/ovr/capi.pyx":317
 *     return <bint>result.IsOculusServiceRunning
 * 
 * cpdef bint isHmdConnected(int timeout_milliseconds=100):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi_util.ovrDetectResult result = ovr_capi_util.ovr_Detect(
 *         timeout_milliseconds)
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_isHmdConnected {
  int __pyx_n;
  int timeout_milliseconds;
};

/* "psychxr/ovr/capi.pyx":657
 * ovrEye_Count = ovr_capi.ovrEye_Count
 * 
 * cpdef ovrSizei getFovTextureSize(             # <<<<<<<<<<<<<<
 *         int eye_type,
 *         ovrFovPort fov,
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getFovTextureSize {
  int __pyx_n;
  float texels_per_pixel;
};

/* "psychxr/ovr/capi.pyx":721
 *     return [hmdToEyePoseLeft, hmdToEyePoseRight]
 * 
 * cpdef tuple getBufferSize(str fov_type='recommended',             # <<<<<<<<<<<<<<
 *                           float texel_per_pixel=1.0):
 *     """Compute the recommended buffer (texture) size for a specified
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getBufferSize {
  int __pyx_n;
  PyObject *fov_type;
  float texel_per_pixel;
};

/* "psychxr/ovr/capi.pyx":928
 *                <unsigned int>self.c_data[0].HandStatusFlags[1]
 * 
 * cpdef TrackingStateData getTrackingState(             # <<<<<<<<<<<<<<
 *         double abs_time,
 *         bint latency_marker=True):
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getTrackingState {
  int __pyx_n;
  int latency_marker;
};

/* "psychxr/ovr/capi.pyx":943
 *     return to_return
 * 
 * cpdef void setTrackingOriginType(str origin='floor'):             # <<<<<<<<<<<<<<
 *     """Set the tracking origin type. Can either be 'floor' or 'eye'.
 * 
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_setTrackingOriginType {
  int __pyx_n;
  PyObject *origin;
};

/* "psychxr/ovr/capi.pyx":1049
 *     return viewMatrix
 * 
 * cpdef ovrMatrix4f getEyeProjectionMatrix(             # <<<<<<<<<<<<<<
 *         int eye,
 *         float near_clip=0.2,
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getEyeProjectionMatrix {
  int __pyx_n;
  float near_clip;
  float far_clip;
};

/* "psychxr/ovr/capi.pyx":1079
 * # -------------------------
 * #
 * cpdef double getDisplayTime(unsigned int frameIndex=0, bint predicted=True):             # <<<<<<<<<<<<<<
 *     """Get the current display time. If 'predicted=True', the predicted
 *     mid-frame time is returned.
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getDisplayTime {
  int __pyx_n;
  unsigned int frameIndex;
  int predicted;
};

/* "psychxr/ovr/capi.pyx":1097
 *     return t_secs
 * 
 * cpdef int waitToBeginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result = 0
 *     result = ovr_capi.ovr_WaitToBeginFrame(_ptr_session_, frameIndex)
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_waitToBeginFrame {
  int __pyx_n;
  unsigned int frameIndex;
};

/* "psychxr/ovr/capi.pyx":1103
 *     return <int>result
 * 
 * cpdef int beginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     result = ovr_capi.ovr_BeginFrame(_ptr_session_, frameIndex)
 * 
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_beginFrame {
  int __pyx_n;
  unsigned int frameIndex;
};

/* "psychxr/ovr/capi.pyx":1117
 *         check_result(result)
 * 
 * cpdef void endFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     global _eye_layer_
 *     cdef ovr_capi.ovrLayerHeader* layers = &_eye_layer_.Header
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_endFrame {
  int __pyx_n;
  unsigned int frameIndex;
};

/* "psychxr/ovr/capi.pyx":1398
 *         return (thumbstick_x0, thumbstick_y0), (thumbstick_x1, thumbstick_y1)
 * 
 * cpdef object getInputState(str controller, object stateOut=None):             # <<<<<<<<<<<<<<
 *     """Get a controller state as an object. If a 'InputStateData' object is
 *     passed to 'state_out', that object will be updated.
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getInputState {
  int __pyx_n;
  PyObject *stateOut;
};

/* "psychxr/ovr/capi.pyx":1512
 *     return ptr_ctrl_state[0].TimeInSeconds
 * 
 * cpdef tuple getIndexTriggerValues(str controller, bint deadZone=False):             # <<<<<<<<<<<<<<
 *     """Get index trigger values for a specified controller.
 * 
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getIndexTriggerValues {
  int __pyx_n;
  int deadZone;
};

/* "psychxr/ovr/capi.pyx":1547
 *     return index_trigger_left, index_trigger_right
 * 
 * cpdef tuple getHandTriggerValues(str controller, bint deadZone=False):             # <<<<<<<<<<<<<<
 *     """Get hand trigger values for a specified controller.
 * 
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getHandTriggerValues {
  int __pyx_n;
  int deadZone;
};

/* "psychxr/ovr/capi.pyx":1597
 *     return val
 * 
 * cpdef tuple getThumbstickValues(str controller, bint deadZone=False):             # <<<<<<<<<<<<<<
 *     """Get thumbstick values for a specified controller.
 * 
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getThumbstickValues {
  int __pyx_n;
  int deadZone;
};

/* "psychxr/ovr/capi.pyx":1650
 *     return (thumbstick0_x, thumbstick0_y), (thumbstick1_x, thumbstick1_y)
 * 
 * cpdef bint getButtons(str controller, object buttonNames, str trigger='continuous'):             # <<<<<<<<<<<<<<
 *     """Get the state of a specified button for a given controller.
 * 
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getButtons {
  int __pyx_n;
  PyObject *trigger;
};

/* "psychxr/ovr/capi.pyx":1717
 *     return pressed
 * 
 * cpdef bint getTouches(str controller, object touchNames, str trigger='continuous'):             # <<<<<<<<<<<<<<
 *     """Get touches for a specified device.
 * 
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_getTouches {
  int __pyx_n;
  PyObject *trigger;
};

/* "psychxr/ovr/capi.pyx":1965
 *     'VersionInfo']
 * 
 * cpdef void perfHudMode(str mode='Off'):             # <<<<<<<<<<<<<<
 *     """Display a performance HUD with a specified mode.
 * 
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_perfHudMode {
  int __pyx_n;
  PyObject *mode;
};

/* "psychxr/ovr/capi.pyx":2033
 *     return <bint>is_visible
 * 
 * cpdef void showBoundry(bint show=True):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_RequestBoundaryVisible(
 *         _ptr_session_, <ovr_capi.ovrBool>show)
 */
struct __pyx_opt_args_7psychxr_3ovr_4capi_showBoundry {
  int __pyx_n;
  int show;
};

/* "math.pxd":4
 * cimport ovr_capi
 * 
 * cdef class ovrVector2i:             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrVector2i* c_data
 *     cdef ovr_capi.ovrVector2i  c_ovrVector2i
 */
struct __pyx_obj_7psychxr_3ovr_4math_ovrVector2i {
  PyObject_HEAD
  ovrVector2i *c_data;
  ovrVector2i c_ovrVector2i;
};


/* "math.pxd":8
 *     cdef ovr_capi.ovrVector2i  c_ovrVector2i
 * 
 * cdef class ovrSizei:             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrSizei* c_data
 *     cdef ovr_capi.ovrSizei  c_ovrSizei
 */
struct __pyx_obj_7psychxr_3ovr_4math_ovrSizei {
  PyObject_HEAD
  ovrSizei *c_data;
  ovrSizei c_ovrSizei;
};


/* "math.pxd":12
 *     cdef ovr_capi.ovrSizei  c_ovrSizei
 * 
 * cdef class ovrRecti:             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrRecti* c_data
 *     cdef ovr_capi.ovrRecti  c_ovrRecti
 */
struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti {
  PyObject_HEAD
  ovrRecti *c_data;
  ovrRecti c_ovrRecti;
};


/* "math.pxd":16
 *     cdef ovr_capi.ovrRecti  c_ovrRecti
 * 
 * cdef class ovrVector3f:             # <<<<<<<<<<<<<<
 *     cdef ovr_math.Vector3f* c_data
 *     cdef ovr_math.Vector3f  c_Vector3f
 */
struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f {
  PyObject_HEAD
  OVR::Vector3f *c_data;
  OVR::Vector3f c_Vector3f;
};


/* "math.pxd":20
 *     cdef ovr_math.Vector3f  c_Vector3f
 * 
 * cdef class ovrFovPort:             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrFovPort* c_data
 *     cdef ovr_capi.ovrFovPort  c_ovrFovPort
 */
struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort {
  PyObject_HEAD
  ovrFovPort *c_data;
  ovrFovPort c_ovrFovPort;
};


/* "math.pxd":24
 *     cdef ovr_capi.ovrFovPort  c_ovrFovPort
 * 
 * cdef class ovrQuatf:             # <<<<<<<<<<<<<<
 *     cdef ovr_math.Quatf* c_data
 *     cdef ovr_math.Quatf  c_Quatf
 */
struct __pyx_obj_7psychxr_3ovr_4math_ovrQuatf {
  PyObject_HEAD
  OVR::Quatf *c_data;
  OVR::Quatf c_Quatf;
};


/* "math.pxd":28
 *     cdef ovr_math.Quatf  c_Quatf
 * 
 * cdef class ovrPosef:             # <<<<<<<<<<<<<<
 *     cdef ovr_math.Posef* c_data
 *     cdef ovr_math.Posef  c_Posef
 */
struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef {
  PyObject_HEAD
  OVR::Posef *c_data;
  OVR::Posef c_Posef;
};


/* "math.pxd":32
 *     cdef ovr_math.Posef  c_Posef
 * 
 * cdef class ovrMatrix4f:             # <<<<<<<<<<<<<<
 *     cdef ovr_math.Matrix4f* c_data
 *     cdef ovr_math.Matrix4f  c_Matrix4f
 */
struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f {
  PyObject_HEAD
  OVR::Matrix4f *c_data;
  OVR::Matrix4f c_Matrix4f;
};


/* "psychxr/ovr/capi.pyx":179
 * 
 * 
 * cdef class ovrColorf:             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrColorf* c_data
 *     cdef ovr_capi.ovrColorf  c_ovrColorf
 */
struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf {
  PyObject_HEAD
  ovrColorf *c_data;
  ovrColorf c_ovrColorf;
};


/* "psychxr/ovr/capi.pyx":389
 *     ovr_capi.ovr_Shutdown()
 * 
 * cdef class ovrHmdDesc(object):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrHmdDesc c_ovrHmdDesc
 * 
 */
struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc {
  PyObject_HEAD
  ovrHmdDesc c_ovrHmdDesc;
};


/* "psychxr/ovr/capi.pyx":517
 * OVR_FORMAT_D32_FLOAT_S8X24_UINT = ovr_capi.OVR_FORMAT_D32_FLOAT_S8X24_UINT
 * 
 * cdef class ovrTextureSwapChainDesc:             # <<<<<<<<<<<<<<
 *     """ovrTextureSwapChainDesc
 * 
 */
struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc {
  PyObject_HEAD
  ovrTextureSwapChainDesc c_ovrTextureSwapChainDesc;
};


/* "psychxr/ovr/capi.pyx":827
 * # ---------------------------------
 * #
 * cdef class ovrPoseStatef(object):             # <<<<<<<<<<<<<<
 *     """Pose state data.
 * 
 */
struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef {
  PyObject_HEAD
  ovrPoseStatef *c_data;
  ovrPoseStatef c_ovrPoseStatef;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *field_the_pose;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *field_angular_velocity;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *field_linear_velocity;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *field_angular_acceleration;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *field_linear_acceleration;
};


/* "psychxr/ovr/capi.pyx":891
 * ovrStatus_PositionTracked = ovr_capi.ovrStatus_PositionTracked
 * 
 * cdef class TrackingStateData(object):             # <<<<<<<<<<<<<<
 *     """Structure which stores tracking state information. All attributes are
 *     read-only, returning a copy of the data in the accessed field.
 */
struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData {
  PyObject_HEAD
  ovrTrackingState *c_data;
  ovrTrackingState c_ovrTrackingState;
};


/* "psychxr/ovr/capi.pyx":1145
 * ovrMirrorOption_IncludeSystemGui = ovr_capi.ovrMirrorOption_IncludeSystemGui
 * 
 * cdef class ovrMirrorTextureDesc:             # <<<<<<<<<<<<<<
 *     """ovrTextureSwapChainDesc
 *     """
 */
struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc {
  PyObject_HEAD
  ovrMirrorTextureDesc c_ovrMirrorTextureDesc;
};


/* "psychxr/ovr/capi.pyx":1238
 * # ------------------------
 * #
 * cdef class ovrSessionStatus(object):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrSessionStatus* c_data
 *     cdef ovr_capi.ovrSessionStatus  c_ovrSessionStatus
 */
struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus {
  PyObject_HEAD
  ovrSessionStatus *c_data;
  ovrSessionStatus c_ovrSessionStatus;
};


/* "psychxr/ovr/capi.pyx":1290
 * # -------------------------
 * #
 * cdef class ovrInputState(object):             # <<<<<<<<<<<<<<
 *     """Class storing the state of an input device. Fields can only be updated
 *     by calling 'get_input_state()'.
 */
struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState {
  PyObject_HEAD
  ovrInputState *c_data;
  ovrInputState c_ovrInputState;
};


/* "psychxr/ovr/capi.pyx":1822
 * # -------------------------------
 * #
 * cdef class ovrPerfStatsPerCompositorFrame(object):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrPerfStatsPerCompositorFrame* c_data
 *     cdef ovr_capi.ovrPerfStatsPerCompositorFrame  c_ovrPerfStatsPerCompositorFrame
 */
struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame {
  PyObject_HEAD
  ovrPerfStatsPerCompositorFrame *c_data;
  ovrPerfStatsPerCompositorFrame c_ovrPerfStatsPerCompositorFrame;
};


/* "psychxr/ovr/capi.pyx":1878
 * 
 * 
 * cdef class ovrPerfStats(object):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrPerfStats* c_data
 *     cdef ovr_capi.ovrPerfStats  c_ovrPerfStats
 */
struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats {
  PyObject_HEAD
  ovrPerfStats *c_data;
  ovrPerfStats c_ovrPerfStats;
  PyObject *perf_stats;
};


/* --- 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) {
    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);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

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

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

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

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

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

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

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

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

/* GetModuleGlobalName.proto */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);

/* 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, int nargs, PyObject *kwargs);
#else
#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
#endif
#endif

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

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

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

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

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

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

/* DictGetItem.proto */
#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()) {
            PyObject* args = PyTuple_Pack(1, key);
            if (likely(args))
                PyErr_SetObject(PyExc_KeyError, args);
            Py_XDECREF(args);
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, 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);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

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

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

/* py_dict_keys.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d);

/* 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) :\
         (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
             ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
              (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ?\
                (PY_VERSION_HEX >= 0x030700A0 ?\
                    (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0) :\
                    (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL)) :\
              (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
                    (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
                    __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
        __Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

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

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From___pyx_t_7psychxr_3ovr_4capi_LibOVRControllers(__pyx_t_7psychxr_3ovr_4capi_LibOVRControllers value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrButton(ovrButton value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTouch(ovrTouch value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTextureType(ovrTextureType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTextureFormat(ovrTextureFormat value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrLayerType(ovrLayerType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlags value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrEyeType(ovrEyeType value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrStatusBits(ovrStatusBits value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOptions value);

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);

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

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

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

static PyObject* __pyx_convert__to_py_ovrSizei(ovrSizei s);
/* None.proto */
#include <new>

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

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

/* CIntFromPy.proto */
static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);

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

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

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

/* PyIdentifierFromString.proto */
#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

/* ModuleImport.proto */
static PyObject *__Pyx_ImportModule(const char *name);

/* TypeImport.proto */
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);

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


/* Module declarations from 'psychxr.ovr' */

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

/* Module declarations from 'psychxr.ovr.ovr_errorcode' */
static CYTHON_INLINE int __pyx_f_7psychxr_3ovr_13ovr_errorcode_OVR_SUCCESS(ovrResult); /*proto*/
static CYTHON_INLINE int __pyx_f_7psychxr_3ovr_13ovr_errorcode_OVR_FAILURE(ovrResult); /*proto*/

/* Module declarations from 'psychxr.ovr.ovr_capi' */

/* Module declarations from 'psychxr.ovr.ovr_capi_gl' */

/* Module declarations from 'psychxr.ovr.ovr_capi_util' */

/* Module declarations from 'libcpp' */

/* Module declarations from 'psychxr.ovr.ovr_math' */

/* Module declarations from 'psychxr.ovr.math' */
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4math_ovrVector2i = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4math_ovrSizei = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4math_ovrRecti = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4math_ovrVector3f = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4math_ovrFovPort = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4math_ovrQuatf = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4math_ovrPosef = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4math_ovrMatrix4f = 0;

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

/* Module declarations from 'psychxr.ovr.capi' */
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4capi_ovrColorf = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4capi_ovrHmdDesc = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4capi_ovrPoseStatef = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4capi_TrackingStateData = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4capi_ovrMirrorTextureDesc = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4capi_ovrSessionStatus = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4capi_ovrInputState = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame = 0;
static PyTypeObject *__pyx_ptype_7psychxr_3ovr_4capi_ovrPerfStats = 0;
static ovrHmdDesc __pyx_v_7psychxr_3ovr_4capi__hmdDesc_;
static ovrSession __pyx_v_7psychxr_3ovr_4capi__ptr_session_;
static ovrGraphicsLuid __pyx_v_7psychxr_3ovr_4capi__ptr_luid_;
static PY_LONG_LONG __pyx_v_7psychxr_3ovr_4capi__frame_index_;
static ovrTextureSwapChain __pyx_v_7psychxr_3ovr_4capi__swap_chain_[32];
static ovrMirrorTexture __pyx_v_7psychxr_3ovr_4capi__mirror_texture_;
static ovrEyeRenderDesc __pyx_v_7psychxr_3ovr_4capi__eye_render_desc_[2];
static ovrPosef __pyx_v_7psychxr_3ovr_4capi__hmd_to_eye_view_pose_[2];
static ovrLayerEyeFov __pyx_v_7psychxr_3ovr_4capi__eye_layer_;
static ovrErrorInfo __pyx_v_7psychxr_3ovr_4capi__last_error_info_;
static ovrInputState __pyx_v_7psychxr_3ovr_4capi__ctrl_states_[5];
static ovrInputState __pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[5];
static PyObject *__pyx_v_7psychxr_3ovr_4capi_ctrl_index_lut = 0;
static PyObject *__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut = 0;
static PyObject *__pyx_v_7psychxr_3ovr_4capi_ctrl_touch_lut = 0;
static ovrBoundaryLookAndFeel __pyx_v_7psychxr_3ovr_4capi__boundary_style_;
static int __pyx_f_7psychxr_3ovr_4capi_isOculusServiceRunning(int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_isOculusServiceRunning *__pyx_optional_args); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_isHmdConnected(int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_isHmdConnected *__pyx_optional_args); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_startSession(int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_endSession(int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_f_7psychxr_3ovr_4capi_getHmdDesc(int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_createTextureSwapChainGL(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4math_ovrSizei *__pyx_f_7psychxr_3ovr_4capi_getFovTextureSize(int, struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *, int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getFovTextureSize *__pyx_optional_args); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_configEyeRenderDesc(int, struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getHmdToEyePose(int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getBufferSize(int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getBufferSize *__pyx_optional_args); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setRenderSwapChain(int, PyObject *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *__pyx_f_7psychxr_3ovr_4capi_getRenderViewport(int, int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setRenderViewport(int, struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *, int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_getRenderLayerFlags(int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setRenderLayerFlags(int, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_f_7psychxr_3ovr_4capi_getTrackingState(double, int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getTrackingState *__pyx_optional_args); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setTrackingOriginType(int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_setTrackingOriginType *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getTrackingOriginType(int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_recenterTrackingOrigin(int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_specifyTrackingOrigin(struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_calcEyePoses(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *__pyx_f_7psychxr_3ovr_4capi_getEyeViewMatrix(struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *, int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *__pyx_f_7psychxr_3ovr_4capi_getEyeProjectionMatrix(int, int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getEyeProjectionMatrix *__pyx_optional_args); /*proto*/
static double __pyx_f_7psychxr_3ovr_4capi_getDisplayTime(int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getDisplayTime *__pyx_optional_args); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_waitToBeginFrame(int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_waitToBeginFrame *__pyx_optional_args); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_beginFrame(int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_beginFrame *__pyx_optional_args); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_commitSwapChain(int, int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_endFrame(int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_endFrame *__pyx_optional_args); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setupMirrorTexture(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *, int __pyx_skip_dispatch); /*proto*/
static unsigned int __pyx_f_7psychxr_3ovr_4capi_getMirrorTexture(int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_f_7psychxr_3ovr_4capi_getSessionStatus(int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getInputState(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getInputState *__pyx_optional_args); /*proto*/
static double __pyx_f_7psychxr_3ovr_4capi_pollController(PyObject *, int __pyx_skip_dispatch); /*proto*/
static double __pyx_f_7psychxr_3ovr_4capi_getControllerAbsTime(PyObject *, int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getIndexTriggerValues(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getIndexTriggerValues *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getHandTriggerValues(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getHandTriggerValues *__pyx_optional_args); /*proto*/
static float __pyx_f_7psychxr_3ovr_4capi_clip_input_range(float); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getThumbstickValues(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getThumbstickValues *__pyx_optional_args); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_getButtons(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getButtons *__pyx_optional_args); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_getTouches(PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getTouches *__pyx_optional_args); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getConnectedControllerTypes(int __pyx_skip_dispatch); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_f_7psychxr_3ovr_4capi_getFrameStats(int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_resetFrameStats(int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_perfHudMode(int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_perfHudMode *__pyx_optional_args); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setBoundryColor(float, float, float, int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_resetBoundryColor(int __pyx_skip_dispatch); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_isBoundryVisible(int __pyx_skip_dispatch); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_showBoundry(int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_showBoundry *__pyx_optional_args); /*proto*/
static float __pyx_f_7psychxr_3ovr_4capi_getPlayerHeight(int __pyx_skip_dispatch); /*proto*/
static float __pyx_f_7psychxr_3ovr_4capi_getEyeHeight(int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getNeckEyeDistance(int __pyx_skip_dispatch); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getEyeToNoseDist(int __pyx_skip_dispatch); /*proto*/
#define __Pyx_MODULE_NAME "psychxr.ovr.capi"
extern int __pyx_module_is_main_psychxr__ovr__capi;
int __pyx_module_is_main_psychxr__ovr__capi = 0;

/* Implementation of 'psychxr.ovr.capi' */
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_ValueError;
static const char __pyx_k_[] = ": ";
static const char __pyx_k_A[] = "A";
static const char __pyx_k_B[] = "B";
static const char __pyx_k_X[] = "X";
static const char __pyx_k_Y[] = "Y";
static const char __pyx_k_a[] = "a";
static const char __pyx_k_b[] = "b";
static const char __pyx_k_g[] = "g";
static const char __pyx_k_h[] = "h";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_r[] = "r";
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_GL[] = "GL";
static const char __pyx_k_Up[] = "Up";
static const char __pyx_k_sc[] = "sc";
static const char __pyx_k_Off[] = "Off";
static const char __pyx_k__32[] = "*";
static const char __pyx_k_eye[] = "eye";
static const char __pyx_k_fov[] = "fov";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_Back[] = "Back";
static const char __pyx_k_Down[] = "Down";
static const char __pyx_k_Home[] = "Home";
static const char __pyx_k_Left[] = "Left";
static const char __pyx_k_Type[] = "Type";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "__name__";
static const char __pyx_k_show[] = "show";
static const char __pyx_k_test[] = "__test__";
static const char __pyx_k_type[] = "type";
static const char __pyx_k_xbox[] = "xbox";
static const char __pyx_k_Enter[] = "Enter";
static const char __pyx_k_LMask[] = "LMask";
static const char __pyx_k_RMask[] = "RMask";
static const char __pyx_k_Right[] = "Right";
static const char __pyx_k_VolUp[] = "VolUp";
static const char __pyx_k_floor[] = "floor";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_touch[] = "touch";
static const char __pyx_k_width[] = "width";
static const char __pyx_k_LThumb[] = "LThumb";
static const char __pyx_k_RThumb[] = "RThumb";
static const char __pyx_k_c_data[] = "c_data";
static const char __pyx_k_format[] = "_format";
static const char __pyx_k_height[] = "height";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_lookAt[] = "lookAt";
static const char __pyx_k_ltouch[] = "ltouch";
static const char __pyx_k_origin[] = "origin";
static const char __pyx_k_reduce[] = "__reduce__";
static const char __pyx_k_remote[] = "remote";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_rising[] = "rising";
static const char __pyx_k_rtouch[] = "rtouch";
static const char __pyx_k_tex_id[] = "tex_id";
static const char __pyx_k_Private[] = "Private";
static const char __pyx_k_VolDown[] = "VolDown";
static const char __pyx_k_falling[] = "falling";
static const char __pyx_k_pressed[] = "pressed";
static const char __pyx_k_trigger[] = "trigger";
static const char __pyx_k_AswStats[] = "AswStats";
static const char __pyx_k_LThumbUp[] = "LThumbUp";
static const char __pyx_k_RThumbUp[] = "RThumbUp";
static const char __pyx_k_abs_time[] = "abs_time";
static const char __pyx_k_deadZone[] = "deadZone";
static const char __pyx_k_eye_type[] = "eye_type";
static const char __pyx_k_far_clip[] = "far_clip";
static const char __pyx_k_fov_type[] = "fov_type";
static const char __pyx_k_getstate[] = "__getstate__";
static const char __pyx_k_released[] = "released";
static const char __pyx_k_setstate[] = "__setstate__";
static const char __pyx_k_stateOut[] = "stateOut";
static const char __pyx_k_LShoulder[] = "LShoulder";
static const char __pyx_k_OpenGL_GL[] = "OpenGL.GL";
static const char __pyx_k_RShoulder[] = "RShoulder";
static const char __pyx_k_TypeError[] = "TypeError";
static const char __pyx_k_near_clip[] = "near_clip";
static const char __pyx_k_predicted[] = "predicted";
static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
static const char __pyx_k_swap_desc[] = "swap_desc";
static const char __pyx_k_transform[] = "transform";
static const char __pyx_k_IndexError[] = "IndexError";
static const char __pyx_k_LThumbRest[] = "LThumbRest";
static const char __pyx_k_RThumbRest[] = "RThumbRest";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_array_size[] = "array_size";
static const char __pyx_k_continuous[] = "continuous";
static const char __pyx_k_controller[] = "controller";
static const char __pyx_k_debug_mode[] = "debug_mode";
static const char __pyx_k_frameIndex[] = "frameIndex";
static const char __pyx_k_left_touch[] = "left_touch";
static const char __pyx_k_mip_levels[] = "mip_levels";
static const char __pyx_k_swap_chain[] = "swap_chain";
static const char __pyx_k_touchNames[] = "touchNames";
static const char __pyx_k_PerfSummary[] = "PerfSummary";
static const char __pyx_k_VersionInfo[] = "VersionInfo";
static const char __pyx_k_buttonNames[] = "buttonNames";
static const char __pyx_k_current_idx[] = "current_idx";
static const char __pyx_k_ovrEye_Left[] = "ovrEye_Left";
static const char __pyx_k_recommended[] = "recommended";
static const char __pyx_k_right_touch[] = "right_touch";
static const char __pyx_k_touch_names[] = "touch_names";
static const char __pyx_k_RuntimeError[] = "RuntimeError";
static const char __pyx_k_button_names[] = "button_names";
static const char __pyx_k_check_result[] = "check_result";
static const char __pyx_k_ovrEye_Count[] = "ovrEye_Count";
static const char __pyx_k_ovrEye_Right[] = "ovrEye_Right";
static const char __pyx_k_sample_count[] = "sample_count";
static const char __pyx_k_static_image[] = "static_image";
static const char __pyx_k_viewPortRect[] = "viewPortRect";
static const char __pyx_k_LIndexTrigger[] = "LIndexTrigger";
static const char __pyx_k_LatencyTiming[] = "LatencyTiming";
static const char __pyx_k_RIndexTrigger[] = "RIndexTrigger";
static const char __pyx_k_freeSwapChain[] = "freeSwapChain";
static const char __pyx_k_mirrorOptions[] = "mirrorOptions";
static const char __pyx_k_ovrTexture_2D[] = "ovrTexture_2D";
static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
static const char __pyx_k_LIndexPointing[] = "LIndexPointing";
static const char __pyx_k_RIndexPointing[] = "RIndexPointing";
static const char __pyx_k_allocSwapChain[] = "allocSwapChain";
static const char __pyx_k_latency_marker[] = "latency_marker";
static const char __pyx_k_AppRenderTiming[] = "AppRenderTiming";
static const char __pyx_k_ovrTexture_Cube[] = "ovrTexture_Cube";
static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
static const char __pyx_k_texel_per_pixel[] = "texel_per_pixel";
static const char __pyx_k_CompRenderTiming[] = "CompRenderTiming";
static const char __pyx_k_controller_names[] = "controller_names";
static const char __pyx_k_psychxr_ovr_capi[] = "psychxr.ovr.capi";
static const char __pyx_k_texels_per_pixel[] = "texels_per_pixel";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_available_hud_modes[] = "available_hud_modes";
static const char __pyx_k_ovrLayerType_EyeFov[] = "ovrLayerType_EyeFov";
static const char __pyx_k_OVR_FORMAT_D16_UNORM[] = "OVR_FORMAT_D16_UNORM";
static const char __pyx_k_OVR_FORMAT_D32_FLOAT[] = "OVR_FORMAT_D32_FLOAT";
static const char __pyx_k_psychxr_ovr_capi_pyx[] = "psychxr\\ovr\\capi.pyx";
static const char __pyx_k_timeout_milliseconds[] = "timeout_milliseconds";
static const char __pyx_k_OVR_FORMAT_B8G8R8_UNORM[] = "OVR_FORMAT_B8G8R8_UNORM";
static const char __pyx_k_ovrLayerFlag_HeadLocked[] = "ovrLayerFlag_HeadLocked";
static const char __pyx_k_ovrMirrorOption_Default[] = "ovrMirrorOption_Default";
static const char __pyx_k_ovrLayerFlag_HighQuality[] = "ovrLayerFlag_HighQuality";
static const char __pyx_k_OVR_FORMAT_B8G8R8A8_UNORM[] = "OVR_FORMAT_B8G8R8A8_UNORM";
static const char __pyx_k_OVR_FORMAT_R8G8B8A8_UNORM[] = "OVR_FORMAT_R8G8B8A8_UNORM";
static const char __pyx_k_ovrStatus_PositionTracked[] = "ovrStatus_PositionTracked";
static const char __pyx_k_OVR_FORMAT_R11G11B10_FLOAT[] = "OVR_FORMAT_R11G11B10_FLOAT";
static const char __pyx_k_getTextureSwapChainBufferGL[] = "getTextureSwapChainBufferGL";
static const char __pyx_k_ovrMirrorOption_LeftEyeOnly[] = "ovrMirrorOption_LeftEyeOnly";
static const char __pyx_k_OVR_FORMAT_D24_UNORM_S8_UINT[] = "OVR_FORMAT_D24_UNORM_S8_UINT";
static const char __pyx_k_ovrMirrorOption_RightEyeOnly[] = "ovrMirrorOption_RightEyeOnly";
static const char __pyx_k_ovrStatus_OrientationTracked[] = "ovrStatus_OrientationTracked";
static const char __pyx_k_OVR_FORMAT_R16G16B16A16_FLOAT[] = "OVR_FORMAT_R16G16B16A16_FLOAT";
static const char __pyx_k_Invalid_trigger_mode_specified[] = "Invalid trigger mode specified.";
static const char __pyx_k_OVR_FORMAT_R8G8B8A8_UNORM_SRGB[] = "OVR_FORMAT_R8G8B8A8_UNORM_SRGB";
static const char __pyx_k_ovrMirrorOption_PostDistortion[] = "ovrMirrorOption_PostDistortion";
static const char __pyx_k_OVR_FORMAT_D32_FLOAT_S8X24_UINT[] = "OVR_FORMAT_D32_FLOAT_S8X24_UINT";
static const char __pyx_k_ovrMirrorOption_IncludeGuardian[] = "ovrMirrorOption_IncludeGuardian";
static const char __pyx_k_Maximum_number_of_swap_chains_in[] = "Maximum number of swap chains initialized!";
static const char __pyx_k_This_file_exposes_LibOVR_functio[] = "This file exposes LibOVR functions to Python.\n\n";
static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
static const char __pyx_k_ovrLayerFlag_TextureOriginAtBott[] = "ovrLayerFlag_TextureOriginAtBottomLeft";
static const char __pyx_k_ovrMirrorOption_IncludeNotificat[] = "ovrMirrorOption_IncludeNotifications";
static const char __pyx_k_ovrMirrorOption_IncludeSystemGui[] = "ovrMirrorOption_IncludeSystemGui";
static PyObject *__pyx_kp_s_;
static PyObject *__pyx_n_s_A;
static PyObject *__pyx_n_s_AppRenderTiming;
static PyObject *__pyx_n_s_AswStats;
static PyObject *__pyx_n_s_B;
static PyObject *__pyx_n_s_Back;
static PyObject *__pyx_n_s_CompRenderTiming;
static PyObject *__pyx_n_s_Down;
static PyObject *__pyx_n_s_Enter;
static PyObject *__pyx_n_s_GL;
static PyObject *__pyx_n_s_Home;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_kp_s_Invalid_trigger_mode_specified;
static PyObject *__pyx_n_s_LIndexPointing;
static PyObject *__pyx_n_s_LIndexTrigger;
static PyObject *__pyx_n_s_LMask;
static PyObject *__pyx_n_s_LShoulder;
static PyObject *__pyx_n_s_LThumb;
static PyObject *__pyx_n_s_LThumbRest;
static PyObject *__pyx_n_s_LThumbUp;
static PyObject *__pyx_n_s_LatencyTiming;
static PyObject *__pyx_n_s_Left;
static PyObject *__pyx_kp_s_Maximum_number_of_swap_chains_in;
static PyObject *__pyx_n_s_OVR_FORMAT_B8G8R8A8_UNORM;
static PyObject *__pyx_n_s_OVR_FORMAT_B8G8R8_UNORM;
static PyObject *__pyx_n_s_OVR_FORMAT_D16_UNORM;
static PyObject *__pyx_n_s_OVR_FORMAT_D24_UNORM_S8_UINT;
static PyObject *__pyx_n_s_OVR_FORMAT_D32_FLOAT;
static PyObject *__pyx_n_s_OVR_FORMAT_D32_FLOAT_S8X24_UINT;
static PyObject *__pyx_n_s_OVR_FORMAT_R11G11B10_FLOAT;
static PyObject *__pyx_n_s_OVR_FORMAT_R16G16B16A16_FLOAT;
static PyObject *__pyx_n_s_OVR_FORMAT_R8G8B8A8_UNORM;
static PyObject *__pyx_n_s_OVR_FORMAT_R8G8B8A8_UNORM_SRGB;
static PyObject *__pyx_n_s_Off;
static PyObject *__pyx_n_s_OpenGL_GL;
static PyObject *__pyx_n_s_PerfSummary;
static PyObject *__pyx_n_s_Private;
static PyObject *__pyx_n_s_RIndexPointing;
static PyObject *__pyx_n_s_RIndexTrigger;
static PyObject *__pyx_n_s_RMask;
static PyObject *__pyx_n_s_RShoulder;
static PyObject *__pyx_n_s_RThumb;
static PyObject *__pyx_n_s_RThumbRest;
static PyObject *__pyx_n_s_RThumbUp;
static PyObject *__pyx_n_s_Right;
static PyObject *__pyx_n_s_RuntimeError;
static PyObject *__pyx_n_s_Type;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_Up;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_VersionInfo;
static PyObject *__pyx_n_s_VolDown;
static PyObject *__pyx_n_s_VolUp;
static PyObject *__pyx_n_s_X;
static PyObject *__pyx_n_s_Y;
static PyObject *__pyx_n_s__32;
static PyObject *__pyx_n_s_a;
static PyObject *__pyx_n_s_abs_time;
static PyObject *__pyx_n_s_allocSwapChain;
static PyObject *__pyx_n_s_array_size;
static PyObject *__pyx_n_s_available_hud_modes;
static PyObject *__pyx_n_s_b;
static PyObject *__pyx_n_s_buttonNames;
static PyObject *__pyx_n_s_button_names;
static PyObject *__pyx_n_s_c_data;
static PyObject *__pyx_n_s_check_result;
static PyObject *__pyx_n_s_cline_in_traceback;
static PyObject *__pyx_n_s_continuous;
static PyObject *__pyx_n_s_controller;
static PyObject *__pyx_n_s_controller_names;
static PyObject *__pyx_n_s_current_idx;
static PyObject *__pyx_n_s_deadZone;
static PyObject *__pyx_n_s_debug_mode;
static PyObject *__pyx_n_s_eye;
static PyObject *__pyx_n_s_eye_type;
static PyObject *__pyx_n_s_falling;
static PyObject *__pyx_n_s_far_clip;
static PyObject *__pyx_n_s_floor;
static PyObject *__pyx_n_s_format;
static PyObject *__pyx_n_s_fov;
static PyObject *__pyx_n_s_fov_type;
static PyObject *__pyx_n_s_frameIndex;
static PyObject *__pyx_n_s_freeSwapChain;
static PyObject *__pyx_n_s_g;
static PyObject *__pyx_n_s_getTextureSwapChainBufferGL;
static PyObject *__pyx_n_s_getstate;
static PyObject *__pyx_n_s_h;
static PyObject *__pyx_n_s_height;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_import;
static PyObject *__pyx_n_s_keys;
static PyObject *__pyx_n_s_latency_marker;
static PyObject *__pyx_n_s_left_touch;
static PyObject *__pyx_n_s_lookAt;
static PyObject *__pyx_n_s_ltouch;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_max;
static PyObject *__pyx_n_s_mip_levels;
static PyObject *__pyx_n_s_mirrorOptions;
static PyObject *__pyx_n_s_mode;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_near_clip;
static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
static PyObject *__pyx_n_s_origin;
static PyObject *__pyx_n_s_ovrEye_Count;
static PyObject *__pyx_n_s_ovrEye_Left;
static PyObject *__pyx_n_s_ovrEye_Right;
static PyObject *__pyx_n_s_ovrLayerFlag_HeadLocked;
static PyObject *__pyx_n_s_ovrLayerFlag_HighQuality;
static PyObject *__pyx_n_s_ovrLayerFlag_TextureOriginAtBott;
static PyObject *__pyx_n_s_ovrLayerType_EyeFov;
static PyObject *__pyx_n_s_ovrMirrorOption_Default;
static PyObject *__pyx_n_s_ovrMirrorOption_IncludeGuardian;
static PyObject *__pyx_n_s_ovrMirrorOption_IncludeNotificat;
static PyObject *__pyx_n_s_ovrMirrorOption_IncludeSystemGui;
static PyObject *__pyx_n_s_ovrMirrorOption_LeftEyeOnly;
static PyObject *__pyx_n_s_ovrMirrorOption_PostDistortion;
static PyObject *__pyx_n_s_ovrMirrorOption_RightEyeOnly;
static PyObject *__pyx_n_s_ovrStatus_OrientationTracked;
static PyObject *__pyx_n_s_ovrStatus_PositionTracked;
static PyObject *__pyx_n_s_ovrTexture_2D;
static PyObject *__pyx_n_s_ovrTexture_Cube;
static PyObject *__pyx_n_s_predicted;
static PyObject *__pyx_n_s_pressed;
static PyObject *__pyx_n_s_psychxr_ovr_capi;
static PyObject *__pyx_kp_s_psychxr_ovr_capi_pyx;
static PyObject *__pyx_n_s_r;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_recommended;
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_released;
static PyObject *__pyx_n_s_remote;
static PyObject *__pyx_n_s_result;
static PyObject *__pyx_n_s_right_touch;
static PyObject *__pyx_n_s_rising;
static PyObject *__pyx_n_s_rtouch;
static PyObject *__pyx_n_s_sample_count;
static PyObject *__pyx_n_s_sc;
static PyObject *__pyx_n_s_setstate;
static PyObject *__pyx_n_s_setstate_cython;
static PyObject *__pyx_n_s_show;
static PyObject *__pyx_n_s_stateOut;
static PyObject *__pyx_n_s_static_image;
static PyObject *__pyx_n_s_swap_chain;
static PyObject *__pyx_n_s_swap_desc;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_tex_id;
static PyObject *__pyx_n_s_texel_per_pixel;
static PyObject *__pyx_n_s_texels_per_pixel;
static PyObject *__pyx_n_s_timeout_milliseconds;
static PyObject *__pyx_n_s_touch;
static PyObject *__pyx_n_s_touchNames;
static PyObject *__pyx_n_s_touch_names;
static PyObject *__pyx_n_s_transform;
static PyObject *__pyx_n_s_trigger;
static PyObject *__pyx_n_s_type;
static PyObject *__pyx_n_s_viewPortRect;
static PyObject *__pyx_n_s_w;
static PyObject *__pyx_n_s_width;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_n_s_xbox;
static PyObject *__pyx_n_s_y;
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_check_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_result); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, float __pyx_v_r, float __pyx_v_g, float __pyx_v_b, float __pyx_v_a); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1r___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1r_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, float __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1g___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1g_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, float __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1b___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1b_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, float __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1a___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1a_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, float __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_2as_tuple(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_2allocSwapChain(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_swap_desc); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_4freeSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_sc); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_6getTextureSwapChainBufferGL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_sc); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_8isOculusServiceRunning(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_timeout_milliseconds); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10isHmdConnected(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_timeout_milliseconds); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12startSession(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_14endSession(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc___cinit__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_4type___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_11ProductName___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_12Manufacturer___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_8VendorId___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_9ProductId___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_12SerialNumber___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMajor___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMinor___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_16AvailableHmdCaps___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_14DefaultHmdCaps___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_21AvailableTrackingCaps___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_19DefaultTrackingCaps___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_13DefaultEyeFov___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_9MaxEyeFov___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_10Resolution___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_18DisplayRefreshRate___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16getHmdDesc(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_type, int __pyx_v__format, int __pyx_v_width, int __pyx_v_height, int __pyx_v_array_size, int __pyx_v_mip_levels, int __pyx_v_sample_count, int __pyx_v_static_image); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_18createTextureSwapChainGL(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_swap_desc); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20getFovTextureSize(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye_type, struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_fov, float __pyx_v_texels_per_pixel); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_22configEyeRenderDesc(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye_type, struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_fov); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_24getHmdToEyePose(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_26getBufferSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fov_type, float __pyx_v_texel_per_pixel); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_28setRenderSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyObject *__pyx_v_swap_chain); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30getRenderViewport(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_32setRenderViewport(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *__pyx_v_viewPortRect); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_34getRenderLayerFlags(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_36setRenderLayerFlags(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_layerHeaderFlags); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_7ThePose___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_15AngularVelocity___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_14LinearVelocity___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_19AngularAcceleration___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_18LinearAcceleration___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_13TimeInSeconds___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_8HeadPose___get__(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_11StatusFlags___get__(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_9HandPoses___get__(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_15HandStatusFlags___get__(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_38getTrackingState(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_abs_time, int __pyx_v_latency_marker); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_40setTrackingOriginType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_origin); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_42getTrackingOriginType(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_44recenterTrackingOrigin(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_46specifyTrackingOrigin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_originPose); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_48calcEyePoses(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_trackingState); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_50getEyeViewMatrix(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_eyePose); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_52getEyeProjectionMatrix(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, float __pyx_v_near_clip, float __pyx_v_far_clip); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_54getDisplayTime(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex, int __pyx_v_predicted); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_56waitToBeginFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_58beginFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_60commitSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_sc); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_62endFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, int __pyx_v__format, int __pyx_v_width, int __pyx_v_height, int __pyx_v_mirrorOptions); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, int __pyx_v_value); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_64setupMirrorTexture(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_mirrorDesc); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_66getMirrorTexture(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_2IsVisible(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_4HmdPresent(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_6DisplayLost(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_8ShouldQuit(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_10ShouldRecenter(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_12HasInputFocus(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_14OverlayPresent(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_16DepthRequested(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_68getSessionStatus(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_13TimeInSeconds___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_7Buttons___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_7Touches___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_12IndexTrigger___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_11HandTrigger___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_10Thumbstick___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_14ControllerType___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_22IndexTriggerNoDeadzone___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_21HandTriggerNoDeadzone___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_20ThumbstickNoDeadzone___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_15IndexTriggerRaw___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_14HandTriggerRaw___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_13ThumbstickRaw___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_70getInputState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, PyObject *__pyx_v_stateOut); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_72pollController(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_74getControllerAbsTime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_76getIndexTriggerValues(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, int __pyx_v_deadZone); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_78getHandTriggerValues(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, int __pyx_v_deadZone); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_80getThumbstickValues(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, int __pyx_v_deadZone); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_82getButtons(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, PyObject *__pyx_v_buttonNames, PyObject *__pyx_v_trigger); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_84getTouches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, PyObject *__pyx_v_touchNames, PyObject *__pyx_v_trigger); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_86getConnectedControllerTypes(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13HmdVsyncIndex___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13AppFrameIndex___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20AppDroppedFrameCount___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppQueueAheadTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppCpuElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppGpuElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20CompositorFrameIndex___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17CompositorLatency___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorCpuElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorGpuElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_37CompositorCpuStartToGpuEndElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_34CompositorGpuEndToVsyncElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static int __pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_15FrameStatsCount___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_20AnyFrameStatsDropped___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_10FrameStats___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_27AdaptiveGpuPerformanceScale___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_14AswIsAvailable___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_88getFrameStats(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_90resetFrameStats(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_92perfHudMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mode); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_94setBoundryColor(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_r, float __pyx_v_g, float __pyx_v_b); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_96resetBoundryColor(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_98isBoundryVisible(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_100showBoundry(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_show); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_102getPlayerHeight(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_104getEyeHeight(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_106getNeckEyeDistance(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7psychxr_3ovr_4capi_108getEyeToNoseDist(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrColorf(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrHmdDesc(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrPoseStatef(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_TrackingStateData(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrMirrorTextureDesc(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrSessionStatus(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrInputState(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrPerfStats(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, &__pyx_n_s_keys, 0, 0, 0};
static PyObject *__pyx_int_0;
static PyObject *__pyx_int_1;
static PyObject *__pyx_int_2;
static PyObject *__pyx_int_4;
static PyObject *__pyx_int_neg_1;
static int __pyx_k__7;
static int __pyx_k__8;
static int __pyx_k__18;
static int __pyx_k__19;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
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__33;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_codeobj__34;
static PyObject *__pyx_codeobj__36;
static PyObject *__pyx_codeobj__38;
static PyObject *__pyx_codeobj__40;

/* "psychxr/ovr/capi.pyx":88
 * #
 * cdef ovr_errorcode.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):             # <<<<<<<<<<<<<<
 *     if ovr_errorcode.OVR_FAILURE(result):
 *         ovr_capi.ovr_GetLastErrorInfo(&_last_error_info_)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_1check_result(PyObject *__pyx_self, PyObject *__pyx_v_result); /*proto*/
static PyMethodDef __pyx_mdef_7psychxr_3ovr_4capi_1check_result = {"check_result", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_1check_result, METH_O, 0};
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_1check_result(PyObject *__pyx_self, PyObject *__pyx_v_result) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("check_result (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_check_result(__pyx_self, ((PyObject *)__pyx_v_result));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_check_result(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_result) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrResult __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  char *__pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("check_result", 0);

  /* "psychxr/ovr/capi.pyx":89
 * cdef ovr_errorcode.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):
 *     if ovr_errorcode.OVR_FAILURE(result):             # <<<<<<<<<<<<<<
 *         ovr_capi.ovr_GetLastErrorInfo(&_last_error_info_)
 *         raise RuntimeError(
 */
  __pyx_t_1 = __Pyx_PyInt_As_int32_t(__pyx_v_result); if (unlikely((__pyx_t_1 == ((ovrResult)-1)) && PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L1_error)
  __pyx_t_2 = (__pyx_f_7psychxr_3ovr_13ovr_errorcode_OVR_FAILURE(__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":90
 * def check_result(result):
 *     if ovr_errorcode.OVR_FAILURE(result):
 *         ovr_capi.ovr_GetLastErrorInfo(&_last_error_info_)             # <<<<<<<<<<<<<<
 *         raise RuntimeError(
 *             str(result) + ": " + _last_error_info_.ErrorString.decode("utf-8"))
 */
    ovr_GetLastErrorInfo((&__pyx_v_7psychxr_3ovr_4capi__last_error_info_));

    /* "psychxr/ovr/capi.pyx":92
 *         ovr_capi.ovr_GetLastErrorInfo(&_last_error_info_)
 *         raise RuntimeError(
 *             str(result) + ": " + _last_error_info_.ErrorString.decode("utf-8"))             # <<<<<<<<<<<<<<
 * 
 * # Enable error checking on OVRLib functions by setting 'debug_mode=True'. All
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_result);
    __Pyx_GIVEREF(__pyx_v_result);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_result);
    __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_5 = __pyx_v_7psychxr_3ovr_4capi__last_error_info_.ErrorString;
    __pyx_t_4 = __Pyx_decode_c_string(__pyx_t_5, 0, strlen(__pyx_t_5), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 92, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "psychxr/ovr/capi.pyx":91
 *     if ovr_errorcode.OVR_FAILURE(result):
 *         ovr_capi.ovr_GetLastErrorInfo(&_last_error_info_)
 *         raise RuntimeError(             # <<<<<<<<<<<<<<
 *             str(result) + ": " + _last_error_info_.ErrorString.decode("utf-8"))
 * 
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_6);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
    __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_6, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __PYX_ERR(0, 91, __pyx_L1_error)

    /* "psychxr/ovr/capi.pyx":89
 * cdef ovr_errorcode.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):
 *     if ovr_errorcode.OVR_FAILURE(result):             # <<<<<<<<<<<<<<
 *         ovr_capi.ovr_GetLastErrorInfo(&_last_error_info_)
 *         raise RuntimeError(
 */
  }

  /* "psychxr/ovr/capi.pyx":88
 * #
 * cdef ovr_errorcode.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):             # <<<<<<<<<<<<<<
 *     if ovr_errorcode.OVR_FAILURE(result):
 *         ovr_capi.ovr_GetLastErrorInfo(&_last_error_info_)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psychxr.ovr.capi.check_result", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":183
 *     cdef ovr_capi.ovrColorf  c_ovrColorf
 * 
 *     def __cinit__(self, float r=0.0, float g=0.0, float b=0.0, float a=0.0):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrColorf
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  float __pyx_v_r;
  float __pyx_v_g;
  float __pyx_v_b;
  float __pyx_v_a;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (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 (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_g);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__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, "__cinit__") < 0)) __PYX_ERR(0, 183, __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_r = __pyx_PyFloat_AsFloat(values[0]); if (unlikely((__pyx_v_r == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 183, __pyx_L3_error)
    } else {
      __pyx_v_r = ((float)0.0);
    }
    if (values[1]) {
      __pyx_v_g = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_g == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 183, __pyx_L3_error)
    } else {
      __pyx_v_g = ((float)0.0);
    }
    if (values[2]) {
      __pyx_v_b = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_b == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 183, __pyx_L3_error)
    } else {
      __pyx_v_b = ((float)0.0);
    }
    if (values[3]) {
      __pyx_v_a = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_a == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 183, __pyx_L3_error)
    } else {
      __pyx_v_a = ((float)0.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 183, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrColorf.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf___cinit__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self), __pyx_v_r, __pyx_v_g, __pyx_v_b, __pyx_v_a);

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

static int __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, float __pyx_v_r, float __pyx_v_g, float __pyx_v_b, float __pyx_v_a) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/ovr/capi.pyx":184
 * 
 *     def __cinit__(self, float r=0.0, float g=0.0, float b=0.0, float a=0.0):
 *         self.c_data = &self.c_ovrColorf             # <<<<<<<<<<<<<<
 * 
 *         self.c_data.r = r
 */
  __pyx_v_self->c_data = (&__pyx_v_self->c_ovrColorf);

  /* "psychxr/ovr/capi.pyx":186
 *         self.c_data = &self.c_ovrColorf
 * 
 *         self.c_data.r = r             # <<<<<<<<<<<<<<
 *         self.c_data.g = g
 *         self.c_data.b = b
 */
  __pyx_v_self->c_data->r = __pyx_v_r;

  /* "psychxr/ovr/capi.pyx":187
 * 
 *         self.c_data.r = r
 *         self.c_data.g = g             # <<<<<<<<<<<<<<
 *         self.c_data.b = b
 *         self.c_data.a = a
 */
  __pyx_v_self->c_data->g = __pyx_v_g;

  /* "psychxr/ovr/capi.pyx":188
 *         self.c_data.r = r
 *         self.c_data.g = g
 *         self.c_data.b = b             # <<<<<<<<<<<<<<
 *         self.c_data.a = a
 * 
 */
  __pyx_v_self->c_data->b = __pyx_v_b;

  /* "psychxr/ovr/capi.pyx":189
 *         self.c_data.g = g
 *         self.c_data.b = b
 *         self.c_data.a = a             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data->a = __pyx_v_a;

  /* "psychxr/ovr/capi.pyx":183
 *     cdef ovr_capi.ovrColorf  c_ovrColorf
 * 
 *     def __cinit__(self, float r=0.0, float g=0.0, float b=0.0, float a=0.0):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrColorf
 * 
 */

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

/* "psychxr/ovr/capi.pyx":192
 * 
 *     @property
 *     def r(self):             # <<<<<<<<<<<<<<
 *         return self.c_data.r
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1r_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1r_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1r___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1r___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":193
 *     @property
 *     def r(self):
 *         return self.c_data.r             # <<<<<<<<<<<<<<
 * 
 *     @r.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":192
 * 
 *     @property
 *     def r(self):             # <<<<<<<<<<<<<<
 *         return self.c_data.r
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrColorf.r.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":196
 * 
 *     @r.setter
 *     def r(self, float value):             # <<<<<<<<<<<<<<
 *         self.c_data.r = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1r_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1r_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  float __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsFloat(__pyx_arg_value); if (unlikely((__pyx_v_value == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 196, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrColorf.r.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1r_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self), ((float)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1r_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, float __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":197
 *     @r.setter
 *     def r(self, float value):
 *         self.c_data.r = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data->r = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":196
 * 
 *     @r.setter
 *     def r(self, float value):             # <<<<<<<<<<<<<<
 *         self.c_data.r = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":200
 * 
 *     @property
 *     def g(self):             # <<<<<<<<<<<<<<
 *         return self.c_data.g
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1g_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1g_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1g___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1g___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":201
 *     @property
 *     def g(self):
 *         return self.c_data.g             # <<<<<<<<<<<<<<
 * 
 *     @g.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->g); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":200
 * 
 *     @property
 *     def g(self):             # <<<<<<<<<<<<<<
 *         return self.c_data.g
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrColorf.g.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":204
 * 
 *     @g.setter
 *     def g(self, float value):             # <<<<<<<<<<<<<<
 *         self.c_data.g = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1g_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1g_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  float __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsFloat(__pyx_arg_value); if (unlikely((__pyx_v_value == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 204, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrColorf.g.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1g_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self), ((float)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1g_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, float __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":205
 *     @g.setter
 *     def g(self, float value):
 *         self.c_data.g = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data->g = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":204
 * 
 *     @g.setter
 *     def g(self, float value):             # <<<<<<<<<<<<<<
 *         self.c_data.g = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":208
 * 
 *     @property
 *     def b(self):             # <<<<<<<<<<<<<<
 *         return self.c_data.b
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1b_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1b_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1b___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1b___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":209
 *     @property
 *     def b(self):
 *         return self.c_data.b             # <<<<<<<<<<<<<<
 * 
 *     @b.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->b); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":208
 * 
 *     @property
 *     def b(self):             # <<<<<<<<<<<<<<
 *         return self.c_data.b
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrColorf.b.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":212
 * 
 *     @b.setter
 *     def b(self, float value):             # <<<<<<<<<<<<<<
 *         self.c_data.b = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1b_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1b_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  float __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsFloat(__pyx_arg_value); if (unlikely((__pyx_v_value == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrColorf.b.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1b_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self), ((float)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1b_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, float __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":213
 *     @b.setter
 *     def b(self, float value):
 *         self.c_data.b = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data->b = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":212
 * 
 *     @b.setter
 *     def b(self, float value):             # <<<<<<<<<<<<<<
 *         self.c_data.b = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":216
 * 
 *     @property
 *     def a(self):             # <<<<<<<<<<<<<<
 *         return self.c_data.a
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1a_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1a_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1a___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1a___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":217
 *     @property
 *     def a(self):
 *         return self.c_data.a             # <<<<<<<<<<<<<<
 * 
 *     @a.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->a); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":216
 * 
 *     @property
 *     def a(self):             # <<<<<<<<<<<<<<
 *         return self.c_data.a
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrColorf.a.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":220
 * 
 *     @a.setter
 *     def a(self, float value):             # <<<<<<<<<<<<<<
 *         self.c_data.a = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1a_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1a_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  float __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __pyx_PyFloat_AsFloat(__pyx_arg_value); if (unlikely((__pyx_v_value == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 220, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrColorf.a.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1a_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self), ((float)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_1a_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, float __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":221
 *     @a.setter
 *     def a(self, float value):
 *         self.c_data.a = value             # <<<<<<<<<<<<<<
 * 
 *     def as_tuple(self):
 */
  __pyx_v_self->c_data->a = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":220
 * 
 *     @a.setter
 *     def a(self, float value):             # <<<<<<<<<<<<<<
 *         self.c_data.a = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":223
 *         self.c_data.a = value
 * 
 *     def as_tuple(self):             # <<<<<<<<<<<<<<
 *         return self.c_data.r, self.c_data.g, self.c_data.b, self.c_data.a
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_3as_tuple(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_3as_tuple(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("as_tuple (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_2as_tuple(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_2as_tuple(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__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;
  __Pyx_RefNannySetupContext("as_tuple", 0);

  /* "psychxr/ovr/capi.pyx":224
 * 
 *     def as_tuple(self):
 *         return self.c_data.r, self.c_data.g, self.c_data.b, self.c_data.a             # <<<<<<<<<<<<<<
 * 
 * # ---------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_data->r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_self->c_data->g); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->c_data->b); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->c_data->a); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 224, __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_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":223
 *         self.c_data.a = value
 * 
 *     def as_tuple(self):             # <<<<<<<<<<<<<<
 *         return self.c_data.r, self.c_data.g, self.c_data.b, self.c_data.a
 * 
 */

  /* 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("psychxr.ovr.capi.ovrColorf.as_tuple", __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("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_5__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_7psychxr_3ovr_4capi_9ovrColorf_4__reduce_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__2, 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("psychxr.ovr.capi.ovrColorf.__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_7psychxr_3ovr_4capi_9ovrColorf_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_7__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_7psychxr_3ovr_4capi_9ovrColorf_6__setstate_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_9ovrColorf_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__3, 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("psychxr.ovr.capi.ovrColorf.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":236
 * # --------------------
 * #
 * def allocSwapChain(ovrTextureSwapChainDesc swap_desc):             # <<<<<<<<<<<<<<
 *     """Allocate a new swap chain object with the specified parameters. If
 *     successful, an integer is returned which is used to reference the swap
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_3allocSwapChain(PyObject *__pyx_self, PyObject *__pyx_v_swap_desc); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_2allocSwapChain[] = "Allocate a new swap chain object with the specified parameters. If\n    successful, an integer is returned which is used to reference the swap\n    chain. You can allocate up-to 32 swap chains.\n\n    :param width: int\n    :param height: int\n    :return: int\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_3ovr_4capi_3allocSwapChain = {"allocSwapChain", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_3allocSwapChain, METH_O, __pyx_doc_7psychxr_3ovr_4capi_2allocSwapChain};
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_3allocSwapChain(PyObject *__pyx_self, PyObject *__pyx_v_swap_desc) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("allocSwapChain (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_swap_desc), __pyx_ptype_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc, 1, "swap_desc", 0))) __PYX_ERR(0, 236, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_2allocSwapChain(__pyx_self, ((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_swap_desc));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_2allocSwapChain(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_swap_desc) {
  int __pyx_v_i;
  int __pyx_v_sc;
  ovrResult __pyx_v_result;
  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;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("allocSwapChain", 0);

  /* "psychxr/ovr/capi.pyx":249
 *     # get the first available swap chain, unallocated chains will test as NULL
 *     cdef int i, sc
 *     for i in range(32):             # <<<<<<<<<<<<<<
 *         if _swap_chain_[i] is NULL:
 *             sc = i
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 32; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "psychxr/ovr/capi.pyx":250
 *     cdef int i, sc
 *     for i in range(32):
 *         if _swap_chain_[i] is NULL:             # <<<<<<<<<<<<<<
 *             sc = i
 *             break
 */
    __pyx_t_2 = (((__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_i]) == NULL) != 0);
    if (__pyx_t_2) {

      /* "psychxr/ovr/capi.pyx":251
 *     for i in range(32):
 *         if _swap_chain_[i] is NULL:
 *             sc = i             # <<<<<<<<<<<<<<
 *             break
 *     else:
 */
      __pyx_v_sc = __pyx_v_i;

      /* "psychxr/ovr/capi.pyx":252
 *         if _swap_chain_[i] is NULL:
 *             sc = i
 *             break             # <<<<<<<<<<<<<<
 *     else:
 *         raise IndexError("Maximum number of swap chains initialized!")
 */
      goto __pyx_L4_break;

      /* "psychxr/ovr/capi.pyx":250
 *     cdef int i, sc
 *     for i in range(32):
 *         if _swap_chain_[i] is NULL:             # <<<<<<<<<<<<<<
 *             sc = i
 *             break
 */
    }
  }
  /*else*/ {

    /* "psychxr/ovr/capi.pyx":254
 *             break
 *     else:
 *         raise IndexError("Maximum number of swap chains initialized!")             # <<<<<<<<<<<<<<
 * 
 *     # create the swap chain
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __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, 254, __pyx_L1_error)
  }
  __pyx_L4_break:;

  /* "psychxr/ovr/capi.pyx":257
 * 
 *     # create the swap chain
 *     cdef ovr_capi.ovrResult result = ovr_capi_gl.ovr_CreateTextureSwapChainGL(             # <<<<<<<<<<<<<<
 *         _ptr_session_, &swap_desc.c_ovrTextureSwapChainDesc, &_swap_chain_[sc])
 * 
 */
  __pyx_v_result = ovr_CreateTextureSwapChainGL(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (&__pyx_v_swap_desc->c_ovrTextureSwapChainDesc), (&(__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_sc])));

  /* "psychxr/ovr/capi.pyx":260
 *         _ptr_session_, &swap_desc.c_ovrTextureSwapChainDesc, &_swap_chain_[sc])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":261
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 *     # return the handle
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 261, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 261, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "psychxr/ovr/capi.pyx":260
 *         _ptr_session_, &swap_desc.c_ovrTextureSwapChainDesc, &_swap_chain_[sc])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":264
 * 
 *     # return the handle
 *     return sc             # <<<<<<<<<<<<<<
 * 
 * # Free or destroy a swap chain. The handle will be made available after this
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_sc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":236
 * # --------------------
 * #
 * def allocSwapChain(ovrTextureSwapChainDesc swap_desc):             # <<<<<<<<<<<<<<
 *     """Allocate a new swap chain object with the specified parameters. If
 *     successful, an integer is returned which is used to reference the swap
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("psychxr.ovr.capi.allocSwapChain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":269
 * # call.
 * #
 * def freeSwapChain(int sc):             # <<<<<<<<<<<<<<
 *     """Free or destroy a swap chain. The handle will be made available after
 *     this call.
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_5freeSwapChain(PyObject *__pyx_self, PyObject *__pyx_arg_sc); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_4freeSwapChain[] = "Free or destroy a swap chain. The handle will be made available after\n    this call.\n\n    :param sc: int\n    :return:\n\n    ";
static PyMethodDef __pyx_mdef_7psychxr_3ovr_4capi_5freeSwapChain = {"freeSwapChain", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_5freeSwapChain, METH_O, __pyx_doc_7psychxr_3ovr_4capi_4freeSwapChain};
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_5freeSwapChain(PyObject *__pyx_self, PyObject *__pyx_arg_sc) {
  int __pyx_v_sc;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("freeSwapChain (wrapper)", 0);
  assert(__pyx_arg_sc); {
    __pyx_v_sc = __Pyx_PyInt_As_int(__pyx_arg_sc); if (unlikely((__pyx_v_sc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.freeSwapChain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_4freeSwapChain(__pyx_self, ((int)__pyx_v_sc));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_4freeSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_sc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("freeSwapChain", 0);

  /* "psychxr/ovr/capi.pyx":278
 *     """
 *     global _swap_chain_, _ptr_session_
 *     ovr_capi.ovr_DestroyTextureSwapChain(_ptr_session_, _swap_chain_[sc])             # <<<<<<<<<<<<<<
 *     _swap_chain_[sc] = NULL
 * 
 */
  ovr_DestroyTextureSwapChain(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_sc]));

  /* "psychxr/ovr/capi.pyx":279
 *     global _swap_chain_, _ptr_session_
 *     ovr_capi.ovr_DestroyTextureSwapChain(_ptr_session_, _swap_chain_[sc])
 *     _swap_chain_[sc] = NULL             # <<<<<<<<<<<<<<
 * 
 * # Get the next available texture in the specified swap chain. Use the returned
 */
  (__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_sc]) = NULL;

  /* "psychxr/ovr/capi.pyx":269
 * # call.
 * #
 * def freeSwapChain(int sc):             # <<<<<<<<<<<<<<
 *     """Free or destroy a swap chain. The handle will be made available after
 *     this call.
 */

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

/* "psychxr/ovr/capi.pyx":284
 * # value as a frame buffer texture.
 * #
 * def getTextureSwapChainBufferGL(int sc):             # <<<<<<<<<<<<<<
 *     cdef int current_idx = 0
 *     cdef unsigned int tex_id = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_7getTextureSwapChainBufferGL(PyObject *__pyx_self, PyObject *__pyx_arg_sc); /*proto*/
static PyMethodDef __pyx_mdef_7psychxr_3ovr_4capi_7getTextureSwapChainBufferGL = {"getTextureSwapChainBufferGL", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_7getTextureSwapChainBufferGL, METH_O, 0};
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_7getTextureSwapChainBufferGL(PyObject *__pyx_self, PyObject *__pyx_arg_sc) {
  int __pyx_v_sc;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTextureSwapChainBufferGL (wrapper)", 0);
  assert(__pyx_arg_sc); {
    __pyx_v_sc = __Pyx_PyInt_As_int(__pyx_arg_sc); if (unlikely((__pyx_v_sc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 284, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getTextureSwapChainBufferGL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_6getTextureSwapChainBufferGL(__pyx_self, ((int)__pyx_v_sc));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_6getTextureSwapChainBufferGL(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_sc) {
  int __pyx_v_current_idx;
  unsigned int __pyx_v_tex_id;
  ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getTextureSwapChainBufferGL", 0);

  /* "psychxr/ovr/capi.pyx":285
 * #
 * def getTextureSwapChainBufferGL(int sc):
 *     cdef int current_idx = 0             # <<<<<<<<<<<<<<
 *     cdef unsigned int tex_id = 0
 *     cdef ovr_capi.ovrResult result
 */
  __pyx_v_current_idx = 0;

  /* "psychxr/ovr/capi.pyx":286
 * def getTextureSwapChainBufferGL(int sc):
 *     cdef int current_idx = 0
 *     cdef unsigned int tex_id = 0             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result
 * 
 */
  __pyx_v_tex_id = 0;

  /* "psychxr/ovr/capi.pyx":292
 * 
 *     # get the current texture index within the swap chain
 *     result = ovr_capi.ovr_GetTextureSwapChainCurrentIndex(             # <<<<<<<<<<<<<<
 *         _ptr_session_, _swap_chain_[sc], &current_idx)
 * 
 */
  __pyx_v_result = ovr_GetTextureSwapChainCurrentIndex(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_sc]), (&__pyx_v_current_idx));

  /* "psychxr/ovr/capi.pyx":295
 *         _ptr_session_, _swap_chain_[sc], &current_idx)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 295, __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, 295, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":296
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 *     # get the next available texture ID from the swap chain
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 296, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":295
 *         _ptr_session_, _swap_chain_[sc], &current_idx)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":299
 * 
 *     # get the next available texture ID from the swap chain
 *     result = ovr_capi_gl.ovr_GetTextureSwapChainBufferGL(             # <<<<<<<<<<<<<<
 *         _ptr_session_, _swap_chain_[sc], current_idx, &tex_id)
 * 
 */
  __pyx_v_result = ovr_GetTextureSwapChainBufferGL(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_sc]), __pyx_v_current_idx, (&__pyx_v_tex_id));

  /* "psychxr/ovr/capi.pyx":302
 *         _ptr_session_, _swap_chain_[sc], current_idx, &tex_id)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __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, 302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":303
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 *     return tex_id
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(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);
      }
    }
    if (!__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else
      #endif
      {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_6);
        __pyx_t_6 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":302
 *         _ptr_session_, _swap_chain_[sc], current_idx, &tex_id)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":305
 *         check_result(result)
 * 
 *     return tex_id             # <<<<<<<<<<<<<<
 * 
 * # -----------------
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_tex_id); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 305, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":284
 * # value as a frame buffer texture.
 * #
 * def getTextureSwapChainBufferGL(int sc):             # <<<<<<<<<<<<<<
 *     cdef int current_idx = 0
 *     cdef unsigned int tex_id = 0
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psychxr.ovr.capi.getTextureSwapChainBufferGL", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":311
 * # -----------------
 * #
 * cpdef bint isOculusServiceRunning(int timeout_milliseconds=100):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi_util.ovrDetectResult result = ovr_capi_util.ovr_Detect(
 *         timeout_milliseconds)
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9isOculusServiceRunning(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_isOculusServiceRunning(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_isOculusServiceRunning *__pyx_optional_args) {
  int __pyx_v_timeout_milliseconds = ((int)0x64);
  ovrDetectResult __pyx_v_result;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isOculusServiceRunning", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_timeout_milliseconds = __pyx_optional_args->timeout_milliseconds;
    }
  }

  /* "psychxr/ovr/capi.pyx":312
 * #
 * cpdef bint isOculusServiceRunning(int timeout_milliseconds=100):
 *     cdef ovr_capi_util.ovrDetectResult result = ovr_capi_util.ovr_Detect(             # <<<<<<<<<<<<<<
 *         timeout_milliseconds)
 * 
 */
  __pyx_v_result = ovr_Detect(__pyx_v_timeout_milliseconds);

  /* "psychxr/ovr/capi.pyx":315
 *         timeout_milliseconds)
 * 
 *     return <bint>result.IsOculusServiceRunning             # <<<<<<<<<<<<<<
 * 
 * cpdef bint isHmdConnected(int timeout_milliseconds=100):
 */
  __pyx_r = (__pyx_v_result.IsOculusServiceRunning != 0);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":311
 * # -----------------
 * #
 * cpdef bint isOculusServiceRunning(int timeout_milliseconds=100):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi_util.ovrDetectResult result = ovr_capi_util.ovr_Detect(
 *         timeout_milliseconds)
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9isOculusServiceRunning(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_9isOculusServiceRunning(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_timeout_milliseconds;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isOculusServiceRunning (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout_milliseconds,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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeout_milliseconds);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isOculusServiceRunning") < 0)) __PYX_ERR(0, 311, __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_timeout_milliseconds = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout_milliseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 311, __pyx_L3_error)
    } else {
      __pyx_v_timeout_milliseconds = ((int)0x64);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isOculusServiceRunning", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 311, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.isOculusServiceRunning", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_8isOculusServiceRunning(__pyx_self, __pyx_v_timeout_milliseconds);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_8isOculusServiceRunning(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_timeout_milliseconds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_isOculusServiceRunning __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("isOculusServiceRunning", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.timeout_milliseconds = __pyx_v_timeout_milliseconds;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_isOculusServiceRunning(0, &__pyx_t_2); 
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.isOculusServiceRunning", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":317
 *     return <bint>result.IsOculusServiceRunning
 * 
 * cpdef bint isHmdConnected(int timeout_milliseconds=100):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi_util.ovrDetectResult result = ovr_capi_util.ovr_Detect(
 *         timeout_milliseconds)
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_11isHmdConnected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_isHmdConnected(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_isHmdConnected *__pyx_optional_args) {
  int __pyx_v_timeout_milliseconds = ((int)0x64);
  ovrDetectResult __pyx_v_result;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isHmdConnected", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_timeout_milliseconds = __pyx_optional_args->timeout_milliseconds;
    }
  }

  /* "psychxr/ovr/capi.pyx":318
 * 
 * cpdef bint isHmdConnected(int timeout_milliseconds=100):
 *     cdef ovr_capi_util.ovrDetectResult result = ovr_capi_util.ovr_Detect(             # <<<<<<<<<<<<<<
 *         timeout_milliseconds)
 * 
 */
  __pyx_v_result = ovr_Detect(__pyx_v_timeout_milliseconds);

  /* "psychxr/ovr/capi.pyx":321
 *         timeout_milliseconds)
 * 
 *     return <bint>result.IsOculusHMDConnected             # <<<<<<<<<<<<<<
 * 
 * cpdef void startSession():
 */
  __pyx_r = (__pyx_v_result.IsOculusHMDConnected != 0);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":317
 *     return <bint>result.IsOculusServiceRunning
 * 
 * cpdef bint isHmdConnected(int timeout_milliseconds=100):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi_util.ovrDetectResult result = ovr_capi_util.ovr_Detect(
 *         timeout_milliseconds)
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_11isHmdConnected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_11isHmdConnected(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_timeout_milliseconds;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isHmdConnected (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_timeout_milliseconds,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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_timeout_milliseconds);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isHmdConnected") < 0)) __PYX_ERR(0, 317, __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_timeout_milliseconds = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_timeout_milliseconds == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 317, __pyx_L3_error)
    } else {
      __pyx_v_timeout_milliseconds = ((int)0x64);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("isHmdConnected", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 317, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.isHmdConnected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10isHmdConnected(__pyx_self, __pyx_v_timeout_milliseconds);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10isHmdConnected(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_timeout_milliseconds) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_isHmdConnected __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("isHmdConnected", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.timeout_milliseconds = __pyx_v_timeout_milliseconds;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_isHmdConnected(0, &__pyx_t_2); 
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.isHmdConnected", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":323
 *     return <bint>result.IsOculusHMDConnected
 * 
 * cpdef void startSession():             # <<<<<<<<<<<<<<
 *     """Start a new session. Control is handed over to the application from
 *     Oculus Home.
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13startSession(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_startSession(CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrResult __pyx_v_result;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("startSession", 0);

  /* "psychxr/ovr/capi.pyx":331
 *     """
 *     global _ptr_session_
 *     cdef ovr_capi.ovrResult result = 0             # <<<<<<<<<<<<<<
 *     result = ovr_capi.ovr_Initialize(NULL)
 *     result = ovr_capi.ovr_Create(&_ptr_session_, &_ptr_luid_)
 */
  __pyx_v_result = 0;

  /* "psychxr/ovr/capi.pyx":332
 *     global _ptr_session_
 *     cdef ovr_capi.ovrResult result = 0
 *     result = ovr_capi.ovr_Initialize(NULL)             # <<<<<<<<<<<<<<
 *     result = ovr_capi.ovr_Create(&_ptr_session_, &_ptr_luid_)
 *     if ovr_errorcode.OVR_FAILURE(result):
 */
  __pyx_v_result = ovr_Initialize(NULL);

  /* "psychxr/ovr/capi.pyx":333
 *     cdef ovr_capi.ovrResult result = 0
 *     result = ovr_capi.ovr_Initialize(NULL)
 *     result = ovr_capi.ovr_Create(&_ptr_session_, &_ptr_luid_)             # <<<<<<<<<<<<<<
 *     if ovr_errorcode.OVR_FAILURE(result):
 *         ovr_capi.ovr_Shutdown()
 */
  __pyx_v_result = ovr_Create((&__pyx_v_7psychxr_3ovr_4capi__ptr_session_), (&__pyx_v_7psychxr_3ovr_4capi__ptr_luid_));

  /* "psychxr/ovr/capi.pyx":334
 *     result = ovr_capi.ovr_Initialize(NULL)
 *     result = ovr_capi.ovr_Create(&_ptr_session_, &_ptr_luid_)
 *     if ovr_errorcode.OVR_FAILURE(result):             # <<<<<<<<<<<<<<
 *         ovr_capi.ovr_Shutdown()
 * 
 */
  __pyx_t_1 = (__pyx_f_7psychxr_3ovr_13ovr_errorcode_OVR_FAILURE(__pyx_v_result) != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":335
 *     result = ovr_capi.ovr_Create(&_ptr_session_, &_ptr_luid_)
 *     if ovr_errorcode.OVR_FAILURE(result):
 *         ovr_capi.ovr_Shutdown()             # <<<<<<<<<<<<<<
 * 
 *     # get HMD descriptor
 */
    ovr_Shutdown();

    /* "psychxr/ovr/capi.pyx":334
 *     result = ovr_capi.ovr_Initialize(NULL)
 *     result = ovr_capi.ovr_Create(&_ptr_session_, &_ptr_luid_)
 *     if ovr_errorcode.OVR_FAILURE(result):             # <<<<<<<<<<<<<<
 *         ovr_capi.ovr_Shutdown()
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":339
 *     # get HMD descriptor
 *     global _hmdDesc_
 *     _hmdDesc_ = ovr_capi.ovr_GetHmdDesc(_ptr_session_)             # <<<<<<<<<<<<<<
 * 
 *     # configure VR data with HMD descriptor information
 */
  __pyx_v_7psychxr_3ovr_4capi__hmdDesc_ = ovr_GetHmdDesc(__pyx_v_7psychxr_3ovr_4capi__ptr_session_);

  /* "psychxr/ovr/capi.pyx":352
 *     # prepare the render layer
 *     global _eye_layer_
 *     _eye_layer_.Header.Type = ovr_capi.ovrLayerType_EyeFov             # <<<<<<<<<<<<<<
 *     _eye_layer_.Header.Flags = \
 *         ovr_capi.ovrLayerFlag_TextureOriginAtBottomLeft | \
 */
  __pyx_v_7psychxr_3ovr_4capi__eye_layer_.Header.Type = ovrLayerType_EyeFov;

  /* "psychxr/ovr/capi.pyx":353
 *     global _eye_layer_
 *     _eye_layer_.Header.Type = ovr_capi.ovrLayerType_EyeFov
 *     _eye_layer_.Header.Flags = \             # <<<<<<<<<<<<<<
 *         ovr_capi.ovrLayerFlag_TextureOriginAtBottomLeft | \
 *         ovr_capi.ovrLayerFlag_HighQuality
 */
  __pyx_v_7psychxr_3ovr_4capi__eye_layer_.Header.Flags = (ovrLayerFlag_TextureOriginAtBottomLeft | ovrLayerFlag_HighQuality);

  /* "psychxr/ovr/capi.pyx":356
 *         ovr_capi.ovrLayerFlag_TextureOriginAtBottomLeft | \
 *         ovr_capi.ovrLayerFlag_HighQuality
 *     _eye_layer_.ColorTexture[0] = NULL             # <<<<<<<<<<<<<<
 *     _eye_layer_.ColorTexture[1] = NULL
 * 
 */
  (__pyx_v_7psychxr_3ovr_4capi__eye_layer_.ColorTexture[0]) = NULL;

  /* "psychxr/ovr/capi.pyx":357
 *         ovr_capi.ovrLayerFlag_HighQuality
 *     _eye_layer_.ColorTexture[0] = NULL
 *     _eye_layer_.ColorTexture[1] = NULL             # <<<<<<<<<<<<<<
 * 
 *     # setup layer FOV settings, these are computed earlier
 */
  (__pyx_v_7psychxr_3ovr_4capi__eye_layer_.ColorTexture[1]) = NULL;

  /* "psychxr/ovr/capi.pyx":323
 *     return <bint>result.IsOculusHMDConnected
 * 
 * cpdef void startSession():             # <<<<<<<<<<<<<<
 *     """Start a new session. Control is handed over to the application from
 *     Oculus Home.
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13startSession(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_12startSession[] = "Start a new session. Control is handed over to the application from\n    Oculus Home. \n    \n    :return: None \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13startSession(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("startSession (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_12startSession(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12startSession(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("startSession", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_startSession(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":363
 *     #_eye_layer_.Fov[1] = _eye_render_desc_[1].Fov
 * 
 * cpdef void endSession():             # <<<<<<<<<<<<<<
 *     """End the current session.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_15endSession(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_endSession(CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("endSession", 0);

  /* "psychxr/ovr/capi.pyx":375
 *     # free all swap chains
 *     global _ptr_session_, _swap_chain_, _mirror_texture_
 *     cdef int i = 0             # <<<<<<<<<<<<<<
 *     for i in range(32):
 *         if not _swap_chain_[i] is NULL:
 */
  __pyx_v_i = 0;

  /* "psychxr/ovr/capi.pyx":376
 *     global _ptr_session_, _swap_chain_, _mirror_texture_
 *     cdef int i = 0
 *     for i in range(32):             # <<<<<<<<<<<<<<
 *         if not _swap_chain_[i] is NULL:
 *             ovr_capi.ovr_DestroyTextureSwapChain(
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 32; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "psychxr/ovr/capi.pyx":377
 *     cdef int i = 0
 *     for i in range(32):
 *         if not _swap_chain_[i] is NULL:             # <<<<<<<<<<<<<<
 *             ovr_capi.ovr_DestroyTextureSwapChain(
 *                 _ptr_session_, _swap_chain_[i])
 */
    __pyx_t_2 = (((__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_i]) != NULL) != 0);
    if (__pyx_t_2) {

      /* "psychxr/ovr/capi.pyx":378
 *     for i in range(32):
 *         if not _swap_chain_[i] is NULL:
 *             ovr_capi.ovr_DestroyTextureSwapChain(             # <<<<<<<<<<<<<<
 *                 _ptr_session_, _swap_chain_[i])
 *             _swap_chain_[i] = NULL
 */
      ovr_DestroyTextureSwapChain(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_i]));

      /* "psychxr/ovr/capi.pyx":380
 *             ovr_capi.ovr_DestroyTextureSwapChain(
 *                 _ptr_session_, _swap_chain_[i])
 *             _swap_chain_[i] = NULL             # <<<<<<<<<<<<<<
 * 
 *     # destroy the mirror texture
 */
      (__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_i]) = NULL;

      /* "psychxr/ovr/capi.pyx":377
 *     cdef int i = 0
 *     for i in range(32):
 *         if not _swap_chain_[i] is NULL:             # <<<<<<<<<<<<<<
 *             ovr_capi.ovr_DestroyTextureSwapChain(
 *                 _ptr_session_, _swap_chain_[i])
 */
    }
  }

  /* "psychxr/ovr/capi.pyx":383
 * 
 *     # destroy the mirror texture
 *     ovr_capi.ovr_DestroyMirrorTexture(_ptr_session_, _mirror_texture_)             # <<<<<<<<<<<<<<
 * 
 *     # destroy the current session and shutdown
 */
  ovr_DestroyMirrorTexture(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, __pyx_v_7psychxr_3ovr_4capi__mirror_texture_);

  /* "psychxr/ovr/capi.pyx":386
 * 
 *     # destroy the current session and shutdown
 *     ovr_capi.ovr_Destroy(_ptr_session_)             # <<<<<<<<<<<<<<
 *     ovr_capi.ovr_Shutdown()
 * 
 */
  ovr_Destroy(__pyx_v_7psychxr_3ovr_4capi__ptr_session_);

  /* "psychxr/ovr/capi.pyx":387
 *     # destroy the current session and shutdown
 *     ovr_capi.ovr_Destroy(_ptr_session_)
 *     ovr_capi.ovr_Shutdown()             # <<<<<<<<<<<<<<
 * 
 * cdef class ovrHmdDesc(object):
 */
  ovr_Shutdown();

  /* "psychxr/ovr/capi.pyx":363
 *     #_eye_layer_.Fov[1] = _eye_render_desc_[1].Fov
 * 
 * cpdef void endSession():             # <<<<<<<<<<<<<<
 *     """End the current session.
 * 
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_15endSession(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_14endSession[] = "End the current session. \n    \n    Clean-up routines are executed that destroy all swap chains and mirror \n    texture buffers, afterwards control is returned to Oculus Home. This must be \n    called after every successful 'create_session' call.\n    \n    :return: None \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_15endSession(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("endSession (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_14endSession(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_14endSession(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("endSession", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_endSession(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":392
 *     cdef ovr_capi.ovrHmdDesc c_ovrHmdDesc
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc___cinit__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static int __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc___cinit__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

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

/* "psychxr/ovr/capi.pyx":396
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_data[0].Type
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_4type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_4type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_4type___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_4type___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":397
 *     @property
 *     def type(self):
 *         return <int>self.c_data[0].Type             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_c_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __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, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":396
 * 
 *     @property
 *     def type(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_data[0].Type
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":400
 * 
 *     @property
 *     def ProductName(self):             # <<<<<<<<<<<<<<
 *         return self.c_ovrHmdDesc.ProductName.decode('utf-8')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_11ProductName_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_11ProductName_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_11ProductName___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_11ProductName___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":401
 *     @property
 *     def ProductName(self):
 *         return self.c_ovrHmdDesc.ProductName.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->c_ovrHmdDesc.ProductName;
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":400
 * 
 *     @property
 *     def ProductName(self):             # <<<<<<<<<<<<<<
 *         return self.c_ovrHmdDesc.ProductName.decode('utf-8')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.ProductName.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":404
 * 
 *     @property
 *     def Manufacturer(self):             # <<<<<<<<<<<<<<
 *         return self.c_ovrHmdDesc.Manufacturer.decode('utf-8')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_12Manufacturer_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_12Manufacturer_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_12Manufacturer___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_12Manufacturer___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":405
 *     @property
 *     def Manufacturer(self):
 *         return self.c_ovrHmdDesc.Manufacturer.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->c_ovrHmdDesc.Manufacturer;
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":404
 * 
 *     @property
 *     def Manufacturer(self):             # <<<<<<<<<<<<<<
 *         return self.c_ovrHmdDesc.Manufacturer.decode('utf-8')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.Manufacturer.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":408
 * 
 *     @property
 *     def VendorId(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.VendorId
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_8VendorId_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_8VendorId_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_8VendorId___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_8VendorId___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":409
 *     @property
 *     def VendorId(self):
 *         return <int>self.c_ovrHmdDesc.VendorId             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrHmdDesc.VendorId)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":408
 * 
 *     @property
 *     def VendorId(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.VendorId
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.VendorId.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":412
 * 
 *     @property
 *     def ProductId(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.ProductId
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_9ProductId_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_9ProductId_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_9ProductId___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_9ProductId___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":413
 *     @property
 *     def ProductId(self):
 *         return <int>self.c_ovrHmdDesc.ProductId             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrHmdDesc.ProductId)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":412
 * 
 *     @property
 *     def ProductId(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.ProductId
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.ProductId.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":416
 * 
 *     @property
 *     def SerialNumber(self):             # <<<<<<<<<<<<<<
 *         return self.c_ovrHmdDesc.SerialNumber.decode('utf-8')
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_12SerialNumber_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_12SerialNumber_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_12SerialNumber___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_12SerialNumber___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":417
 *     @property
 *     def SerialNumber(self):
 *         return self.c_ovrHmdDesc.SerialNumber.decode('utf-8')             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_v_self->c_ovrHmdDesc.SerialNumber;
  __pyx_t_2 = __Pyx_decode_c_string(__pyx_t_1, 0, strlen(__pyx_t_1), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":416
 * 
 *     @property
 *     def SerialNumber(self):             # <<<<<<<<<<<<<<
 *         return self.c_ovrHmdDesc.SerialNumber.decode('utf-8')
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.SerialNumber.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":420
 * 
 *     @property
 *     def FirmwareMajor(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.FirmwareMajor
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMajor_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMajor_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMajor___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMajor___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":421
 *     @property
 *     def FirmwareMajor(self):
 *         return <int>self.c_ovrHmdDesc.FirmwareMajor             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrHmdDesc.FirmwareMajor)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":420
 * 
 *     @property
 *     def FirmwareMajor(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.FirmwareMajor
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.FirmwareMajor.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":424
 * 
 *     @property
 *     def FirmwareMinor(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.FirmwareMinor
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMinor_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMinor_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMinor___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMinor___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":425
 *     @property
 *     def FirmwareMinor(self):
 *         return <int>self.c_ovrHmdDesc.FirmwareMinor             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrHmdDesc.FirmwareMinor)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":424
 * 
 *     @property
 *     def FirmwareMinor(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.FirmwareMinor
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.FirmwareMinor.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":428
 * 
 *     @property
 *     def AvailableHmdCaps(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.AvailableHmdCaps
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_16AvailableHmdCaps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_16AvailableHmdCaps_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_16AvailableHmdCaps___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_16AvailableHmdCaps___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":429
 *     @property
 *     def AvailableHmdCaps(self):
 *         return <int>self.c_ovrHmdDesc.AvailableHmdCaps             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrHmdDesc.AvailableHmdCaps)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 429, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":428
 * 
 *     @property
 *     def AvailableHmdCaps(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.AvailableHmdCaps
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.AvailableHmdCaps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":432
 * 
 *     @property
 *     def DefaultHmdCaps(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.DefaultHmdCaps
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_14DefaultHmdCaps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_14DefaultHmdCaps_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_14DefaultHmdCaps___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_14DefaultHmdCaps___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":433
 *     @property
 *     def DefaultHmdCaps(self):
 *         return <int>self.c_ovrHmdDesc.DefaultHmdCaps             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrHmdDesc.DefaultHmdCaps)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":432
 * 
 *     @property
 *     def DefaultHmdCaps(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.DefaultHmdCaps
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.DefaultHmdCaps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":436
 * 
 *     @property
 *     def AvailableTrackingCaps(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.AvailableTrackingCaps
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_21AvailableTrackingCaps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_21AvailableTrackingCaps_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_21AvailableTrackingCaps___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_21AvailableTrackingCaps___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":437
 *     @property
 *     def AvailableTrackingCaps(self):
 *         return <int>self.c_ovrHmdDesc.AvailableTrackingCaps             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrHmdDesc.AvailableTrackingCaps)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":436
 * 
 *     @property
 *     def AvailableTrackingCaps(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.AvailableTrackingCaps
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.AvailableTrackingCaps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":440
 * 
 *     @property
 *     def DefaultTrackingCaps(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.DefaultTrackingCaps
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_19DefaultTrackingCaps_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_19DefaultTrackingCaps_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_19DefaultTrackingCaps___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_19DefaultTrackingCaps___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":441
 *     @property
 *     def DefaultTrackingCaps(self):
 *         return <int>self.c_ovrHmdDesc.DefaultTrackingCaps             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrHmdDesc.DefaultTrackingCaps)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 441, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":440
 * 
 *     @property
 *     def DefaultTrackingCaps(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrHmdDesc.DefaultTrackingCaps
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.DefaultTrackingCaps.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":444
 * 
 *     @property
 *     def DefaultEyeFov(self):             # <<<<<<<<<<<<<<
 *         cdef ovrFovPort default_fov_left = ovrFovPort()
 *         cdef ovrFovPort default_fov_right = ovrFovPort()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_13DefaultEyeFov_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_13DefaultEyeFov_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_13DefaultEyeFov___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_13DefaultEyeFov___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_default_fov_left = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_default_fov_right = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":445
 *     @property
 *     def DefaultEyeFov(self):
 *         cdef ovrFovPort default_fov_left = ovrFovPort()             # <<<<<<<<<<<<<<
 *         cdef ovrFovPort default_fov_right = ovrFovPort()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrFovPort), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_default_fov_left = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":446
 *     def DefaultEyeFov(self):
 *         cdef ovrFovPort default_fov_left = ovrFovPort()
 *         cdef ovrFovPort default_fov_right = ovrFovPort()             # <<<<<<<<<<<<<<
 * 
 *         (<ovrFovPort>default_fov_left).c_data[0] = \
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrFovPort), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_default_fov_right = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":448
 *         cdef ovrFovPort default_fov_right = ovrFovPort()
 * 
 *         (<ovrFovPort>default_fov_left).c_data[0] = \             # <<<<<<<<<<<<<<
 *             self.c_ovrHmdDesc.DefaultEyeFov[0]
 *         (<ovrFovPort>default_fov_right).c_data[0] = \
 */
  (__pyx_v_default_fov_left->c_data[0]) = (__pyx_v_self->c_ovrHmdDesc.DefaultEyeFov[0]);

  /* "psychxr/ovr/capi.pyx":450
 *         (<ovrFovPort>default_fov_left).c_data[0] = \
 *             self.c_ovrHmdDesc.DefaultEyeFov[0]
 *         (<ovrFovPort>default_fov_right).c_data[0] = \             # <<<<<<<<<<<<<<
 *             self.c_ovrHmdDesc.DefaultEyeFov[1]
 * 
 */
  (__pyx_v_default_fov_right->c_data[0]) = (__pyx_v_self->c_ovrHmdDesc.DefaultEyeFov[1]);

  /* "psychxr/ovr/capi.pyx":453
 *             self.c_ovrHmdDesc.DefaultEyeFov[1]
 * 
 *         return default_fov_left, default_fov_right             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 453, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_default_fov_left));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_default_fov_left));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_default_fov_left));
  __Pyx_INCREF(((PyObject *)__pyx_v_default_fov_right));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_default_fov_right));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_default_fov_right));
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":444
 * 
 *     @property
 *     def DefaultEyeFov(self):             # <<<<<<<<<<<<<<
 *         cdef ovrFovPort default_fov_left = ovrFovPort()
 *         cdef ovrFovPort default_fov_right = ovrFovPort()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.DefaultEyeFov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_default_fov_left);
  __Pyx_XDECREF((PyObject *)__pyx_v_default_fov_right);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":456
 * 
 *     @property
 *     def MaxEyeFov(self):             # <<<<<<<<<<<<<<
 *         cdef ovrFovPort max_fov_left = ovrFovPort()
 *         cdef ovrFovPort max_fov_right = ovrFovPort()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_9MaxEyeFov_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_9MaxEyeFov_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_9MaxEyeFov___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_9MaxEyeFov___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_max_fov_left = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_max_fov_right = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":457
 *     @property
 *     def MaxEyeFov(self):
 *         cdef ovrFovPort max_fov_left = ovrFovPort()             # <<<<<<<<<<<<<<
 *         cdef ovrFovPort max_fov_right = ovrFovPort()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrFovPort), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_max_fov_left = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":458
 *     def MaxEyeFov(self):
 *         cdef ovrFovPort max_fov_left = ovrFovPort()
 *         cdef ovrFovPort max_fov_right = ovrFovPort()             # <<<<<<<<<<<<<<
 * 
 *         (<ovrFovPort>max_fov_left).c_data[0] = self.c_ovrHmdDesc.MaxEyeFov[0]
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrFovPort), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_max_fov_right = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":460
 *         cdef ovrFovPort max_fov_right = ovrFovPort()
 * 
 *         (<ovrFovPort>max_fov_left).c_data[0] = self.c_ovrHmdDesc.MaxEyeFov[0]             # <<<<<<<<<<<<<<
 *         (<ovrFovPort>max_fov_right).c_data[0] = self.c_ovrHmdDesc.MaxEyeFov[1]
 * 
 */
  (__pyx_v_max_fov_left->c_data[0]) = (__pyx_v_self->c_ovrHmdDesc.MaxEyeFov[0]);

  /* "psychxr/ovr/capi.pyx":461
 * 
 *         (<ovrFovPort>max_fov_left).c_data[0] = self.c_ovrHmdDesc.MaxEyeFov[0]
 *         (<ovrFovPort>max_fov_right).c_data[0] = self.c_ovrHmdDesc.MaxEyeFov[1]             # <<<<<<<<<<<<<<
 * 
 *         return max_fov_left, max_fov_right
 */
  (__pyx_v_max_fov_right->c_data[0]) = (__pyx_v_self->c_ovrHmdDesc.MaxEyeFov[1]);

  /* "psychxr/ovr/capi.pyx":463
 *         (<ovrFovPort>max_fov_right).c_data[0] = self.c_ovrHmdDesc.MaxEyeFov[1]
 * 
 *         return max_fov_left, max_fov_right             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_max_fov_left));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_max_fov_left));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_max_fov_left));
  __Pyx_INCREF(((PyObject *)__pyx_v_max_fov_right));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_max_fov_right));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_max_fov_right));
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":456
 * 
 *     @property
 *     def MaxEyeFov(self):             # <<<<<<<<<<<<<<
 *         cdef ovrFovPort max_fov_left = ovrFovPort()
 *         cdef ovrFovPort max_fov_right = ovrFovPort()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.MaxEyeFov.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_max_fov_left);
  __Pyx_XDECREF((PyObject *)__pyx_v_max_fov_right);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":466
 * 
 *     @property
 *     def Resolution(self):             # <<<<<<<<<<<<<<
 *         cdef ovr_capi.ovrSizei resolution = self.c_ovrHmdDesc.Resolution
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_10Resolution_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_10Resolution_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_10Resolution___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_10Resolution___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  ovrSizei __pyx_v_resolution;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrSizei __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":467
 *     @property
 *     def Resolution(self):
 *         cdef ovr_capi.ovrSizei resolution = self.c_ovrHmdDesc.Resolution             # <<<<<<<<<<<<<<
 * 
 *         return resolution.x, resolution.y
 */
  __pyx_t_1 = __pyx_v_self->c_ovrHmdDesc.Resolution;
  __pyx_v_resolution = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":469
 *         cdef ovr_capi.ovrSizei resolution = self.c_ovrHmdDesc.Resolution
 * 
 *         return resolution.x, resolution.y             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = __pyx_convert__to_py_ovrSizei(__pyx_v_resolution); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __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, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __pyx_convert__to_py_ovrSizei(__pyx_v_resolution); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __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_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":466
 * 
 *     @property
 *     def Resolution(self):             # <<<<<<<<<<<<<<
 *         cdef ovr_capi.ovrSizei resolution = self.c_ovrHmdDesc.Resolution
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.Resolution.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":472
 * 
 *     @property
 *     def DisplayRefreshRate(self):             # <<<<<<<<<<<<<<
 *         return self.c_ovrHmdDesc.DisplayRefreshRate
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_18DisplayRefreshRate_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_18DisplayRefreshRate_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_18DisplayRefreshRate___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_18DisplayRefreshRate___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":473
 *     @property
 *     def DisplayRefreshRate(self):
 *         return self.c_ovrHmdDesc.DisplayRefreshRate             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->c_ovrHmdDesc.DisplayRefreshRate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":472
 * 
 *     @property
 *     def DisplayRefreshRate(self):             # <<<<<<<<<<<<<<
 *         return self.c_ovrHmdDesc.DisplayRefreshRate
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrHmdDesc.DisplayRefreshRate.__get__", __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("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_3__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_7psychxr_3ovr_4capi_10ovrHmdDesc_2__reduce_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__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("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("psychxr.ovr.capi.ovrHmdDesc.__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_7psychxr_3ovr_4capi_10ovrHmdDesc_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_5__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_7psychxr_3ovr_4capi_10ovrHmdDesc_4__setstate_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_10ovrHmdDesc_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__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("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("psychxr.ovr.capi.ovrHmdDesc.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":476
 * 
 * 
 * cpdef ovrHmdDesc getHmdDesc():             # <<<<<<<<<<<<<<
 *     """Get general information about the connected HMD. Information such as the
 *     serial number can identify a specific unit, etc.
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17getHmdDesc(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_f_7psychxr_3ovr_4capi_getHmdDesc(CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_v_to_return = 0;
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getHmdDesc", 0);

  /* "psychxr/ovr/capi.pyx":484
 *     """
 *     global _ptr_session_
 *     cdef ovrHmdDesc to_return = ovrHmdDesc()             # <<<<<<<<<<<<<<
 *     (<ovrHmdDesc>to_return).c_ovrHmdDesc = ovr_capi.ovr_GetHmdDesc(
 *         _ptr_session_)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4capi_ovrHmdDesc), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":485
 *     global _ptr_session_
 *     cdef ovrHmdDesc to_return = ovrHmdDesc()
 *     (<ovrHmdDesc>to_return).c_ovrHmdDesc = ovr_capi.ovr_GetHmdDesc(             # <<<<<<<<<<<<<<
 *         _ptr_session_)
 * 
 */
  __pyx_v_to_return->c_ovrHmdDesc = ovr_GetHmdDesc(__pyx_v_7psychxr_3ovr_4capi__ptr_session_);

  /* "psychxr/ovr/capi.pyx":488
 *         _ptr_session_)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * # ---------------------------------
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = __pyx_v_to_return;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":476
 * 
 * 
 * cpdef ovrHmdDesc getHmdDesc():             # <<<<<<<<<<<<<<
 *     """Get general information about the connected HMD. Information such as the
 *     serial number can identify a specific unit, etc.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.getHmdDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17getHmdDesc(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_16getHmdDesc[] = "Get general information about the connected HMD. Information such as the\n    serial number can identify a specific unit, etc.\n    \n    :return: dict \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17getHmdDesc(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getHmdDesc (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_16getHmdDesc(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16getHmdDesc(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getHmdDesc", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_3ovr_4capi_getHmdDesc(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 476, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":524
 *     cdef ovr_capi.ovrTextureSwapChainDesc c_ovrTextureSwapChainDesc
 * 
 *     def __cinit__(             # <<<<<<<<<<<<<<
 *             self,
 *             int type=ovrTexture_2D,
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_type;
  int __pyx_v__format;
  int __pyx_v_width;
  int __pyx_v_height;
  int __pyx_v_array_size;
  int __pyx_v_mip_levels;
  int __pyx_v_sample_count;
  int __pyx_v_static_image;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_type,&__pyx_n_s_format,&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_array_size,&__pyx_n_s_mip_levels,&__pyx_n_s_sample_count,&__pyx_n_s_static_image,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 (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_type);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_width);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_height);
          if (value) { values[3] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_array_size);
          if (value) { values[4] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mip_levels);
          if (value) { values[5] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  6:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_sample_count);
          if (value) { values[6] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  7:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_static_image);
          if (value) { values[7] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 524, __pyx_L3_error)
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_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;
      }
    }
    if (values[0]) {
      __pyx_v_type = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 526, __pyx_L3_error)
    } else {
      __pyx_v_type = __pyx_k__7;
    }
    if (values[1]) {
      __pyx_v__format = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v__format == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 527, __pyx_L3_error)
    } else {
      __pyx_v__format = __pyx_k__8;
    }
    if (values[2]) {
      __pyx_v_width = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 528, __pyx_L3_error)
    } else {
      __pyx_v_width = ((int)0x320);
    }
    if (values[3]) {
      __pyx_v_height = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 529, __pyx_L3_error)
    } else {
      __pyx_v_height = ((int)0x258);
    }
    if (values[4]) {
      __pyx_v_array_size = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_array_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 530, __pyx_L3_error)
    } else {
      __pyx_v_array_size = ((int)1);
    }
    if (values[5]) {
      __pyx_v_mip_levels = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_mip_levels == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 531, __pyx_L3_error)
    } else {
      __pyx_v_mip_levels = ((int)1);
    }
    if (values[6]) {
      __pyx_v_sample_count = __Pyx_PyInt_As_int(values[6]); if (unlikely((__pyx_v_sample_count == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 532, __pyx_L3_error)
    } else {
      __pyx_v_sample_count = ((int)1);
    }
    if (values[7]) {
      __pyx_v_static_image = __Pyx_PyObject_IsTrue(values[7]); if (unlikely((__pyx_v_static_image == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 533, __pyx_L3_error)
    } else {

      /* "psychxr/ovr/capi.pyx":533
 *             int mip_levels=1,
 *             int sample_count=1,
 *             bint static_image=False):             # <<<<<<<<<<<<<<
 * 
 *         self.c_ovrTextureSwapChainDesc.Type = <ovr_capi.ovrTextureType>type
 */
      __pyx_v_static_image = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 8, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 524, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc___cinit__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self), __pyx_v_type, __pyx_v__format, __pyx_v_width, __pyx_v_height, __pyx_v_array_size, __pyx_v_mip_levels, __pyx_v_sample_count, __pyx_v_static_image);

  /* "psychxr/ovr/capi.pyx":524
 *     cdef ovr_capi.ovrTextureSwapChainDesc c_ovrTextureSwapChainDesc
 * 
 *     def __cinit__(             # <<<<<<<<<<<<<<
 *             self,
 *             int type=ovrTexture_2D,
 */

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

static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_type, int __pyx_v__format, int __pyx_v_width, int __pyx_v_height, int __pyx_v_array_size, int __pyx_v_mip_levels, int __pyx_v_sample_count, int __pyx_v_static_image) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/ovr/capi.pyx":535
 *             bint static_image=False):
 * 
 *         self.c_ovrTextureSwapChainDesc.Type = <ovr_capi.ovrTextureType>type             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Format = <ovr_capi.ovrTextureFormat>_format
 *         self.c_ovrTextureSwapChainDesc.ArraySize = array_size
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.Type = ((ovrTextureType)__pyx_v_type);

  /* "psychxr/ovr/capi.pyx":536
 * 
 *         self.c_ovrTextureSwapChainDesc.Type = <ovr_capi.ovrTextureType>type
 *         self.c_ovrTextureSwapChainDesc.Format = <ovr_capi.ovrTextureFormat>_format             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.ArraySize = array_size
 *         self.c_ovrTextureSwapChainDesc.Width = width
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.Format = ((ovrTextureFormat)__pyx_v__format);

  /* "psychxr/ovr/capi.pyx":537
 *         self.c_ovrTextureSwapChainDesc.Type = <ovr_capi.ovrTextureType>type
 *         self.c_ovrTextureSwapChainDesc.Format = <ovr_capi.ovrTextureFormat>_format
 *         self.c_ovrTextureSwapChainDesc.ArraySize = array_size             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Width = width
 *         self.c_ovrTextureSwapChainDesc.Height = height
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.ArraySize = __pyx_v_array_size;

  /* "psychxr/ovr/capi.pyx":538
 *         self.c_ovrTextureSwapChainDesc.Format = <ovr_capi.ovrTextureFormat>_format
 *         self.c_ovrTextureSwapChainDesc.ArraySize = array_size
 *         self.c_ovrTextureSwapChainDesc.Width = width             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Height = height
 *         self.c_ovrTextureSwapChainDesc.MipLevels = mip_levels
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.Width = __pyx_v_width;

  /* "psychxr/ovr/capi.pyx":539
 *         self.c_ovrTextureSwapChainDesc.ArraySize = array_size
 *         self.c_ovrTextureSwapChainDesc.Width = width
 *         self.c_ovrTextureSwapChainDesc.Height = height             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.MipLevels = mip_levels
 *         self.c_ovrTextureSwapChainDesc.SampleCount = sample_count
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.Height = __pyx_v_height;

  /* "psychxr/ovr/capi.pyx":540
 *         self.c_ovrTextureSwapChainDesc.Width = width
 *         self.c_ovrTextureSwapChainDesc.Height = height
 *         self.c_ovrTextureSwapChainDesc.MipLevels = mip_levels             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.SampleCount = sample_count
 *         self.c_ovrTextureSwapChainDesc.StaticImage = <ovr_capi.ovrBool>static_image
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.MipLevels = __pyx_v_mip_levels;

  /* "psychxr/ovr/capi.pyx":541
 *         self.c_ovrTextureSwapChainDesc.Height = height
 *         self.c_ovrTextureSwapChainDesc.MipLevels = mip_levels
 *         self.c_ovrTextureSwapChainDesc.SampleCount = sample_count             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.StaticImage = <ovr_capi.ovrBool>static_image
 * 
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.SampleCount = __pyx_v_sample_count;

  /* "psychxr/ovr/capi.pyx":542
 *         self.c_ovrTextureSwapChainDesc.MipLevels = mip_levels
 *         self.c_ovrTextureSwapChainDesc.SampleCount = sample_count
 *         self.c_ovrTextureSwapChainDesc.StaticImage = <ovr_capi.ovrBool>static_image             # <<<<<<<<<<<<<<
 * 
 *         # these can't be set right now
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.StaticImage = ((ovrBool)__pyx_v_static_image);

  /* "psychxr/ovr/capi.pyx":545
 * 
 *         # these can't be set right now
 *         self.c_ovrTextureSwapChainDesc.MiscFlags = ovr_capi.ovrTextureMisc_None             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.BindFlags = ovr_capi.ovrTextureBind_None
 * 
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.MiscFlags = ovrTextureMisc_None;

  /* "psychxr/ovr/capi.pyx":546
 *         # these can't be set right now
 *         self.c_ovrTextureSwapChainDesc.MiscFlags = ovr_capi.ovrTextureMisc_None
 *         self.c_ovrTextureSwapChainDesc.BindFlags = ovr_capi.ovrTextureBind_None             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.BindFlags = ovrTextureBind_None;

  /* "psychxr/ovr/capi.pyx":524
 *     cdef ovr_capi.ovrTextureSwapChainDesc c_ovrTextureSwapChainDesc
 * 
 *     def __cinit__(             # <<<<<<<<<<<<<<
 *             self,
 *             int type=ovrTexture_2D,
 */

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

/* "psychxr/ovr/capi.pyx":549
 * 
 *     @property
 *     def Type(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.Type
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":550
 *     @property
 *     def Type(self):
 *         return <int>self.c_ovrTextureSwapChainDesc.Type             # <<<<<<<<<<<<<<
 * 
 *     @Type.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrTextureSwapChainDesc.Type)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":549
 * 
 *     @property
 *     def Type(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.Type
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.Type.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":553
 * 
 *     @Type.setter
 *     def Type(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Type = <ovr_capi.ovrTextureType>value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.Type.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":554
 *     @Type.setter
 *     def Type(self, int value):
 *         self.c_ovrTextureSwapChainDesc.Type = <ovr_capi.ovrTextureType>value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.Type = ((ovrTextureType)__pyx_v_value);

  /* "psychxr/ovr/capi.pyx":553
 * 
 *     @Type.setter
 *     def Type(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Type = <ovr_capi.ovrTextureType>value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":557
 * 
 *     @property
 *     def Format(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.Format
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":558
 *     @property
 *     def Format(self):
 *         return <int>self.c_ovrTextureSwapChainDesc.Format             # <<<<<<<<<<<<<<
 * 
 *     @Format.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrTextureSwapChainDesc.Format)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":557
 * 
 *     @property
 *     def Format(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.Format
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.Format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":561
 * 
 *     @Format.setter
 *     def Format(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Format = <ovr_capi.ovrTextureFormat>value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 561, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.Format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":562
 *     @Format.setter
 *     def Format(self, int value):
 *         self.c_ovrTextureSwapChainDesc.Format = <ovr_capi.ovrTextureFormat>value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.Format = ((ovrTextureFormat)__pyx_v_value);

  /* "psychxr/ovr/capi.pyx":561
 * 
 *     @Format.setter
 *     def Format(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Format = <ovr_capi.ovrTextureFormat>value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":565
 * 
 *     @property
 *     def ArraySize(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.ArraySize
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":566
 *     @property
 *     def ArraySize(self):
 *         return <int>self.c_ovrTextureSwapChainDesc.ArraySize             # <<<<<<<<<<<<<<
 * 
 *     @ArraySize.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrTextureSwapChainDesc.ArraySize)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":565
 * 
 *     @property
 *     def ArraySize(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.ArraySize
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.ArraySize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":569
 * 
 *     @ArraySize.setter
 *     def ArraySize(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.ArraySize = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 569, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.ArraySize.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":570
 *     @ArraySize.setter
 *     def ArraySize(self, int value):
 *         self.c_ovrTextureSwapChainDesc.ArraySize = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.ArraySize = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":569
 * 
 *     @ArraySize.setter
 *     def ArraySize(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.ArraySize = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":573
 * 
 *     @property
 *     def Width(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.Width
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":574
 *     @property
 *     def Width(self):
 *         return <int>self.c_ovrTextureSwapChainDesc.Width             # <<<<<<<<<<<<<<
 * 
 *     @Width.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrTextureSwapChainDesc.Width)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":573
 * 
 *     @property
 *     def Width(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.Width
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.Width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":577
 * 
 *     @Width.setter
 *     def Width(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Width = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 577, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.Width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":578
 *     @Width.setter
 *     def Width(self, int value):
 *         self.c_ovrTextureSwapChainDesc.Width = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.Width = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":577
 * 
 *     @Width.setter
 *     def Width(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Width = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":581
 * 
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.Height
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":582
 *     @property
 *     def Height(self):
 *         return <int>self.c_ovrTextureSwapChainDesc.Height             # <<<<<<<<<<<<<<
 * 
 *     @Height.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrTextureSwapChainDesc.Height)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":581
 * 
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.Height
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.Height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":585
 * 
 *     @Height.setter
 *     def Height(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Height = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 585, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":586
 *     @Height.setter
 *     def Height(self, int value):
 *         self.c_ovrTextureSwapChainDesc.Height = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.Height = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":585
 * 
 *     @Height.setter
 *     def Height(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.Height = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":589
 * 
 *     @property
 *     def MipLevels(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.MipLevels
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":590
 *     @property
 *     def MipLevels(self):
 *         return <int>self.c_ovrTextureSwapChainDesc.MipLevels             # <<<<<<<<<<<<<<
 * 
 *     @MipLevels.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrTextureSwapChainDesc.MipLevels)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":589
 * 
 *     @property
 *     def MipLevels(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.MipLevels
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.MipLevels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":593
 * 
 *     @MipLevels.setter
 *     def MipLevels(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.MipLevels = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 593, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.MipLevels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":594
 *     @MipLevels.setter
 *     def MipLevels(self, int value):
 *         self.c_ovrTextureSwapChainDesc.MipLevels = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.MipLevels = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":593
 * 
 *     @MipLevels.setter
 *     def MipLevels(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.MipLevels = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":597
 * 
 *     @property
 *     def SampleCount(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.SampleCount
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":598
 *     @property
 *     def SampleCount(self):
 *         return <int>self.c_ovrTextureSwapChainDesc.SampleCount             # <<<<<<<<<<<<<<
 * 
 *     @SampleCount.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrTextureSwapChainDesc.SampleCount)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":597
 * 
 *     @property
 *     def SampleCount(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrTextureSwapChainDesc.SampleCount
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.SampleCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":601
 * 
 *     @SampleCount.setter
 *     def SampleCount(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.SampleCount = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 601, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.SampleCount.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":602
 *     @SampleCount.setter
 *     def SampleCount(self, int value):
 *         self.c_ovrTextureSwapChainDesc.SampleCount = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.SampleCount = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":601
 * 
 *     @SampleCount.setter
 *     def SampleCount(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.SampleCount = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":605
 * 
 *     @property
 *     def StaticImage(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_ovrTextureSwapChainDesc.StaticImage
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":606
 *     @property
 *     def StaticImage(self):
 *         return <bint>self.c_ovrTextureSwapChainDesc.StaticImage             # <<<<<<<<<<<<<<
 * 
 *     @StaticImage.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_ovrTextureSwapChainDesc.StaticImage != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":605
 * 
 *     @property
 *     def StaticImage(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_ovrTextureSwapChainDesc.StaticImage
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.StaticImage.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":609
 * 
 *     @StaticImage.setter
 *     def StaticImage(self, bint value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.StaticImage = <ovr_capi.ovrBool>value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyObject_IsTrue(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 609, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrTextureSwapChainDesc.StaticImage.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":610
 *     @StaticImage.setter
 *     def StaticImage(self, bint value):
 *         self.c_ovrTextureSwapChainDesc.StaticImage = <ovr_capi.ovrBool>value             # <<<<<<<<<<<<<<
 * 
 * cpdef int createTextureSwapChainGL(
 */
  __pyx_v_self->c_ovrTextureSwapChainDesc.StaticImage = ((ovrBool)__pyx_v_value);

  /* "psychxr/ovr/capi.pyx":609
 * 
 *     @StaticImage.setter
 *     def StaticImage(self, bint value):             # <<<<<<<<<<<<<<
 *         self.c_ovrTextureSwapChainDesc.StaticImage = <ovr_capi.ovrBool>value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __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_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_3__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_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_2__reduce_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__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("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("psychxr.ovr.capi.ovrTextureSwapChainDesc.__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_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5__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_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4__setstate_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__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("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("psychxr.ovr.capi.ovrTextureSwapChainDesc.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":612
 *         self.c_ovrTextureSwapChainDesc.StaticImage = <ovr_capi.ovrBool>value
 * 
 * cpdef int createTextureSwapChainGL(             # <<<<<<<<<<<<<<
 *         ovrTextureSwapChainDesc swap_desc):
 *     """Allocate a new swap chain object with the specified parameters. If
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_19createTextureSwapChainGL(PyObject *__pyx_self, PyObject *__pyx_v_swap_desc); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_createTextureSwapChainGL(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_swap_desc, CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_v_i;
  int __pyx_v_sc;
  ovrResult __pyx_v_result;
  int __pyx_r;
  __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;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("createTextureSwapChainGL", 0);

  /* "psychxr/ovr/capi.pyx":628
 *     # get the first available swap chain, unallocated chains will test as NULL
 *     cdef int i, sc
 *     for i in range(32):             # <<<<<<<<<<<<<<
 *         if _swap_chain_[i] is NULL:
 *             sc = i
 */
  for (__pyx_t_1 = 0; __pyx_t_1 < 32; __pyx_t_1+=1) {
    __pyx_v_i = __pyx_t_1;

    /* "psychxr/ovr/capi.pyx":629
 *     cdef int i, sc
 *     for i in range(32):
 *         if _swap_chain_[i] is NULL:             # <<<<<<<<<<<<<<
 *             sc = i
 *             break
 */
    __pyx_t_2 = (((__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_i]) == NULL) != 0);
    if (__pyx_t_2) {

      /* "psychxr/ovr/capi.pyx":630
 *     for i in range(32):
 *         if _swap_chain_[i] is NULL:
 *             sc = i             # <<<<<<<<<<<<<<
 *             break
 *     else:
 */
      __pyx_v_sc = __pyx_v_i;

      /* "psychxr/ovr/capi.pyx":631
 *         if _swap_chain_[i] is NULL:
 *             sc = i
 *             break             # <<<<<<<<<<<<<<
 *     else:
 *         raise IndexError("Maximum number of swap chains initialized!")
 */
      goto __pyx_L4_break;

      /* "psychxr/ovr/capi.pyx":629
 *     cdef int i, sc
 *     for i in range(32):
 *         if _swap_chain_[i] is NULL:             # <<<<<<<<<<<<<<
 *             sc = i
 *             break
 */
    }
  }
  /*else*/ {

    /* "psychxr/ovr/capi.pyx":633
 *             break
 *     else:
 *         raise IndexError("Maximum number of swap chains initialized!")             # <<<<<<<<<<<<<<
 * 
 *     # create the swap chain
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 633, __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, 633, __pyx_L1_error)
  }
  __pyx_L4_break:;

  /* "psychxr/ovr/capi.pyx":636
 * 
 *     # create the swap chain
 *     cdef ovr_capi.ovrResult result = ovr_capi_gl.ovr_CreateTextureSwapChainGL(             # <<<<<<<<<<<<<<
 *         _ptr_session_, &swap_desc.c_ovrTextureSwapChainDesc, &_swap_chain_[sc])
 * 
 */
  __pyx_v_result = ovr_CreateTextureSwapChainGL(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (&__pyx_v_swap_desc->c_ovrTextureSwapChainDesc), (&(__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_sc])));

  /* "psychxr/ovr/capi.pyx":639
 *         _ptr_session_, &swap_desc.c_ovrTextureSwapChainDesc, &_swap_chain_[sc])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 639, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":640
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 *     # return the handle
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "psychxr/ovr/capi.pyx":639
 *         _ptr_session_, &swap_desc.c_ovrTextureSwapChainDesc, &_swap_chain_[sc])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":643
 * 
 *     # return the handle
 *     return sc             # <<<<<<<<<<<<<<
 * 
 * # types
 */
  __pyx_r = __pyx_v_sc;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":612
 *         self.c_ovrTextureSwapChainDesc.StaticImage = <ovr_capi.ovrBool>value
 * 
 * cpdef int createTextureSwapChainGL(             # <<<<<<<<<<<<<<
 *         ovrTextureSwapChainDesc swap_desc):
 *     """Allocate a new swap chain object with the specified parameters. If
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_WriteUnraisable("psychxr.ovr.capi.createTextureSwapChainGL", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_19createTextureSwapChainGL(PyObject *__pyx_self, PyObject *__pyx_v_swap_desc); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_18createTextureSwapChainGL[] = "Allocate a new swap chain object with the specified parameters. If\n    successful, an integer is returned which is used to reference the swap\n    chain. You can allocate up-to 32 swap chains.\n    \n    The swap chain is configured by applying settings to a \n    ovrTextureSwapChainDesc object and passing it as 'swap_desc'. \n\n    :param swap_desc: ovrTextureSwapChainDesc\n    :return: int\n\n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_19createTextureSwapChainGL(PyObject *__pyx_self, PyObject *__pyx_v_swap_desc) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("createTextureSwapChainGL (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_swap_desc), __pyx_ptype_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc, 1, "swap_desc", 0))) __PYX_ERR(0, 613, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_18createTextureSwapChainGL(__pyx_self, ((struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *)__pyx_v_swap_desc));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_18createTextureSwapChainGL(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc *__pyx_v_swap_desc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("createTextureSwapChainGL", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_7psychxr_3ovr_4capi_createTextureSwapChainGL(__pyx_v_swap_desc, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":657
 * ovrEye_Count = ovr_capi.ovrEye_Count
 * 
 * cpdef ovrSizei getFovTextureSize(             # <<<<<<<<<<<<<<
 *         int eye_type,
 *         ovrFovPort fov,
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_21getFovTextureSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4math_ovrSizei *__pyx_f_7psychxr_3ovr_4capi_getFovTextureSize(int __pyx_v_eye_type, struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_fov, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getFovTextureSize *__pyx_optional_args) {
  float __pyx_v_texels_per_pixel = ((float)1.0);
  struct __pyx_obj_7psychxr_3ovr_4math_ovrSizei *__pyx_v_to_return = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrSizei *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getFovTextureSize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_texels_per_pixel = __pyx_optional_args->texels_per_pixel;
    }
  }

  /* "psychxr/ovr/capi.pyx":671
 * 
 *     """
 *     cdef ovrSizei to_return = ovrSizei()             # <<<<<<<<<<<<<<
 *     (<ovrSizei>to_return).c_data[0] = ovr_capi.ovr_GetFovTextureSize(
 *         _ptr_session_,
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrSizei), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrSizei *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":672
 *     """
 *     cdef ovrSizei to_return = ovrSizei()
 *     (<ovrSizei>to_return).c_data[0] = ovr_capi.ovr_GetFovTextureSize(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         <ovr_capi.ovrEyeType>eye_type,
 */
  (__pyx_v_to_return->c_data[0]) = ovr_GetFovTextureSize(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ((ovrEyeType)__pyx_v_eye_type), (__pyx_v_fov->c_data[0]), __pyx_v_texels_per_pixel);

  /* "psychxr/ovr/capi.pyx":678
 *         texels_per_pixel)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * cpdef void configEyeRenderDesc(int eye_type, ovrFovPort fov):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = __pyx_v_to_return;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":657
 * ovrEye_Count = ovr_capi.ovrEye_Count
 * 
 * cpdef ovrSizei getFovTextureSize(             # <<<<<<<<<<<<<<
 *         int eye_type,
 *         ovrFovPort fov,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.getFovTextureSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_21getFovTextureSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_20getFovTextureSize[] = "Compute the recommended buffer (texture) size for a specified \n    configuration.\n    \n    Returns a tuple with the dimensions of the required texture (w, h). The \n    values can be used when configuring a render buffer which will ultimately\n    be used to draw to the HMD buffers.\n    \n    :return: None \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_21getFovTextureSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye_type;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_fov = 0;
  float __pyx_v_texels_per_pixel;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFovTextureSize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye_type,&__pyx_n_s_fov,&__pyx_n_s_texels_per_pixel,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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eye_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fov)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getFovTextureSize", 0, 2, 3, 1); __PYX_ERR(0, 657, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_texels_per_pixel);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getFovTextureSize") < 0)) __PYX_ERR(0, 657, __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_eye_type = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 658, __pyx_L3_error)
    __pyx_v_fov = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *)values[1]);
    if (values[2]) {
      __pyx_v_texels_per_pixel = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_texels_per_pixel == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 660, __pyx_L3_error)
    } else {
      __pyx_v_texels_per_pixel = ((float)1.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getFovTextureSize", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 657, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getFovTextureSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fov), __pyx_ptype_7psychxr_3ovr_4math_ovrFovPort, 1, "fov", 0))) __PYX_ERR(0, 659, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_20getFovTextureSize(__pyx_self, __pyx_v_eye_type, __pyx_v_fov, __pyx_v_texels_per_pixel);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20getFovTextureSize(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye_type, struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_fov, float __pyx_v_texels_per_pixel) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getFovTextureSize __pyx_t_2;
  __Pyx_RefNannySetupContext("getFovTextureSize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.texels_per_pixel = __pyx_v_texels_per_pixel;
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_3ovr_4capi_getFovTextureSize(__pyx_v_eye_type, __pyx_v_fov, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":680
 *     return to_return
 * 
 * cpdef void configEyeRenderDesc(int eye_type, ovrFovPort fov):             # <<<<<<<<<<<<<<
 *     """Compute eye render descriptors for a given eye.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23configEyeRenderDesc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_configEyeRenderDesc(int __pyx_v_eye_type, struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_fov, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  ovrPosef __pyx_t_1;
  ovrFovPort __pyx_t_2;
  __Pyx_RefNannySetupContext("configEyeRenderDesc", 0);

  /* "psychxr/ovr/capi.pyx":693
 *     """
 *     global _eye_render_desc_, _eye_layer_, _hmd_to_eye_view_pose_
 *     _eye_render_desc_[eye_type] = ovr_capi.ovr_GetRenderDesc(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         <ovr_capi.ovrEyeType>eye_type,
 */
  (__pyx_v_7psychxr_3ovr_4capi__eye_render_desc_[__pyx_v_eye_type]) = ovr_GetRenderDesc(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ((ovrEyeType)__pyx_v_eye_type), (__pyx_v_fov->c_data[0]));

  /* "psychxr/ovr/capi.pyx":699
 * 
 *     # set the initial eye pose
 *     _hmd_to_eye_view_pose_[eye_type] = _eye_render_desc_[eye_type].HmdToEyePose             # <<<<<<<<<<<<<<
 * 
 *     # set the render layer FOV to what is computed
 */
  __pyx_t_1 = (__pyx_v_7psychxr_3ovr_4capi__eye_render_desc_[__pyx_v_eye_type]).HmdToEyePose;
  (__pyx_v_7psychxr_3ovr_4capi__hmd_to_eye_view_pose_[__pyx_v_eye_type]) = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":702
 * 
 *     # set the render layer FOV to what is computed
 *     _eye_layer_.Fov[eye_type] = _eye_render_desc_[eye_type].Fov             # <<<<<<<<<<<<<<
 * 
 * cpdef list getHmdToEyePose():
 */
  __pyx_t_2 = (__pyx_v_7psychxr_3ovr_4capi__eye_render_desc_[__pyx_v_eye_type]).Fov;
  (__pyx_v_7psychxr_3ovr_4capi__eye_layer_.Fov[__pyx_v_eye_type]) = __pyx_t_2;

  /* "psychxr/ovr/capi.pyx":680
 *     return to_return
 * 
 * cpdef void configEyeRenderDesc(int eye_type, ovrFovPort fov):             # <<<<<<<<<<<<<<
 *     """Compute eye render descriptors for a given eye.
 * 
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23configEyeRenderDesc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_22configEyeRenderDesc[] = "Compute eye render descriptors for a given eye. \n    \n    Each eye has an internal 'ovrEyeRenderDesc' structure which stores computed\n    information which is not accessible directly from Python. You must call this\n    function twice (for each eye) to fully configure the descriptors.\n\n    :param eye_type: int\n    :param fov: ovrFovPort\n    :return: None\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_23configEyeRenderDesc(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye_type;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_fov = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("configEyeRenderDesc (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye_type,&__pyx_n_s_fov,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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eye_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fov)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("configEyeRenderDesc", 1, 2, 2, 1); __PYX_ERR(0, 680, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "configEyeRenderDesc") < 0)) __PYX_ERR(0, 680, __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_eye_type = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 680, __pyx_L3_error)
    __pyx_v_fov = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("configEyeRenderDesc", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 680, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.configEyeRenderDesc", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fov), __pyx_ptype_7psychxr_3ovr_4math_ovrFovPort, 1, "fov", 0))) __PYX_ERR(0, 680, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_22configEyeRenderDesc(__pyx_self, __pyx_v_eye_type, __pyx_v_fov);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_22configEyeRenderDesc(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye_type, struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort *__pyx_v_fov) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("configEyeRenderDesc", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_configEyeRenderDesc(__pyx_v_eye_type, __pyx_v_fov, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":704
 *     _eye_layer_.Fov[eye_type] = _eye_render_desc_[eye_type].Fov
 * 
 * cpdef list getHmdToEyePose():             # <<<<<<<<<<<<<<
 *     """Get the HMD to eye poses from the internal eye render descriptor.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_25getHmdToEyePose(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getHmdToEyePose(CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_hmdToEyePoseLeft = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_hmdToEyePoseRight = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getHmdToEyePose", 0);

  /* "psychxr/ovr/capi.pyx":711
 *     """
 *     global _eye_render_desc_
 *     cdef ovrPosef hmdToEyePoseLeft = ovrPosef()             # <<<<<<<<<<<<<<
 *     cdef ovrPosef hmdToEyePoseRight = ovrPosef()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrPosef), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_hmdToEyePoseLeft = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":712
 *     global _eye_render_desc_
 *     cdef ovrPosef hmdToEyePoseLeft = ovrPosef()
 *     cdef ovrPosef hmdToEyePoseRight = ovrPosef()             # <<<<<<<<<<<<<<
 * 
 *     (<ovrPosef>hmdToEyePoseLeft).c_data[0] = \
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrPosef), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_hmdToEyePoseRight = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":714
 *     cdef ovrPosef hmdToEyePoseRight = ovrPosef()
 * 
 *     (<ovrPosef>hmdToEyePoseLeft).c_data[0] = \             # <<<<<<<<<<<<<<
 *         <ovr_math.Posef>_eye_render_desc_[0].HmdToEyePose
 *     (<ovrPosef>hmdToEyePoseRight).c_data[0] = \
 */
  (__pyx_v_hmdToEyePoseLeft->c_data[0]) = ((OVR::Posef)(__pyx_v_7psychxr_3ovr_4capi__eye_render_desc_[0]).HmdToEyePose);

  /* "psychxr/ovr/capi.pyx":716
 *     (<ovrPosef>hmdToEyePoseLeft).c_data[0] = \
 *         <ovr_math.Posef>_eye_render_desc_[0].HmdToEyePose
 *     (<ovrPosef>hmdToEyePoseRight).c_data[0] = \             # <<<<<<<<<<<<<<
 *         <ovr_math.Posef>_eye_render_desc_[1].HmdToEyePose
 * 
 */
  (__pyx_v_hmdToEyePoseRight->c_data[0]) = ((OVR::Posef)(__pyx_v_7psychxr_3ovr_4capi__eye_render_desc_[1]).HmdToEyePose);

  /* "psychxr/ovr/capi.pyx":719
 *         <ovr_math.Posef>_eye_render_desc_[1].HmdToEyePose
 * 
 *     return [hmdToEyePoseLeft, hmdToEyePoseRight]             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple getBufferSize(str fov_type='recommended',
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_hmdToEyePoseLeft));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_hmdToEyePoseLeft));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_hmdToEyePoseLeft));
  __Pyx_INCREF(((PyObject *)__pyx_v_hmdToEyePoseRight));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_hmdToEyePoseRight));
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_hmdToEyePoseRight));
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":704
 *     _eye_layer_.Fov[eye_type] = _eye_render_desc_[eye_type].Fov
 * 
 * cpdef list getHmdToEyePose():             # <<<<<<<<<<<<<<
 *     """Get the HMD to eye poses from the internal eye render descriptor.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.getHmdToEyePose", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_hmdToEyePoseLeft);
  __Pyx_XDECREF((PyObject *)__pyx_v_hmdToEyePoseRight);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_25getHmdToEyePose(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_24getHmdToEyePose[] = "Get the HMD to eye poses from the internal eye render descriptor.\n    \n    :return: \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_25getHmdToEyePose(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getHmdToEyePose (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_24getHmdToEyePose(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_24getHmdToEyePose(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getHmdToEyePose", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getHmdToEyePose(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":721
 *     return [hmdToEyePoseLeft, hmdToEyePoseRight]
 * 
 * cpdef tuple getBufferSize(str fov_type='recommended',             # <<<<<<<<<<<<<<
 *                           float texel_per_pixel=1.0):
 *     """Compute the recommended buffer (texture) size for a specified
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_27getBufferSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getBufferSize(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getBufferSize *__pyx_optional_args) {
  PyObject *__pyx_v_fov_type = ((PyObject*)__pyx_n_s_recommended);
  float __pyx_v_texel_per_pixel = ((float)1.0);
  ovrSizei __pyx_v_rec_tex0_size;
  ovrSizei __pyx_v_rec_tex1_size;
  ovrSizei __pyx_v_buffer_size;
  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;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  __Pyx_RefNannySetupContext("getBufferSize", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_fov_type = __pyx_optional_args->fov_type;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_texel_per_pixel = __pyx_optional_args->texel_per_pixel;
      }
    }
  }

  /* "psychxr/ovr/capi.pyx":735
 *     # get the buffer size for the specified FOV type and buffer layout
 *     cdef ovr_capi.ovrSizei rec_tex0_size, rec_tex1_size, buffer_size
 *     if fov_type == 'recommended':             # <<<<<<<<<<<<<<
 *         rec_tex0_size = ovr_capi.ovr_GetFovTextureSize(
 *             _ptr_session_,
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_fov_type, __pyx_n_s_recommended, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 735, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":736
 *     cdef ovr_capi.ovrSizei rec_tex0_size, rec_tex1_size, buffer_size
 *     if fov_type == 'recommended':
 *         rec_tex0_size = ovr_capi.ovr_GetFovTextureSize(             # <<<<<<<<<<<<<<
 *             _ptr_session_,
 *             ovr_capi.ovrEye_Left,
 */
    __pyx_v_rec_tex0_size = ovr_GetFovTextureSize(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ovrEye_Left, (__pyx_v_7psychxr_3ovr_4capi__hmdDesc_.DefaultEyeFov[0]), __pyx_v_texel_per_pixel);

    /* "psychxr/ovr/capi.pyx":741
 *             _hmdDesc_.DefaultEyeFov[0],
 *             texel_per_pixel)
 *         rec_tex1_size = ovr_capi.ovr_GetFovTextureSize(             # <<<<<<<<<<<<<<
 *             _ptr_session_,
 *             ovr_capi.ovrEye_Right,
 */
    __pyx_v_rec_tex1_size = ovr_GetFovTextureSize(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ovrEye_Right, (__pyx_v_7psychxr_3ovr_4capi__hmdDesc_.DefaultEyeFov[1]), __pyx_v_texel_per_pixel);

    /* "psychxr/ovr/capi.pyx":735
 *     # get the buffer size for the specified FOV type and buffer layout
 *     cdef ovr_capi.ovrSizei rec_tex0_size, rec_tex1_size, buffer_size
 *     if fov_type == 'recommended':             # <<<<<<<<<<<<<<
 *         rec_tex0_size = ovr_capi.ovr_GetFovTextureSize(
 *             _ptr_session_,
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":746
 *             _hmdDesc_.DefaultEyeFov[1],
 *             texel_per_pixel)
 *     elif fov_type == 'max':             # <<<<<<<<<<<<<<
 *         rec_tex0_size = ovr_capi.ovr_GetFovTextureSize(
 *             _ptr_session_,
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_fov_type, __pyx_n_s_max, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 746, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":747
 *             texel_per_pixel)
 *     elif fov_type == 'max':
 *         rec_tex0_size = ovr_capi.ovr_GetFovTextureSize(             # <<<<<<<<<<<<<<
 *             _ptr_session_,
 *             ovr_capi.ovrEye_Left,
 */
    __pyx_v_rec_tex0_size = ovr_GetFovTextureSize(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ovrEye_Left, (__pyx_v_7psychxr_3ovr_4capi__hmdDesc_.MaxEyeFov[0]), __pyx_v_texel_per_pixel);

    /* "psychxr/ovr/capi.pyx":752
 *             _hmdDesc_.MaxEyeFov[0],
 *             texel_per_pixel)
 *         rec_tex1_size = ovr_capi.ovr_GetFovTextureSize(             # <<<<<<<<<<<<<<
 *             _ptr_session_,
 *             ovr_capi.ovrEye_Right,
 */
    __pyx_v_rec_tex1_size = ovr_GetFovTextureSize(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ovrEye_Right, (__pyx_v_7psychxr_3ovr_4capi__hmdDesc_.MaxEyeFov[1]), __pyx_v_texel_per_pixel);

    /* "psychxr/ovr/capi.pyx":746
 *             _hmdDesc_.DefaultEyeFov[1],
 *             texel_per_pixel)
 *     elif fov_type == 'max':             # <<<<<<<<<<<<<<
 *         rec_tex0_size = ovr_capi.ovr_GetFovTextureSize(
 *             _ptr_session_,
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":758
 *             texel_per_pixel)
 * 
 *     buffer_size.w  = rec_tex0_size.w + rec_tex1_size.w             # <<<<<<<<<<<<<<
 *     buffer_size.h = max(rec_tex0_size.h, rec_tex1_size.h)
 * 
 */
  __pyx_v_buffer_size.w = (__pyx_v_rec_tex0_size.w + __pyx_v_rec_tex1_size.w);

  /* "psychxr/ovr/capi.pyx":759
 * 
 *     buffer_size.w  = rec_tex0_size.w + rec_tex1_size.w
 *     buffer_size.h = max(rec_tex0_size.h, rec_tex1_size.h)             # <<<<<<<<<<<<<<
 * 
 *     return buffer_size.w, buffer_size.h
 */
  __pyx_t_3 = __pyx_v_rec_tex1_size.h;
  __pyx_t_4 = __pyx_v_rec_tex0_size.h;
  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
    __pyx_t_5 = __pyx_t_3;
  } else {
    __pyx_t_5 = __pyx_t_4;
  }
  __pyx_v_buffer_size.h = __pyx_t_5;

  /* "psychxr/ovr/capi.pyx":761
 *     buffer_size.h = max(rec_tex0_size.h, rec_tex1_size.h)
 * 
 *     return buffer_size.w, buffer_size.h             # <<<<<<<<<<<<<<
 * 
 * cpdef void setRenderSwapChain(int eye, object swap_chain):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_buffer_size.w); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_buffer_size.h); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 761, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_r = ((PyObject*)__pyx_t_8);
  __pyx_t_8 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":721
 *     return [hmdToEyePoseLeft, hmdToEyePoseRight]
 * 
 * cpdef tuple getBufferSize(str fov_type='recommended',             # <<<<<<<<<<<<<<
 *                           float texel_per_pixel=1.0):
 *     """Compute the recommended buffer (texture) size for a specified
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("psychxr.ovr.capi.getBufferSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_27getBufferSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_26getBufferSize[] = "Compute the recommended buffer (texture) size for a specified \n    configuration.\n    \n    Returns a tuple with the dimensions of the required texture (w, h). The \n    values can be used when configuring a render buffer which will ultimately\n    be used to draw to the HMD buffers.\n    \n    :return: None \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_27getBufferSize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_fov_type = 0;
  float __pyx_v_texel_per_pixel;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getBufferSize (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_fov_type,&__pyx_n_s_texel_per_pixel,0};
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject*)__pyx_n_s_recommended);
    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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fov_type);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_texel_per_pixel);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getBufferSize") < 0)) __PYX_ERR(0, 721, __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;
      }
    }
    __pyx_v_fov_type = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_texel_per_pixel = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_texel_per_pixel == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L3_error)
    } else {
      __pyx_v_texel_per_pixel = ((float)1.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getBufferSize", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 721, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getBufferSize", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_fov_type), (&PyString_Type), 1, "fov_type", 1))) __PYX_ERR(0, 721, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_26getBufferSize(__pyx_self, __pyx_v_fov_type, __pyx_v_texel_per_pixel);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_26getBufferSize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fov_type, float __pyx_v_texel_per_pixel) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getBufferSize __pyx_t_2;
  __Pyx_RefNannySetupContext("getBufferSize", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.fov_type = __pyx_v_fov_type;
  __pyx_t_2.texel_per_pixel = __pyx_v_texel_per_pixel;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getBufferSize(0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 721, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":763
 *     return buffer_size.w, buffer_size.h
 * 
 * cpdef void setRenderSwapChain(int eye, object swap_chain):             # <<<<<<<<<<<<<<
 *     """Set the swap chain for the render layer.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_29setRenderSwapChain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setRenderSwapChain(int __pyx_v_eye, PyObject *__pyx_v_swap_chain, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("setRenderSwapChain", 0);

  /* "psychxr/ovr/capi.pyx":773
 *     # set the swap chain textures
 *     global _eye_layer_
 *     if not swap_chain is None:             # <<<<<<<<<<<<<<
 *         _eye_layer_.ColorTexture[eye] = _swap_chain_[<int>swap_chain]
 *     else:
 */
  __pyx_t_1 = (__pyx_v_swap_chain != Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":774
 *     global _eye_layer_
 *     if not swap_chain is None:
 *         _eye_layer_.ColorTexture[eye] = _swap_chain_[<int>swap_chain]             # <<<<<<<<<<<<<<
 *     else:
 *         _eye_layer_.ColorTexture[eye] = NULL
 */
    __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_swap_chain); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 774, __pyx_L1_error)
    (__pyx_v_7psychxr_3ovr_4capi__eye_layer_.ColorTexture[__pyx_v_eye]) = (__pyx_v_7psychxr_3ovr_4capi__swap_chain_[((int)__pyx_t_3)]);

    /* "psychxr/ovr/capi.pyx":773
 *     # set the swap chain textures
 *     global _eye_layer_
 *     if not swap_chain is None:             # <<<<<<<<<<<<<<
 *         _eye_layer_.ColorTexture[eye] = _swap_chain_[<int>swap_chain]
 *     else:
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":776
 *         _eye_layer_.ColorTexture[eye] = _swap_chain_[<int>swap_chain]
 *     else:
 *         _eye_layer_.ColorTexture[eye] = NULL             # <<<<<<<<<<<<<<
 * 
 * cpdef ovrRecti getRenderViewport(int eye):
 */
  /*else*/ {
    (__pyx_v_7psychxr_3ovr_4capi__eye_layer_.ColorTexture[__pyx_v_eye]) = NULL;
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":763
 *     return buffer_size.w, buffer_size.h
 * 
 * cpdef void setRenderSwapChain(int eye, object swap_chain):             # <<<<<<<<<<<<<<
 *     """Set the swap chain for the render layer.
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("psychxr.ovr.capi.setRenderSwapChain", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_29setRenderSwapChain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_28setRenderSwapChain[] = "Set the swap chain for the render layer.\n\n    :param eye: str\n    :param swap_chain: int or None\n    :return: None\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_29setRenderSwapChain(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  PyObject *__pyx_v_swap_chain = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRenderSwapChain (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_swap_chain,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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_swap_chain)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setRenderSwapChain", 1, 2, 2, 1); __PYX_ERR(0, 763, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRenderSwapChain") < 0)) __PYX_ERR(0, 763, __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_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 763, __pyx_L3_error)
    __pyx_v_swap_chain = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRenderSwapChain", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 763, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.setRenderSwapChain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_28setRenderSwapChain(__pyx_self, __pyx_v_eye, __pyx_v_swap_chain);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_28setRenderSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, PyObject *__pyx_v_swap_chain) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("setRenderSwapChain", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_setRenderSwapChain(__pyx_v_eye, __pyx_v_swap_chain, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":778
 *         _eye_layer_.ColorTexture[eye] = NULL
 * 
 * cpdef ovrRecti getRenderViewport(int eye):             # <<<<<<<<<<<<<<
 *     """Get the viewport rectangle for a given eye view. These will return the
 *     viewports set by the previous 'setRenderViewport' call.
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_31getRenderViewport(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *__pyx_f_7psychxr_3ovr_4capi_getRenderViewport(int __pyx_v_eye, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *__pyx_v_to_return = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getRenderViewport", 0);

  /* "psychxr/ovr/capi.pyx":787
 *     """
 *     global _ptr_session_, _eye_layer_
 *     cdef ovrRecti to_return = ovrRecti()             # <<<<<<<<<<<<<<
 *     (<ovrRecti>to_return).c_data[0] = _eye_layer_.Viewport[eye]
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrRecti), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":788
 *     global _ptr_session_, _eye_layer_
 *     cdef ovrRecti to_return = ovrRecti()
 *     (<ovrRecti>to_return).c_data[0] = _eye_layer_.Viewport[eye]             # <<<<<<<<<<<<<<
 * 
 *     return to_return
 */
  (__pyx_v_to_return->c_data[0]) = (__pyx_v_7psychxr_3ovr_4capi__eye_layer_.Viewport[__pyx_v_eye]);

  /* "psychxr/ovr/capi.pyx":790
 *     (<ovrRecti>to_return).c_data[0] = _eye_layer_.Viewport[eye]
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * cpdef void setRenderViewport(int eye, ovrRecti viewPortRect):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = __pyx_v_to_return;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":778
 *         _eye_layer_.ColorTexture[eye] = NULL
 * 
 * cpdef ovrRecti getRenderViewport(int eye):             # <<<<<<<<<<<<<<
 *     """Get the viewport rectangle for a given eye view. These will return the
 *     viewports set by the previous 'setRenderViewport' call.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.getRenderViewport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_31getRenderViewport(PyObject *__pyx_self, PyObject *__pyx_arg_eye); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_30getRenderViewport[] = "Get the viewport rectangle for a given eye view. These will return the\n    viewports set by the previous 'setRenderViewport' call.\n    \n    :param eye: int\n    :return: None\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_31getRenderViewport(PyObject *__pyx_self, PyObject *__pyx_arg_eye) {
  int __pyx_v_eye;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRenderViewport (wrapper)", 0);
  assert(__pyx_arg_eye); {
    __pyx_v_eye = __Pyx_PyInt_As_int(__pyx_arg_eye); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 778, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getRenderViewport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30getRenderViewport(__pyx_self, ((int)__pyx_v_eye));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30getRenderViewport(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getRenderViewport", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_3ovr_4capi_getRenderViewport(__pyx_v_eye, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":792
 *     return to_return
 * 
 * cpdef void setRenderViewport(int eye, ovrRecti viewPortRect):             # <<<<<<<<<<<<<<
 *     """Set the viewport rectangle for a specified eye view. This defines where
 *     on the swap texture the eye view is to be drawn/retrieved.
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_33setRenderViewport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setRenderViewport(int __pyx_v_eye, struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *__pyx_v_viewPortRect, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRenderViewport", 0);

  /* "psychxr/ovr/capi.pyx":802
 *     """
 *     global _eye_layer_
 *     _eye_layer_.Viewport[eye] = viewPortRect.c_data[0]             # <<<<<<<<<<<<<<
 * 
 * cpdef int getRenderLayerFlags():
 */
  (__pyx_v_7psychxr_3ovr_4capi__eye_layer_.Viewport[__pyx_v_eye]) = (__pyx_v_viewPortRect->c_data[0]);

  /* "psychxr/ovr/capi.pyx":792
 *     return to_return
 * 
 * cpdef void setRenderViewport(int eye, ovrRecti viewPortRect):             # <<<<<<<<<<<<<<
 *     """Set the viewport rectangle for a specified eye view. This defines where
 *     on the swap texture the eye view is to be drawn/retrieved.
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_33setRenderViewport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_32setRenderViewport[] = "Set the viewport rectangle for a specified eye view. This defines where\n    on the swap texture the eye view is to be drawn/retrieved.\n    \n    :param eye: int\n    :param viewPortRect: ovrRecti\n    :return: None\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_33setRenderViewport(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *__pyx_v_viewPortRect = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRenderViewport (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_viewPortRect,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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_viewPortRect)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setRenderViewport", 1, 2, 2, 1); __PYX_ERR(0, 792, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setRenderViewport") < 0)) __PYX_ERR(0, 792, __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_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 792, __pyx_L3_error)
    __pyx_v_viewPortRect = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *)values[1]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setRenderViewport", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 792, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.setRenderViewport", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_viewPortRect), __pyx_ptype_7psychxr_3ovr_4math_ovrRecti, 1, "viewPortRect", 0))) __PYX_ERR(0, 792, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_32setRenderViewport(__pyx_self, __pyx_v_eye, __pyx_v_viewPortRect);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_32setRenderViewport(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti *__pyx_v_viewPortRect) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("setRenderViewport", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_setRenderViewport(__pyx_v_eye, __pyx_v_viewPortRect, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":804
 *     _eye_layer_.Viewport[eye] = viewPortRect.c_data[0]
 * 
 * cpdef int getRenderLayerFlags():             # <<<<<<<<<<<<<<
 *     """Get the render layer's header flags.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_35getRenderLayerFlags(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_getRenderLayerFlags(CYTHON_UNUSED int __pyx_skip_dispatch) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRenderLayerFlags", 0);

  /* "psychxr/ovr/capi.pyx":811
 *     """
 *     global _eye_layer_
 *     return <int>_eye_layer_.Header.Flags             # <<<<<<<<<<<<<<
 * 
 * cpdef void setRenderLayerFlags(int layerHeaderFlags):
 */
  __pyx_r = ((int)__pyx_v_7psychxr_3ovr_4capi__eye_layer_.Header.Flags);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":804
 *     _eye_layer_.Viewport[eye] = viewPortRect.c_data[0]
 * 
 * cpdef int getRenderLayerFlags():             # <<<<<<<<<<<<<<
 *     """Get the render layer's header flags.
 * 
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_35getRenderLayerFlags(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_34getRenderLayerFlags[] = "Get the render layer's header flags.\n    \n    :return: int\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_35getRenderLayerFlags(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getRenderLayerFlags (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_34getRenderLayerFlags(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_34getRenderLayerFlags(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getRenderLayerFlags", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_7psychxr_3ovr_4capi_getRenderLayerFlags(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":813
 *     return <int>_eye_layer_.Header.Flags
 * 
 * cpdef void setRenderLayerFlags(int layerHeaderFlags):             # <<<<<<<<<<<<<<
 *     """Set the render layer's header flags.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_37setRenderLayerFlags(PyObject *__pyx_self, PyObject *__pyx_arg_layerHeaderFlags); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setRenderLayerFlags(int __pyx_v_layerHeaderFlags, CYTHON_UNUSED int __pyx_skip_dispatch) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRenderLayerFlags", 0);

  /* "psychxr/ovr/capi.pyx":821
 *     """
 *     global _eye_layer_
 *     _eye_layer_.Header.Flags = layerHeaderFlags             # <<<<<<<<<<<<<<
 * 
 * # ---------------------------------
 */
  __pyx_v_7psychxr_3ovr_4capi__eye_layer_.Header.Flags = __pyx_v_layerHeaderFlags;

  /* "psychxr/ovr/capi.pyx":813
 *     return <int>_eye_layer_.Header.Flags
 * 
 * cpdef void setRenderLayerFlags(int layerHeaderFlags):             # <<<<<<<<<<<<<<
 *     """Set the render layer's header flags.
 * 
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_37setRenderLayerFlags(PyObject *__pyx_self, PyObject *__pyx_arg_layerHeaderFlags); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_36setRenderLayerFlags[] = "Set the render layer's header flags.\n    \n    :param layerHeaderFlags: \n    :return: None\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_37setRenderLayerFlags(PyObject *__pyx_self, PyObject *__pyx_arg_layerHeaderFlags) {
  int __pyx_v_layerHeaderFlags;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setRenderLayerFlags (wrapper)", 0);
  assert(__pyx_arg_layerHeaderFlags); {
    __pyx_v_layerHeaderFlags = __Pyx_PyInt_As_int(__pyx_arg_layerHeaderFlags); if (unlikely((__pyx_v_layerHeaderFlags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 813, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.setRenderLayerFlags", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_36setRenderLayerFlags(__pyx_self, ((int)__pyx_v_layerHeaderFlags));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_36setRenderLayerFlags(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_layerHeaderFlags) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("setRenderLayerFlags", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_setRenderLayerFlags(__pyx_v_layerHeaderFlags, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":840
 *     cdef ovrVector3f field_linear_acceleration
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrPoseStatef
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef___cinit__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static int __pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/ovr/capi.pyx":841
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.c_data = &self.c_ovrPoseStatef             # <<<<<<<<<<<<<<
 * 
 *         self.field_angular_velocity = ovrVector3f()
 */
  __pyx_v_self->c_data = (&__pyx_v_self->c_ovrPoseStatef);

  /* "psychxr/ovr/capi.pyx":843
 *         self.c_data = &self.c_ovrPoseStatef
 * 
 *         self.field_angular_velocity = ovrVector3f()             # <<<<<<<<<<<<<<
 *         self.field_linear_velocity = ovrVector3f()
 *         self.field_angular_acceleration = ovrVector3f()
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrVector3f), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->field_angular_velocity);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->field_angular_velocity));
  __pyx_v_self->field_angular_velocity = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":844
 * 
 *         self.field_angular_velocity = ovrVector3f()
 *         self.field_linear_velocity = ovrVector3f()             # <<<<<<<<<<<<<<
 *         self.field_angular_acceleration = ovrVector3f()
 *         self.field_linear_acceleration = ovrVector3f()
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrVector3f), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->field_linear_velocity);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->field_linear_velocity));
  __pyx_v_self->field_linear_velocity = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":845
 *         self.field_angular_velocity = ovrVector3f()
 *         self.field_linear_velocity = ovrVector3f()
 *         self.field_angular_acceleration = ovrVector3f()             # <<<<<<<<<<<<<<
 *         self.field_linear_acceleration = ovrVector3f()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrVector3f), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->field_angular_acceleration);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->field_angular_acceleration));
  __pyx_v_self->field_angular_acceleration = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":846
 *         self.field_linear_velocity = ovrVector3f()
 *         self.field_angular_acceleration = ovrVector3f()
 *         self.field_linear_acceleration = ovrVector3f()             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrVector3f), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->field_linear_acceleration);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->field_linear_acceleration));
  __pyx_v_self->field_linear_acceleration = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":840
 *     cdef ovrVector3f field_linear_acceleration
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrPoseStatef
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPoseStatef.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":849
 * 
 *     @property
 *     def ThePose(self):             # <<<<<<<<<<<<<<
 *         cdef ovrPosef to_return = ovrPosef()
 *         (<ovrPosef>to_return).c_data[0] = <ovr_math.Posef>self.c_data[0].ThePose
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_7ThePose_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_7ThePose_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_7ThePose___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_7ThePose___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self) {
  struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_to_return = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":850
 *     @property
 *     def ThePose(self):
 *         cdef ovrPosef to_return = ovrPosef()             # <<<<<<<<<<<<<<
 *         (<ovrPosef>to_return).c_data[0] = <ovr_math.Posef>self.c_data[0].ThePose
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrPosef), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":851
 *     def ThePose(self):
 *         cdef ovrPosef to_return = ovrPosef()
 *         (<ovrPosef>to_return).c_data[0] = <ovr_math.Posef>self.c_data[0].ThePose             # <<<<<<<<<<<<<<
 * 
 *         return to_return
 */
  (__pyx_v_to_return->c_data[0]) = ((OVR::Posef)(__pyx_v_self->c_data[0]).ThePose);

  /* "psychxr/ovr/capi.pyx":853
 *         (<ovrPosef>to_return).c_data[0] = <ovr_math.Posef>self.c_data[0].ThePose
 * 
 *         return to_return             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":849
 * 
 *     @property
 *     def ThePose(self):             # <<<<<<<<<<<<<<
 *         cdef ovrPosef to_return = ovrPosef()
 *         (<ovrPosef>to_return).c_data[0] = <ovr_math.Posef>self.c_data[0].ThePose
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPoseStatef.ThePose.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":856
 * 
 *     @property
 *     def AngularVelocity(self):             # <<<<<<<<<<<<<<
 *         self.field_angular_velocity.c_data[0] = \
 *             (<ovr_math.Vector3f>self.c_data[0].AngularVelocity)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_15AngularVelocity_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_15AngularVelocity_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_15AngularVelocity___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_15AngularVelocity___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":857
 *     @property
 *     def AngularVelocity(self):
 *         self.field_angular_velocity.c_data[0] = \             # <<<<<<<<<<<<<<
 *             (<ovr_math.Vector3f>self.c_data[0].AngularVelocity)
 * 
 */
  (__pyx_v_self->field_angular_velocity->c_data[0]) = ((OVR::Vector3f)(__pyx_v_self->c_data[0]).AngularVelocity);

  /* "psychxr/ovr/capi.pyx":860
 *             (<ovr_math.Vector3f>self.c_data[0].AngularVelocity)
 * 
 *         return self.field_angular_velocity             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->field_angular_velocity));
  __pyx_r = ((PyObject *)__pyx_v_self->field_angular_velocity);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":856
 * 
 *     @property
 *     def AngularVelocity(self):             # <<<<<<<<<<<<<<
 *         self.field_angular_velocity.c_data[0] = \
 *             (<ovr_math.Vector3f>self.c_data[0].AngularVelocity)
 */

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

/* "psychxr/ovr/capi.pyx":863
 * 
 *     @property
 *     def LinearVelocity(self):             # <<<<<<<<<<<<<<
 *         self.field_linear_velocity.c_data[0] = \
 *             (<ovr_math.Vector3f>self.c_data[0].LinearVelocity)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_14LinearVelocity_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_14LinearVelocity_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_14LinearVelocity___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_14LinearVelocity___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":864
 *     @property
 *     def LinearVelocity(self):
 *         self.field_linear_velocity.c_data[0] = \             # <<<<<<<<<<<<<<
 *             (<ovr_math.Vector3f>self.c_data[0].LinearVelocity)
 * 
 */
  (__pyx_v_self->field_linear_velocity->c_data[0]) = ((OVR::Vector3f)(__pyx_v_self->c_data[0]).LinearVelocity);

  /* "psychxr/ovr/capi.pyx":867
 *             (<ovr_math.Vector3f>self.c_data[0].LinearVelocity)
 * 
 *         return self.field_linear_velocity             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->field_linear_velocity));
  __pyx_r = ((PyObject *)__pyx_v_self->field_linear_velocity);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":863
 * 
 *     @property
 *     def LinearVelocity(self):             # <<<<<<<<<<<<<<
 *         self.field_linear_velocity.c_data[0] = \
 *             (<ovr_math.Vector3f>self.c_data[0].LinearVelocity)
 */

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

/* "psychxr/ovr/capi.pyx":870
 * 
 *     @property
 *     def AngularAcceleration(self):             # <<<<<<<<<<<<<<
 *         self.field_angular_acceleration.c_data[0] = \
 *             (<ovr_math.Vector3f>self.c_data[0].AngularAcceleration)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_19AngularAcceleration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_19AngularAcceleration_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_19AngularAcceleration___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_19AngularAcceleration___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":871
 *     @property
 *     def AngularAcceleration(self):
 *         self.field_angular_acceleration.c_data[0] = \             # <<<<<<<<<<<<<<
 *             (<ovr_math.Vector3f>self.c_data[0].AngularAcceleration)
 * 
 */
  (__pyx_v_self->field_angular_acceleration->c_data[0]) = ((OVR::Vector3f)(__pyx_v_self->c_data[0]).AngularAcceleration);

  /* "psychxr/ovr/capi.pyx":874
 *             (<ovr_math.Vector3f>self.c_data[0].AngularAcceleration)
 * 
 *         return self.field_angular_acceleration             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->field_angular_acceleration));
  __pyx_r = ((PyObject *)__pyx_v_self->field_angular_acceleration);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":870
 * 
 *     @property
 *     def AngularAcceleration(self):             # <<<<<<<<<<<<<<
 *         self.field_angular_acceleration.c_data[0] = \
 *             (<ovr_math.Vector3f>self.c_data[0].AngularAcceleration)
 */

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

/* "psychxr/ovr/capi.pyx":877
 * 
 *     @property
 *     def LinearAcceleration(self):             # <<<<<<<<<<<<<<
 *         self.field_linear_acceleration.c_data[0] = \
 *             (<ovr_math.Vector3f>self.c_data[0].LinearAcceleration)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_18LinearAcceleration_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_18LinearAcceleration_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_18LinearAcceleration___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_18LinearAcceleration___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":878
 *     @property
 *     def LinearAcceleration(self):
 *         self.field_linear_acceleration.c_data[0] = \             # <<<<<<<<<<<<<<
 *             (<ovr_math.Vector3f>self.c_data[0].LinearAcceleration)
 * 
 */
  (__pyx_v_self->field_linear_acceleration->c_data[0]) = ((OVR::Vector3f)(__pyx_v_self->c_data[0]).LinearAcceleration);

  /* "psychxr/ovr/capi.pyx":881
 *             (<ovr_math.Vector3f>self.c_data[0].LinearAcceleration)
 * 
 *         return self.field_linear_acceleration             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->field_linear_acceleration));
  __pyx_r = ((PyObject *)__pyx_v_self->field_linear_acceleration);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":877
 * 
 *     @property
 *     def LinearAcceleration(self):             # <<<<<<<<<<<<<<
 *         self.field_linear_acceleration.c_data[0] = \
 *             (<ovr_math.Vector3f>self.c_data[0].LinearAcceleration)
 */

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

/* "psychxr/ovr/capi.pyx":884
 * 
 *     @property
 *     def TimeInSeconds(self):             # <<<<<<<<<<<<<<
 *         return <double>self.c_data[0].TimeInSeconds
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_13TimeInSeconds_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_13TimeInSeconds_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_13TimeInSeconds___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_13TimeInSeconds___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":885
 *     @property
 *     def TimeInSeconds(self):
 *         return <double>self.c_data[0].TimeInSeconds             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((double)(__pyx_v_self->c_data[0]).TimeInSeconds)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":884
 * 
 *     @property
 *     def TimeInSeconds(self):             # <<<<<<<<<<<<<<
 *         return <double>self.c_data[0].TimeInSeconds
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPoseStatef.TimeInSeconds.__get__", __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("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_3__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_7psychxr_3ovr_4capi_13ovrPoseStatef_2__reduce_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__12, 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("psychxr.ovr.capi.ovrPoseStatef.__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_7psychxr_3ovr_4capi_13ovrPoseStatef_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_5__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_7psychxr_3ovr_4capi_13ovrPoseStatef_4__setstate_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrPoseStatef_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__13, 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("psychxr.ovr.capi.ovrPoseStatef.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":899
 *     cdef ovr_capi.ovrTrackingState  c_ovrTrackingState
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrTrackingState
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData___cinit__(((struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static int __pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/ovr/capi.pyx":900
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.c_data = &self.c_ovrTrackingState             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data = (&__pyx_v_self->c_ovrTrackingState);

  /* "psychxr/ovr/capi.pyx":899
 *     cdef ovr_capi.ovrTrackingState  c_ovrTrackingState
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrTrackingState
 * 
 */

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

/* "psychxr/ovr/capi.pyx":903
 * 
 *     @property
 *     def HeadPose(self):             # <<<<<<<<<<<<<<
 *         cdef ovrPoseStatef to_return = ovrPoseStatef()
 *         (<ovrPoseStatef>to_return).c_data[0] = self.c_data[0].HeadPose
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_8HeadPose_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_8HeadPose_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_8HeadPose___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_8HeadPose___get__(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self) {
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_to_return = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  ovrPoseStatef __pyx_t_2;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":904
 *     @property
 *     def HeadPose(self):
 *         cdef ovrPoseStatef to_return = ovrPoseStatef()             # <<<<<<<<<<<<<<
 *         (<ovrPoseStatef>to_return).c_data[0] = self.c_data[0].HeadPose
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4capi_ovrPoseStatef), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":905
 *     def HeadPose(self):
 *         cdef ovrPoseStatef to_return = ovrPoseStatef()
 *         (<ovrPoseStatef>to_return).c_data[0] = self.c_data[0].HeadPose             # <<<<<<<<<<<<<<
 * 
 *         return to_return
 */
  __pyx_t_2 = (__pyx_v_self->c_data[0]).HeadPose;
  (__pyx_v_to_return->c_data[0]) = __pyx_t_2;

  /* "psychxr/ovr/capi.pyx":907
 *         (<ovrPoseStatef>to_return).c_data[0] = self.c_data[0].HeadPose
 * 
 *         return to_return             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":903
 * 
 *     @property
 *     def HeadPose(self):             # <<<<<<<<<<<<<<
 *         cdef ovrPoseStatef to_return = ovrPoseStatef()
 *         (<ovrPoseStatef>to_return).c_data[0] = self.c_data[0].HeadPose
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.TrackingStateData.HeadPose.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":910
 * 
 *     @property
 *     def StatusFlags(self):             # <<<<<<<<<<<<<<
 *         return <unsigned int>self.c_data[0].StatusFlags
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_11StatusFlags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_11StatusFlags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_11StatusFlags___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_11StatusFlags___get__(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":911
 *     @property
 *     def StatusFlags(self):
 *         return <unsigned int>self.c_data[0].StatusFlags             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(((unsigned int)(__pyx_v_self->c_data[0]).StatusFlags)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":910
 * 
 *     @property
 *     def StatusFlags(self):             # <<<<<<<<<<<<<<
 *         return <unsigned int>self.c_data[0].StatusFlags
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.TrackingStateData.StatusFlags.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":914
 * 
 *     @property
 *     def HandPoses(self):             # <<<<<<<<<<<<<<
 *         cdef ovrPoseStatef left_hand_pose = ovrPoseStatef()
 *         (<ovrPoseStatef>left_hand_pose).c_data[0] = self.c_data[0].HandPoses[0]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_9HandPoses_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_9HandPoses_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_9HandPoses___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_9HandPoses___get__(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self) {
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_left_hand_pose = 0;
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *__pyx_v_right_hand_pose = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":915
 *     @property
 *     def HandPoses(self):
 *         cdef ovrPoseStatef left_hand_pose = ovrPoseStatef()             # <<<<<<<<<<<<<<
 *         (<ovrPoseStatef>left_hand_pose).c_data[0] = self.c_data[0].HandPoses[0]
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4capi_ovrPoseStatef), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_left_hand_pose = ((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":916
 *     def HandPoses(self):
 *         cdef ovrPoseStatef left_hand_pose = ovrPoseStatef()
 *         (<ovrPoseStatef>left_hand_pose).c_data[0] = self.c_data[0].HandPoses[0]             # <<<<<<<<<<<<<<
 * 
 *         cdef ovrPoseStatef right_hand_pose = ovrPoseStatef()
 */
  (__pyx_v_left_hand_pose->c_data[0]) = ((__pyx_v_self->c_data[0]).HandPoses[0]);

  /* "psychxr/ovr/capi.pyx":918
 *         (<ovrPoseStatef>left_hand_pose).c_data[0] = self.c_data[0].HandPoses[0]
 * 
 *         cdef ovrPoseStatef right_hand_pose = ovrPoseStatef()             # <<<<<<<<<<<<<<
 *         (<ovrPoseStatef>right_hand_pose).c_data[0] = self.c_data[0].HandPoses[1]
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4capi_ovrPoseStatef), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_right_hand_pose = ((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":919
 * 
 *         cdef ovrPoseStatef right_hand_pose = ovrPoseStatef()
 *         (<ovrPoseStatef>right_hand_pose).c_data[0] = self.c_data[0].HandPoses[1]             # <<<<<<<<<<<<<<
 * 
 *         return left_hand_pose, right_hand_pose
 */
  (__pyx_v_right_hand_pose->c_data[0]) = ((__pyx_v_self->c_data[0]).HandPoses[1]);

  /* "psychxr/ovr/capi.pyx":921
 *         (<ovrPoseStatef>right_hand_pose).c_data[0] = self.c_data[0].HandPoses[1]
 * 
 *         return left_hand_pose, right_hand_pose             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 921, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_left_hand_pose));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_left_hand_pose));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_left_hand_pose));
  __Pyx_INCREF(((PyObject *)__pyx_v_right_hand_pose));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_right_hand_pose));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_right_hand_pose));
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":914
 * 
 *     @property
 *     def HandPoses(self):             # <<<<<<<<<<<<<<
 *         cdef ovrPoseStatef left_hand_pose = ovrPoseStatef()
 *         (<ovrPoseStatef>left_hand_pose).c_data[0] = self.c_data[0].HandPoses[0]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.TrackingStateData.HandPoses.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_left_hand_pose);
  __Pyx_XDECREF((PyObject *)__pyx_v_right_hand_pose);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":924
 * 
 *     @property
 *     def HandStatusFlags(self):             # <<<<<<<<<<<<<<
 *         return <unsigned int>self.c_data[0].HandStatusFlags[0], \
 *                <unsigned int>self.c_data[0].HandStatusFlags[1]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_15HandStatusFlags_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_15HandStatusFlags_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_15HandStatusFlags___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_15HandStatusFlags___get__(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":925
 *     @property
 *     def HandStatusFlags(self):
 *         return <unsigned int>self.c_data[0].HandStatusFlags[0], \             # <<<<<<<<<<<<<<
 *                <unsigned int>self.c_data[0].HandStatusFlags[1]
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(((unsigned int)((__pyx_v_self->c_data[0]).HandStatusFlags[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 925, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);

  /* "psychxr/ovr/capi.pyx":926
 *     def HandStatusFlags(self):
 *         return <unsigned int>self.c_data[0].HandStatusFlags[0], \
 *                <unsigned int>self.c_data[0].HandStatusFlags[1]             # <<<<<<<<<<<<<<
 * 
 * cpdef TrackingStateData getTrackingState(
 */
  __pyx_t_2 = __Pyx_PyInt_From_unsigned_int(((unsigned int)((__pyx_v_self->c_data[0]).HandStatusFlags[1]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);

  /* "psychxr/ovr/capi.pyx":925
 *     @property
 *     def HandStatusFlags(self):
 *         return <unsigned int>self.c_data[0].HandStatusFlags[0], \             # <<<<<<<<<<<<<<
 *                <unsigned int>self.c_data[0].HandStatusFlags[1]
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 925, __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;

  /* "psychxr/ovr/capi.pyx":924
 * 
 *     @property
 *     def HandStatusFlags(self):             # <<<<<<<<<<<<<<
 *         return <unsigned int>self.c_data[0].HandStatusFlags[0], \
 *                <unsigned int>self.c_data[0].HandStatusFlags[1]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.TrackingStateData.HandStatusFlags.__get__", __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("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_3__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_7psychxr_3ovr_4capi_17TrackingStateData_2__reduce_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__14, 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("psychxr.ovr.capi.TrackingStateData.__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_7psychxr_3ovr_4capi_17TrackingStateData_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_5__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_7psychxr_3ovr_4capi_17TrackingStateData_4__setstate_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_17TrackingStateData_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__15, 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("psychxr.ovr.capi.TrackingStateData.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":928
 *                <unsigned int>self.c_data[0].HandStatusFlags[1]
 * 
 * cpdef TrackingStateData getTrackingState(             # <<<<<<<<<<<<<<
 *         double abs_time,
 *         bint latency_marker=True):
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_39getTrackingState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_f_7psychxr_3ovr_4capi_getTrackingState(double __pyx_v_abs_time, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getTrackingState *__pyx_optional_args) {

  /* "psychxr/ovr/capi.pyx":930
 * cpdef TrackingStateData getTrackingState(
 *         double abs_time,
 *         bint latency_marker=True):             # <<<<<<<<<<<<<<
 * 
 *     cdef ovr_capi.ovrBool use_marker = \
 */
  int __pyx_v_latency_marker = ((int)1);
  ovrBool __pyx_v_use_marker;
  ovrTrackingState __pyx_v_ts;
  struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_to_return = 0;
  struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  ovrBool __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("getTrackingState", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_latency_marker = __pyx_optional_args->latency_marker;
    }
  }

  /* "psychxr/ovr/capi.pyx":933
 * 
 *     cdef ovr_capi.ovrBool use_marker = \
 *         ovr_capi.ovrTrue if latency_marker else ovr_capi.ovrFalse             # <<<<<<<<<<<<<<
 * 
 *     cdef ovr_capi.ovrTrackingState ts = ovr_capi.ovr_GetTrackingState(
 */
  if ((__pyx_v_latency_marker != 0)) {
    __pyx_t_1 = ovrTrue;
  } else {
    __pyx_t_1 = ovrFalse;
  }
  __pyx_v_use_marker = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":935
 *         ovr_capi.ovrTrue if latency_marker else ovr_capi.ovrFalse
 * 
 *     cdef ovr_capi.ovrTrackingState ts = ovr_capi.ovr_GetTrackingState(             # <<<<<<<<<<<<<<
 *         _ptr_session_, abs_time, use_marker)
 * 
 */
  __pyx_v_ts = ovr_GetTrackingState(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, __pyx_v_abs_time, __pyx_v_use_marker);

  /* "psychxr/ovr/capi.pyx":938
 *         _ptr_session_, abs_time, use_marker)
 * 
 *     cdef TrackingStateData to_return = TrackingStateData()             # <<<<<<<<<<<<<<
 *     (<TrackingStateData>to_return).c_data[0] = ts
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4capi_TrackingStateData), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":939
 * 
 *     cdef TrackingStateData to_return = TrackingStateData()
 *     (<TrackingStateData>to_return).c_data[0] = ts             # <<<<<<<<<<<<<<
 * 
 *     return to_return
 */
  (__pyx_v_to_return->c_data[0]) = __pyx_v_ts;

  /* "psychxr/ovr/capi.pyx":941
 *     (<TrackingStateData>to_return).c_data[0] = ts
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * cpdef void setTrackingOriginType(str origin='floor'):
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = __pyx_v_to_return;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":928
 *                <unsigned int>self.c_data[0].HandStatusFlags[1]
 * 
 * cpdef TrackingStateData getTrackingState(             # <<<<<<<<<<<<<<
 *         double abs_time,
 *         bint latency_marker=True):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("psychxr.ovr.capi.getTrackingState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_39getTrackingState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_39getTrackingState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  double __pyx_v_abs_time;
  int __pyx_v_latency_marker;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrackingState (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_abs_time,&__pyx_n_s_latency_marker,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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_abs_time)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_latency_marker);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTrackingState") < 0)) __PYX_ERR(0, 928, __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_abs_time = __pyx_PyFloat_AsDouble(values[0]); if (unlikely((__pyx_v_abs_time == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 929, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_latency_marker = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_latency_marker == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 930, __pyx_L3_error)
    } else {

      /* "psychxr/ovr/capi.pyx":930
 * cpdef TrackingStateData getTrackingState(
 *         double abs_time,
 *         bint latency_marker=True):             # <<<<<<<<<<<<<<
 * 
 *     cdef ovr_capi.ovrBool use_marker = \
 */
      __pyx_v_latency_marker = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTrackingState", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 928, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getTrackingState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_38getTrackingState(__pyx_self, __pyx_v_abs_time, __pyx_v_latency_marker);

  /* "psychxr/ovr/capi.pyx":928
 *                <unsigned int>self.c_data[0].HandStatusFlags[1]
 * 
 * cpdef TrackingStateData getTrackingState(             # <<<<<<<<<<<<<<
 *         double abs_time,
 *         bint latency_marker=True):
 */

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_38getTrackingState(CYTHON_UNUSED PyObject *__pyx_self, double __pyx_v_abs_time, int __pyx_v_latency_marker) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getTrackingState __pyx_t_2;
  __Pyx_RefNannySetupContext("getTrackingState", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.latency_marker = __pyx_v_latency_marker;
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_3ovr_4capi_getTrackingState(__pyx_v_abs_time, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 928, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":943
 *     return to_return
 * 
 * cpdef void setTrackingOriginType(str origin='floor'):             # <<<<<<<<<<<<<<
 *     """Set the tracking origin type. Can either be 'floor' or 'eye'.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_41setTrackingOriginType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setTrackingOriginType(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_setTrackingOriginType *__pyx_optional_args) {
  PyObject *__pyx_v_origin = ((PyObject*)__pyx_n_s_floor);
  ovrResult __pyx_v_result;
  __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;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("setTrackingOriginType", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_origin = __pyx_optional_args->origin;
    }
  }

  /* "psychxr/ovr/capi.pyx":951
 *     global _ptr_session_
 *     cdef ovr_capi.ovrResult result
 *     if origin == 'floor':             # <<<<<<<<<<<<<<
 *         result = ovr_capi.ovr_SetTrackingOriginType(
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_FloorLevel)
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_origin, __pyx_n_s_floor, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 951, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":952
 *     cdef ovr_capi.ovrResult result
 *     if origin == 'floor':
 *         result = ovr_capi.ovr_SetTrackingOriginType(             # <<<<<<<<<<<<<<
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_FloorLevel)
 *     elif origin == 'eye':
 */
    __pyx_v_result = ovr_SetTrackingOriginType(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ovrTrackingOrigin_FloorLevel);

    /* "psychxr/ovr/capi.pyx":951
 *     global _ptr_session_
 *     cdef ovr_capi.ovrResult result
 *     if origin == 'floor':             # <<<<<<<<<<<<<<
 *         result = ovr_capi.ovr_SetTrackingOriginType(
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_FloorLevel)
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":954
 *         result = ovr_capi.ovr_SetTrackingOriginType(
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_FloorLevel)
 *     elif origin == 'eye':             # <<<<<<<<<<<<<<
 *         result = ovr_capi.ovr_SetTrackingOriginType(
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_EyeLevel)
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_origin, __pyx_n_s_eye, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 954, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":955
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_FloorLevel)
 *     elif origin == 'eye':
 *         result = ovr_capi.ovr_SetTrackingOriginType(             # <<<<<<<<<<<<<<
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_EyeLevel)
 * 
 */
    __pyx_v_result = ovr_SetTrackingOriginType(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ovrTrackingOrigin_EyeLevel);

    /* "psychxr/ovr/capi.pyx":954
 *         result = ovr_capi.ovr_SetTrackingOriginType(
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_FloorLevel)
 *     elif origin == 'eye':             # <<<<<<<<<<<<<<
 *         result = ovr_capi.ovr_SetTrackingOriginType(
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_EyeLevel)
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":958
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_EyeLevel)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 958, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":959
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 * cpdef str getTrackingOriginType():
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 959, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "psychxr/ovr/capi.pyx":958
 *             _ptr_session_, ovr_capi.ovrTrackingOrigin_EyeLevel)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":943
 *     return to_return
 * 
 * cpdef void setTrackingOriginType(str origin='floor'):             # <<<<<<<<<<<<<<
 *     """Set the tracking origin type. Can either be 'floor' or 'eye'.
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __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_WriteUnraisable("psychxr.ovr.capi.setTrackingOriginType", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_41setTrackingOriginType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_40setTrackingOriginType[] = "Set the tracking origin type. Can either be 'floor' or 'eye'.\n    \n    :param origin: str\n    :return: \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_41setTrackingOriginType(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_origin = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setTrackingOriginType (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_origin,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject*)__pyx_n_s_floor);
    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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_origin);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setTrackingOriginType") < 0)) __PYX_ERR(0, 943, __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_origin = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setTrackingOriginType", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 943, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.setTrackingOriginType", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_origin), (&PyString_Type), 1, "origin", 1))) __PYX_ERR(0, 943, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_40setTrackingOriginType(__pyx_self, __pyx_v_origin);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_40setTrackingOriginType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_origin) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  struct __pyx_opt_args_7psychxr_3ovr_4capi_setTrackingOriginType __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("setTrackingOriginType", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1.__pyx_n = 1;
  __pyx_t_1.origin = __pyx_v_origin;
  __pyx_f_7psychxr_3ovr_4capi_setTrackingOriginType(0, &__pyx_t_1); 
  __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":961
 *         check_result(result)
 * 
 * cpdef str getTrackingOriginType():             # <<<<<<<<<<<<<<
 *     """Get the current tracking origin type.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_43getTrackingOriginType(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getTrackingOriginType(CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrTrackingOrigin __pyx_v_origin;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrackingOriginType", 0);

  /* "psychxr/ovr/capi.pyx":967
 *     """
 *     global _ptr_session_
 *     cdef ovr_capi.ovrTrackingOrigin origin = ovr_capi.ovr_GetTrackingOriginType(             # <<<<<<<<<<<<<<
 *         _ptr_session_)
 * 
 */
  __pyx_v_origin = ovr_GetTrackingOriginType(__pyx_v_7psychxr_3ovr_4capi__ptr_session_);

  /* "psychxr/ovr/capi.pyx":970
 *         _ptr_session_)
 * 
 *     if origin == ovr_capi.ovrTrackingOrigin_FloorLevel:             # <<<<<<<<<<<<<<
 *         return 'floor'
 *     elif origin == ovr_capi.ovrTrackingOrigin_EyeLevel:
 */
  switch (__pyx_v_origin) {
    case ovrTrackingOrigin_FloorLevel:

    /* "psychxr/ovr/capi.pyx":971
 * 
 *     if origin == ovr_capi.ovrTrackingOrigin_FloorLevel:
 *         return 'floor'             # <<<<<<<<<<<<<<
 *     elif origin == ovr_capi.ovrTrackingOrigin_EyeLevel:
 *         return 'eye'
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_floor);
    __pyx_r = __pyx_n_s_floor;
    goto __pyx_L0;

    /* "psychxr/ovr/capi.pyx":970
 *         _ptr_session_)
 * 
 *     if origin == ovr_capi.ovrTrackingOrigin_FloorLevel:             # <<<<<<<<<<<<<<
 *         return 'floor'
 *     elif origin == ovr_capi.ovrTrackingOrigin_EyeLevel:
 */
    break;

    /* "psychxr/ovr/capi.pyx":972
 *     if origin == ovr_capi.ovrTrackingOrigin_FloorLevel:
 *         return 'floor'
 *     elif origin == ovr_capi.ovrTrackingOrigin_EyeLevel:             # <<<<<<<<<<<<<<
 *         return 'eye'
 * 
 */
    case ovrTrackingOrigin_EyeLevel:

    /* "psychxr/ovr/capi.pyx":973
 *         return 'floor'
 *     elif origin == ovr_capi.ovrTrackingOrigin_EyeLevel:
 *         return 'eye'             # <<<<<<<<<<<<<<
 * 
 * cpdef void recenterTrackingOrigin():
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_eye);
    __pyx_r = __pyx_n_s_eye;
    goto __pyx_L0;

    /* "psychxr/ovr/capi.pyx":972
 *     if origin == ovr_capi.ovrTrackingOrigin_FloorLevel:
 *         return 'floor'
 *     elif origin == ovr_capi.ovrTrackingOrigin_EyeLevel:             # <<<<<<<<<<<<<<
 *         return 'eye'
 * 
 */
    break;
    default: break;
  }

  /* "psychxr/ovr/capi.pyx":961
 *         check_result(result)
 * 
 * cpdef str getTrackingOriginType():             # <<<<<<<<<<<<<<
 *     """Get the current tracking origin type.
 * 
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_43getTrackingOriginType(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_42getTrackingOriginType[] = "Get the current tracking origin type.\n    \n    :return: str\n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_43getTrackingOriginType(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTrackingOriginType (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_42getTrackingOriginType(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_42getTrackingOriginType(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getTrackingOriginType", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getTrackingOriginType(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":975
 *         return 'eye'
 * 
 * cpdef void recenterTrackingOrigin():             # <<<<<<<<<<<<<<
 *     """Recenter the tracking origin.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_45recenterTrackingOrigin(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_recenterTrackingOrigin(CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrResult __pyx_v_result;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("recenterTrackingOrigin", 0);

  /* "psychxr/ovr/capi.pyx":982
 *     """
 *     global _ptr_session_
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_RecenterTrackingOrigin(             # <<<<<<<<<<<<<<
 *         _ptr_session_)
 * 
 */
  __pyx_v_result = ovr_RecenterTrackingOrigin(__pyx_v_7psychxr_3ovr_4capi__ptr_session_);

  /* "psychxr/ovr/capi.pyx":985
 *         _ptr_session_)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 985, __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, 985, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":986
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 * cpdef void specifyTrackingOrigin(ovrPosef originPose):
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 986, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":985
 *         _ptr_session_)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":975
 *         return 'eye'
 * 
 * cpdef void recenterTrackingOrigin():             # <<<<<<<<<<<<<<
 *     """Recenter the tracking origin.
 * 
 */

  /* 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_WriteUnraisable("psychxr.ovr.capi.recenterTrackingOrigin", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_45recenterTrackingOrigin(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_44recenterTrackingOrigin[] = "Recenter the tracking origin.\n    \n    :return: None\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_45recenterTrackingOrigin(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("recenterTrackingOrigin (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_44recenterTrackingOrigin(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_44recenterTrackingOrigin(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("recenterTrackingOrigin", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_recenterTrackingOrigin(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":988
 *         check_result(result)
 * 
 * cpdef void specifyTrackingOrigin(ovrPosef originPose):             # <<<<<<<<<<<<<<
 *     """Specify a custom tracking origin.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_47specifyTrackingOrigin(PyObject *__pyx_self, PyObject *__pyx_v_originPose); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_specifyTrackingOrigin(struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_originPose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrResult __pyx_v_result;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("specifyTrackingOrigin", 0);

  /* "psychxr/ovr/capi.pyx":995
 *     """
 *     global _ptr_session_
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_SpecifyTrackingOrigin(             # <<<<<<<<<<<<<<
 *         _ptr_session_, <ovr_capi.ovrPosef>originPose.c_data[0])
 * 
 */
  __pyx_v_result = ovr_SpecifyTrackingOrigin(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (__pyx_v_originPose->c_data[0]));

  /* "psychxr/ovr/capi.pyx":998
 *         _ptr_session_, <ovr_capi.ovrPosef>originPose.c_data[0])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); 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) {

    /* "psychxr/ovr/capi.pyx":999
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 * cpdef list calcEyePoses(TrackingStateData trackingState):
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 999, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 999, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":998
 *         _ptr_session_, <ovr_capi.ovrPosef>originPose.c_data[0])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":988
 *         check_result(result)
 * 
 * cpdef void specifyTrackingOrigin(ovrPosef originPose):             # <<<<<<<<<<<<<<
 *     """Specify a custom tracking origin.
 * 
 */

  /* 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_WriteUnraisable("psychxr.ovr.capi.specifyTrackingOrigin", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_47specifyTrackingOrigin(PyObject *__pyx_self, PyObject *__pyx_v_originPose); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_46specifyTrackingOrigin[] = "Specify a custom tracking origin.\n    \n    :param origin_pose: ovrVector3f\n    :return: \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_47specifyTrackingOrigin(PyObject *__pyx_self, PyObject *__pyx_v_originPose) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("specifyTrackingOrigin (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_originPose), __pyx_ptype_7psychxr_3ovr_4math_ovrPosef, 1, "originPose", 0))) __PYX_ERR(0, 988, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_46specifyTrackingOrigin(__pyx_self, ((struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *)__pyx_v_originPose));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_46specifyTrackingOrigin(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_originPose) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("specifyTrackingOrigin", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_specifyTrackingOrigin(__pyx_v_originPose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1001
 *         check_result(result)
 * 
 * cpdef list calcEyePoses(TrackingStateData trackingState):             # <<<<<<<<<<<<<<
 *     """Calculate eye poses from tracking state data.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_49calcEyePoses(PyObject *__pyx_self, PyObject *__pyx_v_trackingState); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_calcEyePoses(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_trackingState, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_eye_pose0 = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_eye_pose1 = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("calcEyePoses", 0);

  /* "psychxr/ovr/capi.pyx":1015
 *     global _hmd_to_eye_view_pose_, _eye_layer_
 * 
 *     ovr_capi_util.ovr_CalcEyePoses2(             # <<<<<<<<<<<<<<
 *         trackingState.c_data[0].HeadPose.ThePose,
 *         _hmd_to_eye_view_pose_,
 */
  ovr_CalcEyePoses2((__pyx_v_trackingState->c_data[0]).HeadPose.ThePose, __pyx_v_7psychxr_3ovr_4capi__hmd_to_eye_view_pose_, __pyx_v_7psychxr_3ovr_4capi__eye_layer_.RenderPose);

  /* "psychxr/ovr/capi.pyx":1020
 *         _eye_layer_.RenderPose)
 * 
 *     cdef ovrPosef eye_pose0 = ovrPosef()             # <<<<<<<<<<<<<<
 *     cdef ovrPosef eye_pose1 = ovrPosef()
 *     (<ovrPosef>eye_pose0).c_data[0] = <ovr_math.Posef>_eye_layer_.RenderPose[0]
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrPosef), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_eye_pose0 = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1021
 * 
 *     cdef ovrPosef eye_pose0 = ovrPosef()
 *     cdef ovrPosef eye_pose1 = ovrPosef()             # <<<<<<<<<<<<<<
 *     (<ovrPosef>eye_pose0).c_data[0] = <ovr_math.Posef>_eye_layer_.RenderPose[0]
 *     (<ovrPosef>eye_pose1).c_data[0] = <ovr_math.Posef>_eye_layer_.RenderPose[1]
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrPosef), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_eye_pose1 = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1022
 *     cdef ovrPosef eye_pose0 = ovrPosef()
 *     cdef ovrPosef eye_pose1 = ovrPosef()
 *     (<ovrPosef>eye_pose0).c_data[0] = <ovr_math.Posef>_eye_layer_.RenderPose[0]             # <<<<<<<<<<<<<<
 *     (<ovrPosef>eye_pose1).c_data[0] = <ovr_math.Posef>_eye_layer_.RenderPose[1]
 * 
 */
  (__pyx_v_eye_pose0->c_data[0]) = ((OVR::Posef)(__pyx_v_7psychxr_3ovr_4capi__eye_layer_.RenderPose[0]));

  /* "psychxr/ovr/capi.pyx":1023
 *     cdef ovrPosef eye_pose1 = ovrPosef()
 *     (<ovrPosef>eye_pose0).c_data[0] = <ovr_math.Posef>_eye_layer_.RenderPose[0]
 *     (<ovrPosef>eye_pose1).c_data[0] = <ovr_math.Posef>_eye_layer_.RenderPose[1]             # <<<<<<<<<<<<<<
 * 
 *     return [eye_pose0, eye_pose1]
 */
  (__pyx_v_eye_pose1->c_data[0]) = ((OVR::Posef)(__pyx_v_7psychxr_3ovr_4capi__eye_layer_.RenderPose[1]));

  /* "psychxr/ovr/capi.pyx":1025
 *     (<ovrPosef>eye_pose1).c_data[0] = <ovr_math.Posef>_eye_layer_.RenderPose[1]
 * 
 *     return [eye_pose0, eye_pose1]             # <<<<<<<<<<<<<<
 * 
 * cpdef ovrMatrix4f getEyeViewMatrix(ovrPosef eyePose):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1025, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_v_eye_pose0));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_eye_pose0));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_eye_pose0));
  __Pyx_INCREF(((PyObject *)__pyx_v_eye_pose1));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_eye_pose1));
  PyList_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_eye_pose1));
  __pyx_r = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1001
 *         check_result(result)
 * 
 * cpdef list calcEyePoses(TrackingStateData trackingState):             # <<<<<<<<<<<<<<
 *     """Calculate eye poses from tracking state data.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.calcEyePoses", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_eye_pose0);
  __Pyx_XDECREF((PyObject *)__pyx_v_eye_pose1);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_49calcEyePoses(PyObject *__pyx_self, PyObject *__pyx_v_trackingState); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_48calcEyePoses[] = "Calculate eye poses from tracking state data.\n    \n    Poses are stored internally for conversion to transformation matrices by \n    calling 'get_eye_view_matrix'. Should be called at least once per frame \n    after 'wait_to_begin_frame' but before 'begin_frame' to minimize \n    motion-to-photon latency.\n    \n    :param tracking_state: TrackingStateData\n    :return: \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_49calcEyePoses(PyObject *__pyx_self, PyObject *__pyx_v_trackingState) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("calcEyePoses (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_trackingState), __pyx_ptype_7psychxr_3ovr_4capi_TrackingStateData, 1, "trackingState", 0))) __PYX_ERR(0, 1001, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_48calcEyePoses(__pyx_self, ((struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *)__pyx_v_trackingState));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_48calcEyePoses(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData *__pyx_v_trackingState) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("calcEyePoses", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_calcEyePoses(__pyx_v_trackingState, 0); 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;

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

/* "psychxr/ovr/capi.pyx":1027
 *     return [eye_pose0, eye_pose1]
 * 
 * cpdef ovrMatrix4f getEyeViewMatrix(ovrPosef eyePose):             # <<<<<<<<<<<<<<
 *     """Get the view matrix from the last calculated head pose. This should be
 *     called once per frame if real-time head tracking is desired.
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_51getEyeViewMatrix(PyObject *__pyx_self, PyObject *__pyx_v_eyePose); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *__pyx_f_7psychxr_3ovr_4capi_getEyeViewMatrix(struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_eyePose, CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *__pyx_v_pos = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *__pyx_v_rot = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *__pyx_v_final_up = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *__pyx_v_final_forward = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *__pyx_v_viewMatrix = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *__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;
  __Pyx_RefNannySetupContext("getEyeViewMatrix", 0);

  /* "psychxr/ovr/capi.pyx":1035
 * 
 *     """
 *     cdef ovrVector3f pos = ovrVector3f()             # <<<<<<<<<<<<<<
 *     cdef ovrMatrix4f rot = ovrMatrix4f()
 *     pos.c_data[0] = <ovr_math.Vector3f>eyePose.c_data.Translation
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrVector3f), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_pos = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1036
 *     """
 *     cdef ovrVector3f pos = ovrVector3f()
 *     cdef ovrMatrix4f rot = ovrMatrix4f()             # <<<<<<<<<<<<<<
 *     pos.c_data[0] = <ovr_math.Vector3f>eyePose.c_data.Translation
 *     rot.c_data[0] = ovr_math.Matrix4f(<ovr_math.Quatf>eyePose.c_data.Rotation)
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrMatrix4f), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_rot = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1037
 *     cdef ovrVector3f pos = ovrVector3f()
 *     cdef ovrMatrix4f rot = ovrMatrix4f()
 *     pos.c_data[0] = <ovr_math.Vector3f>eyePose.c_data.Translation             # <<<<<<<<<<<<<<
 *     rot.c_data[0] = ovr_math.Matrix4f(<ovr_math.Quatf>eyePose.c_data.Rotation)
 * 
 */
  (__pyx_v_pos->c_data[0]) = ((OVR::Vector3f)__pyx_v_eyePose->c_data->Translation);

  /* "psychxr/ovr/capi.pyx":1038
 *     cdef ovrMatrix4f rot = ovrMatrix4f()
 *     pos.c_data[0] = <ovr_math.Vector3f>eyePose.c_data.Translation
 *     rot.c_data[0] = ovr_math.Matrix4f(<ovr_math.Quatf>eyePose.c_data.Rotation)             # <<<<<<<<<<<<<<
 * 
 *     cdef ovrVector3f final_up = \
 */
  (__pyx_v_rot->c_data[0]) = OVR::Matrix4f(((OVR::Quatf)__pyx_v_eyePose->c_data->Rotation));

  /* "psychxr/ovr/capi.pyx":1041
 * 
 *     cdef ovrVector3f final_up = \
 *         (<ovrVector3f>rot).transform(ovrVector3f(0, 1, 0))             # <<<<<<<<<<<<<<
 *     cdef ovrVector3f final_forward = \
 *         (<ovrVector3f>rot).transform(ovrVector3f(0, 0, -1))
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rot), __pyx_n_s_transform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrVector3f), __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1041, __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);
    }
  }
  if (!__pyx_t_4) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else
    #endif
    {
      __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1041, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __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;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7psychxr_3ovr_4math_ovrVector3f))))) __PYX_ERR(0, 1041, __pyx_L1_error)
  __pyx_v_final_up = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1043
 *         (<ovrVector3f>rot).transform(ovrVector3f(0, 1, 0))
 *     cdef ovrVector3f final_forward = \
 *         (<ovrVector3f>rot).transform(ovrVector3f(0, 0, -1))             # <<<<<<<<<<<<<<
 *     cdef ovrMatrix4f viewMatrix = \
 *         ovrMatrix4f.lookAt(pos, pos + final_forward, final_up)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_rot), __pyx_n_s_transform); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrVector3f), __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __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);
    }
  }
  if (!__pyx_t_3) {
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
  } else {
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    #if CYTHON_FAST_PYCCALL
    if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
      PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
      __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else
    #endif
    {
      __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1043, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7psychxr_3ovr_4math_ovrVector3f))))) __PYX_ERR(0, 1043, __pyx_L1_error)
  __pyx_v_final_forward = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1045
 *         (<ovrVector3f>rot).transform(ovrVector3f(0, 0, -1))
 *     cdef ovrMatrix4f viewMatrix = \
 *         ovrMatrix4f.lookAt(pos, pos + final_forward, final_up)             # <<<<<<<<<<<<<<
 * 
 *     return viewMatrix
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrMatrix4f), __pyx_n_s_lookAt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = PyNumber_Add(((PyObject *)__pyx_v_pos), ((PyObject *)__pyx_v_final_forward)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = NULL;
  __pyx_t_6 = 0;
  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_6 = 1;
    }
  }
  #if CYTHON_FAST_PYCALL
  if (PyFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_pos), __pyx_t_4, ((PyObject *)__pyx_v_final_up)};
    __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  #if CYTHON_FAST_PYCCALL
  if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
    PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_pos), __pyx_t_4, ((PyObject *)__pyx_v_final_up)};
    __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error)
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  } else
  #endif
  {
    __pyx_t_3 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (__pyx_t_5) {
      __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_pos));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_pos));
    PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_6, ((PyObject *)__pyx_v_pos));
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_6, __pyx_t_4);
    __Pyx_INCREF(((PyObject *)__pyx_v_final_up));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_final_up));
    PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_6, ((PyObject *)__pyx_v_final_up));
    __pyx_t_4 = 0;
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1045, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7psychxr_3ovr_4math_ovrMatrix4f))))) __PYX_ERR(0, 1045, __pyx_L1_error)
  __pyx_v_viewMatrix = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1047
 *         ovrMatrix4f.lookAt(pos, pos + final_forward, final_up)
 * 
 *     return viewMatrix             # <<<<<<<<<<<<<<
 * 
 * cpdef ovrMatrix4f getEyeProjectionMatrix(
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_viewMatrix));
  __pyx_r = __pyx_v_viewMatrix;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1027
 *     return [eye_pose0, eye_pose1]
 * 
 * cpdef ovrMatrix4f getEyeViewMatrix(ovrPosef eyePose):             # <<<<<<<<<<<<<<
 *     """Get the view matrix from the last calculated head pose. This should be
 *     called once per frame if real-time head tracking is desired.
 */

  /* 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("psychxr.ovr.capi.getEyeViewMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_pos);
  __Pyx_XDECREF((PyObject *)__pyx_v_rot);
  __Pyx_XDECREF((PyObject *)__pyx_v_final_up);
  __Pyx_XDECREF((PyObject *)__pyx_v_final_forward);
  __Pyx_XDECREF((PyObject *)__pyx_v_viewMatrix);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_51getEyeViewMatrix(PyObject *__pyx_self, PyObject *__pyx_v_eyePose); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_50getEyeViewMatrix[] = "Get the view matrix from the last calculated head pose. This should be\n    called once per frame if real-time head tracking is desired.\n    \n    :param eye: str\n    :return: \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_51getEyeViewMatrix(PyObject *__pyx_self, PyObject *__pyx_v_eyePose) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeViewMatrix (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_eyePose), __pyx_ptype_7psychxr_3ovr_4math_ovrPosef, 1, "eyePose", 0))) __PYX_ERR(0, 1027, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_50getEyeViewMatrix(__pyx_self, ((struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *)__pyx_v_eyePose));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_50getEyeViewMatrix(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *__pyx_v_eyePose) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getEyeViewMatrix", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_3ovr_4capi_getEyeViewMatrix(__pyx_v_eyePose, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1049
 *     return viewMatrix
 * 
 * cpdef ovrMatrix4f getEyeProjectionMatrix(             # <<<<<<<<<<<<<<
 *         int eye,
 *         float near_clip=0.2,
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_53getEyeProjectionMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *__pyx_f_7psychxr_3ovr_4capi_getEyeProjectionMatrix(int __pyx_v_eye, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getEyeProjectionMatrix *__pyx_optional_args) {
  float __pyx_v_near_clip = ((float)0.2);
  float __pyx_v_far_clip = ((float)1000.0);
  struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *__pyx_v_projectionMatrix = 0;
  struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getEyeProjectionMatrix", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_near_clip = __pyx_optional_args->near_clip;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_far_clip = __pyx_optional_args->far_clip;
      }
    }
  }

  /* "psychxr/ovr/capi.pyx":1065
 *     global _eye_layer_
 * 
 *     cdef ovrMatrix4f projectionMatrix = ovrMatrix4f()             # <<<<<<<<<<<<<<
 *     (<ovrMatrix4f>projectionMatrix).c_data[0] = \
 *         <ovr_math.Matrix4f>ovr_capi_util.ovrMatrix4f_Projection(
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4math_ovrMatrix4f), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_projectionMatrix = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1066
 * 
 *     cdef ovrMatrix4f projectionMatrix = ovrMatrix4f()
 *     (<ovrMatrix4f>projectionMatrix).c_data[0] = \             # <<<<<<<<<<<<<<
 *         <ovr_math.Matrix4f>ovr_capi_util.ovrMatrix4f_Projection(
 *             _eye_layer_.Fov[eye],
 */
  (__pyx_v_projectionMatrix->c_data[0]) = ((OVR::Matrix4f)ovrMatrix4f_Projection((__pyx_v_7psychxr_3ovr_4capi__eye_layer_.Fov[__pyx_v_eye]), __pyx_v_near_clip, __pyx_v_far_clip, ovrProjection_ClipRangeOpenGL));

  /* "psychxr/ovr/capi.pyx":1073
 *             ovr_capi_util.ovrProjection_ClipRangeOpenGL)
 * 
 *     return projectionMatrix             # <<<<<<<<<<<<<<
 * 
 * # -------------------------
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_projectionMatrix));
  __pyx_r = __pyx_v_projectionMatrix;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1049
 *     return viewMatrix
 * 
 * cpdef ovrMatrix4f getEyeProjectionMatrix(             # <<<<<<<<<<<<<<
 *         int eye,
 *         float near_clip=0.2,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.getEyeProjectionMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_projectionMatrix);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_53getEyeProjectionMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_52getEyeProjectionMatrix[] = "Get the projection matrix for a specified eye. These do not need to be\n    computed more than once per session unless the render layer descriptors are \n    updated, or the clipping planes have been changed.\n    \n    :param eye: str \n    :param near_clip: float\n    :param far_clip: float\n    :return: \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_53getEyeProjectionMatrix(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_eye;
  float __pyx_v_near_clip;
  float __pyx_v_far_clip;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeProjectionMatrix (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_eye,&__pyx_n_s_near_clip,&__pyx_n_s_far_clip,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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_eye)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_near_clip);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_far_clip);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getEyeProjectionMatrix") < 0)) __PYX_ERR(0, 1049, __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);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_eye = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_eye == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1050, __pyx_L3_error)
    if (values[1]) {
      __pyx_v_near_clip = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_near_clip == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1051, __pyx_L3_error)
    } else {
      __pyx_v_near_clip = ((float)0.2);
    }
    if (values[2]) {
      __pyx_v_far_clip = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_far_clip == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1052, __pyx_L3_error)
    } else {
      __pyx_v_far_clip = ((float)1000.0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getEyeProjectionMatrix", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1049, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getEyeProjectionMatrix", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_52getEyeProjectionMatrix(__pyx_self, __pyx_v_eye, __pyx_v_near_clip, __pyx_v_far_clip);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_52getEyeProjectionMatrix(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_eye, float __pyx_v_near_clip, float __pyx_v_far_clip) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getEyeProjectionMatrix __pyx_t_2;
  __Pyx_RefNannySetupContext("getEyeProjectionMatrix", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.near_clip = __pyx_v_near_clip;
  __pyx_t_2.far_clip = __pyx_v_far_clip;
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_3ovr_4capi_getEyeProjectionMatrix(__pyx_v_eye, 0, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1049, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1079
 * # -------------------------
 * #
 * cpdef double getDisplayTime(unsigned int frameIndex=0, bint predicted=True):             # <<<<<<<<<<<<<<
 *     """Get the current display time. If 'predicted=True', the predicted
 *     mid-frame time is returned.
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_55getDisplayTime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static double __pyx_f_7psychxr_3ovr_4capi_getDisplayTime(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getDisplayTime *__pyx_optional_args) {
  unsigned int __pyx_v_frameIndex = ((unsigned int)0);
  int __pyx_v_predicted = ((int)1);
  double __pyx_v_t_secs;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("getDisplayTime", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_frameIndex = __pyx_optional_args->frameIndex;
      if (__pyx_optional_args->__pyx_n > 1) {
        __pyx_v_predicted = __pyx_optional_args->predicted;
      }
    }
  }

  /* "psychxr/ovr/capi.pyx":1089
 *     """
 *     cdef double t_secs
 *     if predicted:             # <<<<<<<<<<<<<<
 *         t_secs = ovr_capi.ovr_GetPredictedDisplayTime(
 *             _ptr_session_, frameIndex)
 */
  __pyx_t_1 = (__pyx_v_predicted != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1090
 *     cdef double t_secs
 *     if predicted:
 *         t_secs = ovr_capi.ovr_GetPredictedDisplayTime(             # <<<<<<<<<<<<<<
 *             _ptr_session_, frameIndex)
 *     else:
 */
    __pyx_v_t_secs = ovr_GetPredictedDisplayTime(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, __pyx_v_frameIndex);

    /* "psychxr/ovr/capi.pyx":1089
 *     """
 *     cdef double t_secs
 *     if predicted:             # <<<<<<<<<<<<<<
 *         t_secs = ovr_capi.ovr_GetPredictedDisplayTime(
 *             _ptr_session_, frameIndex)
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1093
 *             _ptr_session_, frameIndex)
 *     else:
 *         t_secs = ovr_capi.ovr_GetTimeInSeconds()             # <<<<<<<<<<<<<<
 * 
 *     return t_secs
 */
  /*else*/ {
    __pyx_v_t_secs = ovr_GetTimeInSeconds();
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1095
 *         t_secs = ovr_capi.ovr_GetTimeInSeconds()
 * 
 *     return t_secs             # <<<<<<<<<<<<<<
 * 
 * cpdef int waitToBeginFrame(unsigned int frameIndex=0):
 */
  __pyx_r = __pyx_v_t_secs;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1079
 * # -------------------------
 * #
 * cpdef double getDisplayTime(unsigned int frameIndex=0, bint predicted=True):             # <<<<<<<<<<<<<<
 *     """Get the current display time. If 'predicted=True', the predicted
 *     mid-frame time is returned.
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_55getDisplayTime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_54getDisplayTime[] = "Get the current display time. If 'predicted=True', the predicted \n    mid-frame time is returned.\n    \n    :param frameIndex: int\n    :param predicted: boolean\n    :return: float\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_55getDisplayTime(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_frameIndex;
  int __pyx_v_predicted;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getDisplayTime (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frameIndex,&__pyx_n_s_predicted,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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frameIndex);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_predicted);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getDisplayTime") < 0)) __PYX_ERR(0, 1079, __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_frameIndex = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_frameIndex == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
    } else {
      __pyx_v_frameIndex = ((unsigned int)0);
    }
    if (values[1]) {
      __pyx_v_predicted = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_predicted == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L3_error)
    } else {
      __pyx_v_predicted = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getDisplayTime", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1079, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getDisplayTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_54getDisplayTime(__pyx_self, __pyx_v_frameIndex, __pyx_v_predicted);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_54getDisplayTime(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex, int __pyx_v_predicted) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  double __pyx_t_1;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getDisplayTime __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getDisplayTime", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 2;
  __pyx_t_2.frameIndex = __pyx_v_frameIndex;
  __pyx_t_2.predicted = __pyx_v_predicted;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getDisplayTime(0, &__pyx_t_2); 
  __pyx_t_3 = PyFloat_FromDouble(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.getDisplayTime", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1097
 *     return t_secs
 * 
 * cpdef int waitToBeginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result = 0
 *     result = ovr_capi.ovr_WaitToBeginFrame(_ptr_session_, frameIndex)
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_57waitToBeginFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_waitToBeginFrame(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_waitToBeginFrame *__pyx_optional_args) {
  unsigned int __pyx_v_frameIndex = ((unsigned int)0);
  ovrResult __pyx_v_result;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("waitToBeginFrame", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_frameIndex = __pyx_optional_args->frameIndex;
    }
  }

  /* "psychxr/ovr/capi.pyx":1098
 * 
 * cpdef int waitToBeginFrame(unsigned int frameIndex=0):
 *     cdef ovr_capi.ovrResult result = 0             # <<<<<<<<<<<<<<
 *     result = ovr_capi.ovr_WaitToBeginFrame(_ptr_session_, frameIndex)
 * 
 */
  __pyx_v_result = 0;

  /* "psychxr/ovr/capi.pyx":1099
 * cpdef int waitToBeginFrame(unsigned int frameIndex=0):
 *     cdef ovr_capi.ovrResult result = 0
 *     result = ovr_capi.ovr_WaitToBeginFrame(_ptr_session_, frameIndex)             # <<<<<<<<<<<<<<
 * 
 *     return <int>result
 */
  __pyx_v_result = ovr_WaitToBeginFrame(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, __pyx_v_frameIndex);

  /* "psychxr/ovr/capi.pyx":1101
 *     result = ovr_capi.ovr_WaitToBeginFrame(_ptr_session_, frameIndex)
 * 
 *     return <int>result             # <<<<<<<<<<<<<<
 * 
 * cpdef int beginFrame(unsigned int frameIndex=0):
 */
  __pyx_r = ((int)__pyx_v_result);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1097
 *     return t_secs
 * 
 * cpdef int waitToBeginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result = 0
 *     result = ovr_capi.ovr_WaitToBeginFrame(_ptr_session_, frameIndex)
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_57waitToBeginFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_57waitToBeginFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_frameIndex;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("waitToBeginFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frameIndex,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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frameIndex);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "waitToBeginFrame") < 0)) __PYX_ERR(0, 1097, __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_frameIndex = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_frameIndex == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1097, __pyx_L3_error)
    } else {
      __pyx_v_frameIndex = ((unsigned int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("waitToBeginFrame", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1097, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.waitToBeginFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_56waitToBeginFrame(__pyx_self, __pyx_v_frameIndex);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_56waitToBeginFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_waitToBeginFrame __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("waitToBeginFrame", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.frameIndex = __pyx_v_frameIndex;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_waitToBeginFrame(0, &__pyx_t_2); 
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.waitToBeginFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1103
 *     return <int>result
 * 
 * cpdef int beginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     result = ovr_capi.ovr_BeginFrame(_ptr_session_, frameIndex)
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_59beginFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_beginFrame(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_beginFrame *__pyx_optional_args) {
  unsigned int __pyx_v_frameIndex = ((unsigned int)0);
  ovrResult __pyx_v_result;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("beginFrame", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_frameIndex = __pyx_optional_args->frameIndex;
    }
  }

  /* "psychxr/ovr/capi.pyx":1104
 * 
 * cpdef int beginFrame(unsigned int frameIndex=0):
 *     result = ovr_capi.ovr_BeginFrame(_ptr_session_, frameIndex)             # <<<<<<<<<<<<<<
 * 
 *     return <int>result
 */
  __pyx_v_result = ovr_BeginFrame(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, __pyx_v_frameIndex);

  /* "psychxr/ovr/capi.pyx":1106
 *     result = ovr_capi.ovr_BeginFrame(_ptr_session_, frameIndex)
 * 
 *     return <int>result             # <<<<<<<<<<<<<<
 * 
 * cpdef void commitSwapChain(int sc):
 */
  __pyx_r = ((int)__pyx_v_result);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1103
 *     return <int>result
 * 
 * cpdef int beginFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     result = ovr_capi.ovr_BeginFrame(_ptr_session_, frameIndex)
 * 
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_59beginFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_59beginFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_frameIndex;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("beginFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frameIndex,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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frameIndex);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "beginFrame") < 0)) __PYX_ERR(0, 1103, __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_frameIndex = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_frameIndex == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1103, __pyx_L3_error)
    } else {
      __pyx_v_frameIndex = ((unsigned int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("beginFrame", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1103, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.beginFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_58beginFrame(__pyx_self, __pyx_v_frameIndex);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_58beginFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_beginFrame __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("beginFrame", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.frameIndex = __pyx_v_frameIndex;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_beginFrame(0, &__pyx_t_2); 
  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.beginFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1108
 *     return <int>result
 * 
 * cpdef void commitSwapChain(int sc):             # <<<<<<<<<<<<<<
 *     global _ptr_session_, _swap_chain_
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_CommitTextureSwapChain(
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_61commitSwapChain(PyObject *__pyx_self, PyObject *__pyx_arg_sc); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_commitSwapChain(int __pyx_v_sc, CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrResult __pyx_v_result;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("commitSwapChain", 0);

  /* "psychxr/ovr/capi.pyx":1110
 * cpdef void commitSwapChain(int sc):
 *     global _ptr_session_, _swap_chain_
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_CommitTextureSwapChain(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         _swap_chain_[sc])
 */
  __pyx_v_result = ovr_CommitTextureSwapChain(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (__pyx_v_7psychxr_3ovr_4capi__swap_chain_[__pyx_v_sc]));

  /* "psychxr/ovr/capi.pyx":1114
 *         _swap_chain_[sc])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __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, 1114, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1115
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 * cpdef void endFrame(unsigned int frameIndex=0):
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1115, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1115, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1115, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":1114
 *         _swap_chain_[sc])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":1108
 *     return <int>result
 * 
 * cpdef void commitSwapChain(int sc):             # <<<<<<<<<<<<<<
 *     global _ptr_session_, _swap_chain_
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_CommitTextureSwapChain(
 */

  /* 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_WriteUnraisable("psychxr.ovr.capi.commitSwapChain", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_61commitSwapChain(PyObject *__pyx_self, PyObject *__pyx_arg_sc); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_61commitSwapChain(PyObject *__pyx_self, PyObject *__pyx_arg_sc) {
  int __pyx_v_sc;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("commitSwapChain (wrapper)", 0);
  assert(__pyx_arg_sc); {
    __pyx_v_sc = __Pyx_PyInt_As_int(__pyx_arg_sc); if (unlikely((__pyx_v_sc == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1108, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.commitSwapChain", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_60commitSwapChain(__pyx_self, ((int)__pyx_v_sc));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_60commitSwapChain(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_sc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("commitSwapChain", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_commitSwapChain(__pyx_v_sc, 0)); 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;

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

/* "psychxr/ovr/capi.pyx":1117
 *         check_result(result)
 * 
 * cpdef void endFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     global _eye_layer_
 *     cdef ovr_capi.ovrLayerHeader* layers = &_eye_layer_.Header
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_63endFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_endFrame(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_endFrame *__pyx_optional_args) {
  unsigned int __pyx_v_frameIndex = ((unsigned int)0);
  ovrLayerHeader *__pyx_v_layers;
  ovrResult __pyx_v_result;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("endFrame", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_frameIndex = __pyx_optional_args->frameIndex;
    }
  }

  /* "psychxr/ovr/capi.pyx":1119
 * cpdef void endFrame(unsigned int frameIndex=0):
 *     global _eye_layer_
 *     cdef ovr_capi.ovrLayerHeader* layers = &_eye_layer_.Header             # <<<<<<<<<<<<<<
 *     result = ovr_capi.ovr_EndFrame(
 *         _ptr_session_,
 */
  __pyx_v_layers = (&__pyx_v_7psychxr_3ovr_4capi__eye_layer_.Header);

  /* "psychxr/ovr/capi.pyx":1120
 *     global _eye_layer_
 *     cdef ovr_capi.ovrLayerHeader* layers = &_eye_layer_.Header
 *     result = ovr_capi.ovr_EndFrame(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         frameIndex,
 */
  __pyx_v_result = ovr_EndFrame(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, __pyx_v_frameIndex, NULL, (&__pyx_v_layers), ((unsigned int)1));

  /* "psychxr/ovr/capi.pyx":1127
 *         <unsigned int>1)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __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, 1127, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1128
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 *     global _frame_index_
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1128, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1128, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":1127
 *         <unsigned int>1)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":1131
 * 
 *     global _frame_index_
 *     _frame_index_ += 1             # <<<<<<<<<<<<<<
 * 
 * # ------------------------
 */
  __pyx_v_7psychxr_3ovr_4capi__frame_index_ = (__pyx_v_7psychxr_3ovr_4capi__frame_index_ + 1);

  /* "psychxr/ovr/capi.pyx":1117
 *         check_result(result)
 * 
 * cpdef void endFrame(unsigned int frameIndex=0):             # <<<<<<<<<<<<<<
 *     global _eye_layer_
 *     cdef ovr_capi.ovrLayerHeader* layers = &_eye_layer_.Header
 */

  /* 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_WriteUnraisable("psychxr.ovr.capi.endFrame", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_63endFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_63endFrame(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  unsigned int __pyx_v_frameIndex;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("endFrame (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_frameIndex,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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frameIndex);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "endFrame") < 0)) __PYX_ERR(0, 1117, __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_frameIndex = __Pyx_PyInt_As_unsigned_int(values[0]); if (unlikely((__pyx_v_frameIndex == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1117, __pyx_L3_error)
    } else {
      __pyx_v_frameIndex = ((unsigned int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("endFrame", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1117, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.endFrame", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_62endFrame(__pyx_self, __pyx_v_frameIndex);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_62endFrame(CYTHON_UNUSED PyObject *__pyx_self, unsigned int __pyx_v_frameIndex) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  struct __pyx_opt_args_7psychxr_3ovr_4capi_endFrame __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("endFrame", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1.__pyx_n = 1;
  __pyx_t_1.frameIndex = __pyx_v_frameIndex;
  __pyx_f_7psychxr_3ovr_4capi_endFrame(0, &__pyx_t_1); 
  __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1117, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1151
 *     cdef ovr_capi.ovrMirrorTextureDesc c_ovrMirrorTextureDesc
 * 
 *     def __cinit__(             # <<<<<<<<<<<<<<
 *             self,
 *             int _format=OVR_FORMAT_R8G8B8A8_UNORM_SRGB,
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v__format;
  int __pyx_v_width;
  int __pyx_v_height;
  int __pyx_v_mirrorOptions;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_format,&__pyx_n_s_width,&__pyx_n_s_height,&__pyx_n_s_mirrorOptions,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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_format);
          if (value) { values[0] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_width);
          if (value) { values[1] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_height);
          if (value) { values[2] = value; kw_args--; }
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mirrorOptions);
          if (value) { values[3] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 1151, __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__format = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v__format == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L3_error)
    } else {
      __pyx_v__format = __pyx_k__18;
    }
    if (values[1]) {
      __pyx_v_width = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_width == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1154, __pyx_L3_error)
    } else {
      __pyx_v_width = ((int)0x320);
    }
    if (values[2]) {
      __pyx_v_height = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_height == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1155, __pyx_L3_error)
    } else {
      __pyx_v_height = ((int)0x258);
    }
    if (values[3]) {
      __pyx_v_mirrorOptions = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_mirrorOptions == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1156, __pyx_L3_error)
    } else {
      __pyx_v_mirrorOptions = __pyx_k__19;
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1151, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrMirrorTextureDesc.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc___cinit__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self), __pyx_v__format, __pyx_v_width, __pyx_v_height, __pyx_v_mirrorOptions);

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

static int __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, int __pyx_v__format, int __pyx_v_width, int __pyx_v_height, int __pyx_v_mirrorOptions) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/ovr/capi.pyx":1158
 *             int mirrorOptions=ovrMirrorOption_Default):
 * 
 *         self.c_ovrMirrorTextureDesc.Format = <ovr_capi.ovrTextureFormat>_format             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.Width = width
 *         self.c_ovrMirrorTextureDesc.Height = height
 */
  __pyx_v_self->c_ovrMirrorTextureDesc.Format = ((ovrTextureFormat)__pyx_v__format);

  /* "psychxr/ovr/capi.pyx":1159
 * 
 *         self.c_ovrMirrorTextureDesc.Format = <ovr_capi.ovrTextureFormat>_format
 *         self.c_ovrMirrorTextureDesc.Width = width             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.Height = height
 *         self.c_ovrMirrorTextureDesc.MiscFlags = ovr_capi.ovrTextureMisc_None
 */
  __pyx_v_self->c_ovrMirrorTextureDesc.Width = __pyx_v_width;

  /* "psychxr/ovr/capi.pyx":1160
 *         self.c_ovrMirrorTextureDesc.Format = <ovr_capi.ovrTextureFormat>_format
 *         self.c_ovrMirrorTextureDesc.Width = width
 *         self.c_ovrMirrorTextureDesc.Height = height             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.MiscFlags = ovr_capi.ovrTextureMisc_None
 *         self.c_ovrMirrorTextureDesc.MirrorOptions = <int32_t>mirrorOptions
 */
  __pyx_v_self->c_ovrMirrorTextureDesc.Height = __pyx_v_height;

  /* "psychxr/ovr/capi.pyx":1161
 *         self.c_ovrMirrorTextureDesc.Width = width
 *         self.c_ovrMirrorTextureDesc.Height = height
 *         self.c_ovrMirrorTextureDesc.MiscFlags = ovr_capi.ovrTextureMisc_None             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.MirrorOptions = <int32_t>mirrorOptions
 * 
 */
  __pyx_v_self->c_ovrMirrorTextureDesc.MiscFlags = ovrTextureMisc_None;

  /* "psychxr/ovr/capi.pyx":1162
 *         self.c_ovrMirrorTextureDesc.Height = height
 *         self.c_ovrMirrorTextureDesc.MiscFlags = ovr_capi.ovrTextureMisc_None
 *         self.c_ovrMirrorTextureDesc.MirrorOptions = <int32_t>mirrorOptions             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrMirrorTextureDesc.MirrorOptions = ((int32_t)__pyx_v_mirrorOptions);

  /* "psychxr/ovr/capi.pyx":1151
 *     cdef ovr_capi.ovrMirrorTextureDesc c_ovrMirrorTextureDesc
 * 
 *     def __cinit__(             # <<<<<<<<<<<<<<
 *             self,
 *             int _format=OVR_FORMAT_R8G8B8A8_UNORM_SRGB,
 */

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

/* "psychxr/ovr/capi.pyx":1165
 * 
 *     @property
 *     def Format(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrMirrorTextureDesc.Format
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1166
 *     @property
 *     def Format(self):
 *         return <int>self.c_ovrMirrorTextureDesc.Format             # <<<<<<<<<<<<<<
 * 
 *     @Format.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrMirrorTextureDesc.Format)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1165
 * 
 *     @property
 *     def Format(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrMirrorTextureDesc.Format
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrMirrorTextureDesc.Format.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1169
 * 
 *     @Format.setter
 *     def Format(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.Format = <ovr_capi.ovrTextureFormat>value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1169, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrMirrorTextureDesc.Format.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":1170
 *     @Format.setter
 *     def Format(self, int value):
 *         self.c_ovrMirrorTextureDesc.Format = <ovr_capi.ovrTextureFormat>value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrMirrorTextureDesc.Format = ((ovrTextureFormat)__pyx_v_value);

  /* "psychxr/ovr/capi.pyx":1169
 * 
 *     @Format.setter
 *     def Format(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.Format = <ovr_capi.ovrTextureFormat>value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":1173
 * 
 *     @property
 *     def Width(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrMirrorTextureDesc.Width
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1174
 *     @property
 *     def Width(self):
 *         return <int>self.c_ovrMirrorTextureDesc.Width             # <<<<<<<<<<<<<<
 * 
 *     @Width.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrMirrorTextureDesc.Width)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1173
 * 
 *     @property
 *     def Width(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrMirrorTextureDesc.Width
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrMirrorTextureDesc.Width.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1177
 * 
 *     @Width.setter
 *     def Width(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.Width = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1177, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrMirrorTextureDesc.Width.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":1178
 *     @Width.setter
 *     def Width(self, int value):
 *         self.c_ovrMirrorTextureDesc.Width = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrMirrorTextureDesc.Width = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":1177
 * 
 *     @Width.setter
 *     def Width(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.Width = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":1181
 * 
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrMirrorTextureDesc.Height
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1182
 *     @property
 *     def Height(self):
 *         return <int>self.c_ovrMirrorTextureDesc.Height             # <<<<<<<<<<<<<<
 * 
 *     @Height.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrMirrorTextureDesc.Height)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1181
 * 
 *     @property
 *     def Height(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrMirrorTextureDesc.Height
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrMirrorTextureDesc.Height.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1185
 * 
 *     @Height.setter
 *     def Height(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.Height = value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1185, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrMirrorTextureDesc.Height.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":1186
 *     @Height.setter
 *     def Height(self, int value):
 *         self.c_ovrMirrorTextureDesc.Height = value             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_ovrMirrorTextureDesc.Height = __pyx_v_value;

  /* "psychxr/ovr/capi.pyx":1185
 * 
 *     @Height.setter
 *     def Height(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.Height = value
 * 
 */

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

/* "psychxr/ovr/capi.pyx":1189
 * 
 *     @property
 *     def MirrorOptions(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrMirrorTextureDesc.MirrorOptions
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1190
 *     @property
 *     def MirrorOptions(self):
 *         return <int>self.c_ovrMirrorTextureDesc.MirrorOptions             # <<<<<<<<<<<<<<
 * 
 *     @MirrorOptions.setter
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int(((int)__pyx_v_self->c_ovrMirrorTextureDesc.MirrorOptions)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1189
 * 
 *     @property
 *     def MirrorOptions(self):             # <<<<<<<<<<<<<<
 *         return <int>self.c_ovrMirrorTextureDesc.MirrorOptions
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrMirrorTextureDesc.MirrorOptions.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1193
 * 
 *     @MirrorOptions.setter
 *     def MirrorOptions(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.MirrorOptions = <int32_t>value
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_arg_value) {
  int __pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
  assert(__pyx_arg_value); {
    __pyx_v_value = __Pyx_PyInt_As_int(__pyx_arg_value); if (unlikely((__pyx_v_value == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1193, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrMirrorTextureDesc.MirrorOptions.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions_2__set__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self), ((int)__pyx_v_value));

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

static int __pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions_2__set__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, int __pyx_v_value) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__set__", 0);

  /* "psychxr/ovr/capi.pyx":1194
 *     @MirrorOptions.setter
 *     def MirrorOptions(self, int value):
 *         self.c_ovrMirrorTextureDesc.MirrorOptions = <int32_t>value             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->c_ovrMirrorTextureDesc.MirrorOptions = ((int32_t)__pyx_v_value);

  /* "psychxr/ovr/capi.pyx":1193
 * 
 *     @MirrorOptions.setter
 *     def MirrorOptions(self, int value):             # <<<<<<<<<<<<<<
 *         self.c_ovrMirrorTextureDesc.MirrorOptions = <int32_t>value
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  __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_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_3__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_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_2__reduce_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__20, 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("psychxr.ovr.capi.ovrMirrorTextureDesc.__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_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5__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_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_4__setstate_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__21, 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("psychxr.ovr.capi.ovrMirrorTextureDesc.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1197
 * 
 * 
 * cpdef void setupMirrorTexture(ovrMirrorTextureDesc mirrorDesc):             # <<<<<<<<<<<<<<
 *     """Create a mirror texture buffer.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_65setupMirrorTexture(PyObject *__pyx_self, PyObject *__pyx_v_mirrorDesc); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setupMirrorTexture(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_mirrorDesc, CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrResult __pyx_v_result;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("setupMirrorTexture", 0);

  /* "psychxr/ovr/capi.pyx":1206
 *     """
 *     global _mirror_texture_
 *     cdef ovr_capi.ovrResult result = ovr_capi_gl.ovr_CreateMirrorTextureGL(             # <<<<<<<<<<<<<<
 *         _ptr_session_, &mirrorDesc.c_ovrMirrorTextureDesc, &_mirror_texture_)
 * 
 */
  __pyx_v_result = ovr_CreateMirrorTextureGL(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (&__pyx_v_mirrorDesc->c_ovrMirrorTextureDesc), (&__pyx_v_7psychxr_3ovr_4capi__mirror_texture_));

  /* "psychxr/ovr/capi.pyx":1209
 *         _ptr_session_, &mirrorDesc.c_ovrMirrorTextureDesc, &_mirror_texture_)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __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, 1209, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1210
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 * cpdef unsigned int getMirrorTexture():
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1210, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1210, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":1209
 *         _ptr_session_, &mirrorDesc.c_ovrMirrorTextureDesc, &_mirror_texture_)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":1197
 * 
 * 
 * cpdef void setupMirrorTexture(ovrMirrorTextureDesc mirrorDesc):             # <<<<<<<<<<<<<<
 *     """Create a mirror texture buffer.
 * 
 */

  /* 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_WriteUnraisable("psychxr.ovr.capi.setupMirrorTexture", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_65setupMirrorTexture(PyObject *__pyx_self, PyObject *__pyx_v_mirrorDesc); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_64setupMirrorTexture[] = "Create a mirror texture buffer.\n    \n    :param width: int \n    :param height: int \n    :return: None\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_65setupMirrorTexture(PyObject *__pyx_self, PyObject *__pyx_v_mirrorDesc) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setupMirrorTexture (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mirrorDesc), __pyx_ptype_7psychxr_3ovr_4capi_ovrMirrorTextureDesc, 1, "mirrorDesc", 0))) __PYX_ERR(0, 1197, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_64setupMirrorTexture(__pyx_self, ((struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *)__pyx_v_mirrorDesc));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_64setupMirrorTexture(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc *__pyx_v_mirrorDesc) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("setupMirrorTexture", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_setupMirrorTexture(__pyx_v_mirrorDesc, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1197, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1212
 *         check_result(result)
 * 
 * cpdef unsigned int getMirrorTexture():             # <<<<<<<<<<<<<<
 *     """Get the mirror texture handle.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_67getMirrorTexture(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static unsigned int __pyx_f_7psychxr_3ovr_4capi_getMirrorTexture(CYTHON_UNUSED int __pyx_skip_dispatch) {
  unsigned int __pyx_v_out_tex_id;
  CYTHON_UNUSED ovrResult __pyx_v_result;
  unsigned int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMirrorTexture", 0);

  /* "psychxr/ovr/capi.pyx":1219
 *     cdef unsigned int out_tex_id
 *     cdef ovr_capi.ovrResult result = \
 *         ovr_capi_gl.ovr_GetMirrorTextureBufferGL(             # <<<<<<<<<<<<<<
 *             _ptr_session_,
 *             _mirror_texture_,
 */
  __pyx_v_result = ovr_GetMirrorTextureBufferGL(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, __pyx_v_7psychxr_3ovr_4capi__mirror_texture_, (&__pyx_v_out_tex_id));

  /* "psychxr/ovr/capi.pyx":1224
 *             &out_tex_id)
 * 
 *     return <unsigned int>out_tex_id             # <<<<<<<<<<<<<<
 * 
 * # types
 */
  __pyx_r = ((unsigned int)__pyx_v_out_tex_id);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1212
 *         check_result(result)
 * 
 * cpdef unsigned int getMirrorTexture():             # <<<<<<<<<<<<<<
 *     """Get the mirror texture handle.
 * 
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_67getMirrorTexture(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_66getMirrorTexture[] = "Get the mirror texture handle.\n    \n    :return: \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_67getMirrorTexture(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getMirrorTexture (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_66getMirrorTexture(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_66getMirrorTexture(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getMirrorTexture", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_f_7psychxr_3ovr_4capi_getMirrorTexture(0)); 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;

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

/* "psychxr/ovr/capi.pyx":1242
 *     cdef ovr_capi.ovrSessionStatus  c_ovrSessionStatus
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrSessionStatus
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus___cinit__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static int __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/ovr/capi.pyx":1243
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.c_data = &self.c_ovrSessionStatus             # <<<<<<<<<<<<<<
 * 
 *     def IsVisible(self):
 */
  __pyx_v_self->c_data = (&__pyx_v_self->c_ovrSessionStatus);

  /* "psychxr/ovr/capi.pyx":1242
 *     cdef ovr_capi.ovrSessionStatus  c_ovrSessionStatus
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrSessionStatus
 * 
 */

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

/* "psychxr/ovr/capi.pyx":1245
 *         self.c_data = &self.c_ovrSessionStatus
 * 
 *     def IsVisible(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.IsVisible
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_3IsVisible(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_3IsVisible(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("IsVisible (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_2IsVisible(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_2IsVisible(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("IsVisible", 0);

  /* "psychxr/ovr/capi.pyx":1246
 * 
 *     def IsVisible(self):
 *         return <bint>self.c_data.IsVisible             # <<<<<<<<<<<<<<
 * 
 *     def HmdPresent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->IsVisible != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1245
 *         self.c_data = &self.c_ovrSessionStatus
 * 
 *     def IsVisible(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.IsVisible
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrSessionStatus.IsVisible", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1248
 *         return <bint>self.c_data.IsVisible
 * 
 *     def HmdPresent(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.HmdPresent
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_5HmdPresent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_5HmdPresent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HmdPresent (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_4HmdPresent(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_4HmdPresent(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("HmdPresent", 0);

  /* "psychxr/ovr/capi.pyx":1249
 * 
 *     def HmdPresent(self):
 *         return <bint>self.c_data.HmdPresent             # <<<<<<<<<<<<<<
 * 
 *     def DisplayLost(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->HmdPresent != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1249, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1248
 *         return <bint>self.c_data.IsVisible
 * 
 *     def HmdPresent(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.HmdPresent
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrSessionStatus.HmdPresent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1251
 *         return <bint>self.c_data.HmdPresent
 * 
 *     def DisplayLost(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.DisplayLost
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_7DisplayLost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_7DisplayLost(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("DisplayLost (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_6DisplayLost(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_6DisplayLost(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("DisplayLost", 0);

  /* "psychxr/ovr/capi.pyx":1252
 * 
 *     def DisplayLost(self):
 *         return <bint>self.c_data.DisplayLost             # <<<<<<<<<<<<<<
 * 
 *     def ShouldQuit(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->DisplayLost != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1251
 *         return <bint>self.c_data.HmdPresent
 * 
 *     def DisplayLost(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.DisplayLost
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrSessionStatus.DisplayLost", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1254
 *         return <bint>self.c_data.DisplayLost
 * 
 *     def ShouldQuit(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.ShouldQuit
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_9ShouldQuit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_9ShouldQuit(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ShouldQuit (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_8ShouldQuit(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_8ShouldQuit(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ShouldQuit", 0);

  /* "psychxr/ovr/capi.pyx":1255
 * 
 *     def ShouldQuit(self):
 *         return <bint>self.c_data.ShouldQuit             # <<<<<<<<<<<<<<
 * 
 *     def ShouldRecenter(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->ShouldQuit != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1254
 *         return <bint>self.c_data.DisplayLost
 * 
 *     def ShouldQuit(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.ShouldQuit
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrSessionStatus.ShouldQuit", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1257
 *         return <bint>self.c_data.ShouldQuit
 * 
 *     def ShouldRecenter(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.ShouldRecenter
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_11ShouldRecenter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_11ShouldRecenter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("ShouldRecenter (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_10ShouldRecenter(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_10ShouldRecenter(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("ShouldRecenter", 0);

  /* "psychxr/ovr/capi.pyx":1258
 * 
 *     def ShouldRecenter(self):
 *         return <bint>self.c_data.ShouldRecenter             # <<<<<<<<<<<<<<
 * 
 *     def HasInputFocus(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->ShouldRecenter != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1257
 *         return <bint>self.c_data.ShouldQuit
 * 
 *     def ShouldRecenter(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.ShouldRecenter
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrSessionStatus.ShouldRecenter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1260
 *         return <bint>self.c_data.ShouldRecenter
 * 
 *     def HasInputFocus(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.HasInputFocus
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_13HasInputFocus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_13HasInputFocus(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("HasInputFocus (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_12HasInputFocus(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_12HasInputFocus(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("HasInputFocus", 0);

  /* "psychxr/ovr/capi.pyx":1261
 * 
 *     def HasInputFocus(self):
 *         return <bint>self.c_data.HasInputFocus             # <<<<<<<<<<<<<<
 * 
 *     def OverlayPresent(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->HasInputFocus != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1260
 *         return <bint>self.c_data.ShouldRecenter
 * 
 *     def HasInputFocus(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.HasInputFocus
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrSessionStatus.HasInputFocus", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1263
 *         return <bint>self.c_data.HasInputFocus
 * 
 *     def OverlayPresent(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.OverlayPresent
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_15OverlayPresent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_15OverlayPresent(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("OverlayPresent (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_14OverlayPresent(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_14OverlayPresent(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("OverlayPresent", 0);

  /* "psychxr/ovr/capi.pyx":1264
 * 
 *     def OverlayPresent(self):
 *         return <bint>self.c_data.OverlayPresent             # <<<<<<<<<<<<<<
 * 
 *     def DepthRequested(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->OverlayPresent != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1263
 *         return <bint>self.c_data.HasInputFocus
 * 
 *     def OverlayPresent(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.OverlayPresent
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrSessionStatus.OverlayPresent", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1266
 *         return <bint>self.c_data.OverlayPresent
 * 
 *     def DepthRequested(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.DepthRequested
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_17DepthRequested(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_17DepthRequested(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("DepthRequested (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_16DepthRequested(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_16DepthRequested(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("DepthRequested", 0);

  /* "psychxr/ovr/capi.pyx":1267
 * 
 *     def DepthRequested(self):
 *         return <bint>self.c_data.DepthRequested             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->c_data->DepthRequested != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1266
 *         return <bint>self.c_data.OverlayPresent
 * 
 *     def DepthRequested(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data.DepthRequested
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrSessionStatus.DepthRequested", __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("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_19__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_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_7psychxr_3ovr_4capi_16ovrSessionStatus_18__reduce_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__22, 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("psychxr.ovr.capi.ovrSessionStatus.__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_7psychxr_3ovr_4capi_16ovrSessionStatus_21__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_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_7psychxr_3ovr_4capi_16ovrSessionStatus_20__setstate_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_16ovrSessionStatus_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__23, 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("psychxr.ovr.capi.ovrSessionStatus.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1270
 * 
 * 
 * cpdef ovrSessionStatus getSessionStatus():             # <<<<<<<<<<<<<<
 *     """Get the current session status.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_69getSessionStatus(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_f_7psychxr_3ovr_4capi_getSessionStatus(CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_v_to_return = 0;
  ovrResult __pyx_v_result;
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getSessionStatus", 0);

  /* "psychxr/ovr/capi.pyx":1277
 *     """
 *     global _ptr_session_
 *     cdef ovrSessionStatus to_return = ovrSessionStatus()             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_GetSessionStatus(
 *         _ptr_session_, &(<ovrSessionStatus>to_return).c_data[0])
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4capi_ovrSessionStatus), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1278
 *     global _ptr_session_
 *     cdef ovrSessionStatus to_return = ovrSessionStatus()
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_GetSessionStatus(             # <<<<<<<<<<<<<<
 *         _ptr_session_, &(<ovrSessionStatus>to_return).c_data[0])
 * 
 */
  __pyx_v_result = ovr_GetSessionStatus(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (&(__pyx_v_to_return->c_data[0])));

  /* "psychxr/ovr/capi.pyx":1281
 *         _ptr_session_, &(<ovrSessionStatus>to_return).c_data[0])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __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, 1281, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1282
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 *     return to_return
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1282, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":1281
 *         _ptr_session_, &(<ovrSessionStatus>to_return).c_data[0])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":1284
 *         check_result(result)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * # -------------------------
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = __pyx_v_to_return;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1270
 * 
 * 
 * cpdef ovrSessionStatus getSessionStatus():             # <<<<<<<<<<<<<<
 *     """Get the current session status.
 * 
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psychxr.ovr.capi.getSessionStatus", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_69getSessionStatus(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_68getSessionStatus[] = "Get the current session status.\n    \n    :return: ovrSessionStatus\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_69getSessionStatus(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getSessionStatus (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_68getSessionStatus(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_68getSessionStatus(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getSessionStatus", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_3ovr_4capi_getSessionStatus(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1270, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1298
 *     cdef ovr_capi.ovrInputState c_ovrInputState
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrInputState
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState___cinit__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static int __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/ovr/capi.pyx":1299
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.c_data = &self.c_ovrInputState             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data = (&__pyx_v_self->c_ovrInputState);

  /* "psychxr/ovr/capi.pyx":1298
 *     cdef ovr_capi.ovrInputState c_ovrInputState
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrInputState
 * 
 */

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

/* "psychxr/ovr/capi.pyx":1302
 * 
 *     @property
 *     def TimeInSeconds(self):             # <<<<<<<<<<<<<<
 *         return <double>self.c_data.TimeInSeconds
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_13TimeInSeconds_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_13TimeInSeconds_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_13TimeInSeconds___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_13TimeInSeconds___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1303
 *     @property
 *     def TimeInSeconds(self):
 *         return <double>self.c_data.TimeInSeconds             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((double)__pyx_v_self->c_data->TimeInSeconds)); 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;

  /* "psychxr/ovr/capi.pyx":1302
 * 
 *     @property
 *     def TimeInSeconds(self):             # <<<<<<<<<<<<<<
 *         return <double>self.c_data.TimeInSeconds
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrInputState.TimeInSeconds.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1306
 * 
 *     @property
 *     def Buttons(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].Buttons
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_7Buttons_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_7Buttons_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_7Buttons___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_7Buttons___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1307
 *     @property
 *     def Buttons(self):
 *         return self.c_data[0].Buttons             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->c_data[0]).Buttons); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1307, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1306
 * 
 *     @property
 *     def Buttons(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].Buttons
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrInputState.Buttons.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1310
 * 
 *     @property
 *     def Touches(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].Touches
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_7Touches_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_7Touches_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_7Touches___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_7Touches___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1311
 *     @property
 *     def Touches(self):
 *         return self.c_data[0].Touches             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_unsigned_int((__pyx_v_self->c_data[0]).Touches); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1310
 * 
 *     @property
 *     def Touches(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].Touches
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrInputState.Touches.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1314
 * 
 *     @property
 *     def IndexTrigger(self):             # <<<<<<<<<<<<<<
 *         cdef float index_trigger_left = self.c_data[0].IndexTrigger[0]
 *         cdef float index_trigger_right = self.c_data[0].IndexTrigger[1]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_12IndexTrigger_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_12IndexTrigger_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_12IndexTrigger___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_12IndexTrigger___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  float __pyx_v_index_trigger_left;
  float __pyx_v_index_trigger_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1315
 *     @property
 *     def IndexTrigger(self):
 *         cdef float index_trigger_left = self.c_data[0].IndexTrigger[0]             # <<<<<<<<<<<<<<
 *         cdef float index_trigger_right = self.c_data[0].IndexTrigger[1]
 * 
 */
  __pyx_v_index_trigger_left = ((__pyx_v_self->c_data[0]).IndexTrigger[0]);

  /* "psychxr/ovr/capi.pyx":1316
 *     def IndexTrigger(self):
 *         cdef float index_trigger_left = self.c_data[0].IndexTrigger[0]
 *         cdef float index_trigger_right = self.c_data[0].IndexTrigger[1]             # <<<<<<<<<<<<<<
 * 
 *         return index_trigger_left, index_trigger_right
 */
  __pyx_v_index_trigger_right = ((__pyx_v_self->c_data[0]).IndexTrigger[1]);

  /* "psychxr/ovr/capi.pyx":1318
 *         cdef float index_trigger_right = self.c_data[0].IndexTrigger[1]
 * 
 *         return index_trigger_left, index_trigger_right             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_index_trigger_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_index_trigger_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __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;

  /* "psychxr/ovr/capi.pyx":1314
 * 
 *     @property
 *     def IndexTrigger(self):             # <<<<<<<<<<<<<<
 *         cdef float index_trigger_left = self.c_data[0].IndexTrigger[0]
 *         cdef float index_trigger_right = self.c_data[0].IndexTrigger[1]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrInputState.IndexTrigger.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1321
 * 
 *     @property
 *     def HandTrigger(self):             # <<<<<<<<<<<<<<
 *         cdef float hand_trigger_left = self.c_data[0].HandTrigger[0]
 *         cdef float hand_trigger_right = self.c_data[0].HandTrigger[1]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_11HandTrigger_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_11HandTrigger_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_11HandTrigger___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_11HandTrigger___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  float __pyx_v_hand_trigger_left;
  float __pyx_v_hand_trigger_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1322
 *     @property
 *     def HandTrigger(self):
 *         cdef float hand_trigger_left = self.c_data[0].HandTrigger[0]             # <<<<<<<<<<<<<<
 *         cdef float hand_trigger_right = self.c_data[0].HandTrigger[1]
 * 
 */
  __pyx_v_hand_trigger_left = ((__pyx_v_self->c_data[0]).HandTrigger[0]);

  /* "psychxr/ovr/capi.pyx":1323
 *     def HandTrigger(self):
 *         cdef float hand_trigger_left = self.c_data[0].HandTrigger[0]
 *         cdef float hand_trigger_right = self.c_data[0].HandTrigger[1]             # <<<<<<<<<<<<<<
 * 
 *         return hand_trigger_left, hand_trigger_right
 */
  __pyx_v_hand_trigger_right = ((__pyx_v_self->c_data[0]).HandTrigger[1]);

  /* "psychxr/ovr/capi.pyx":1325
 *         cdef float hand_trigger_right = self.c_data[0].HandTrigger[1]
 * 
 *         return hand_trigger_left, hand_trigger_right             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_hand_trigger_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_hand_trigger_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1325, __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;

  /* "psychxr/ovr/capi.pyx":1321
 * 
 *     @property
 *     def HandTrigger(self):             # <<<<<<<<<<<<<<
 *         cdef float hand_trigger_left = self.c_data[0].HandTrigger[0]
 *         cdef float hand_trigger_right = self.c_data[0].HandTrigger[1]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrInputState.HandTrigger.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1328
 * 
 *     @property
 *     def Thumbstick(self):             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_x0 = self.c_data[0].Thumbstick[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].Thumbstick[0].y
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_10Thumbstick_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_10Thumbstick_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_10Thumbstick___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_10Thumbstick___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  float __pyx_v_thumbstick_x0;
  float __pyx_v_thumbstick_y0;
  float __pyx_v_thumbstick_x1;
  float __pyx_v_thumbstick_y1;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1329
 *     @property
 *     def Thumbstick(self):
 *         cdef float thumbstick_x0 = self.c_data[0].Thumbstick[0].x             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_y0 = self.c_data[0].Thumbstick[0].y
 *         cdef float thumbstick_x1 = self.c_data[0].Thumbstick[1].x
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).Thumbstick[0]).x;
  __pyx_v_thumbstick_x0 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1330
 *     def Thumbstick(self):
 *         cdef float thumbstick_x0 = self.c_data[0].Thumbstick[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].Thumbstick[0].y             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_x1 = self.c_data[0].Thumbstick[1].x
 *         cdef float thumbstick_y1 = self.c_data[0].Thumbstick[1].y
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).Thumbstick[0]).y;
  __pyx_v_thumbstick_y0 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1331
 *         cdef float thumbstick_x0 = self.c_data[0].Thumbstick[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].Thumbstick[0].y
 *         cdef float thumbstick_x1 = self.c_data[0].Thumbstick[1].x             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_y1 = self.c_data[0].Thumbstick[1].y
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).Thumbstick[1]).x;
  __pyx_v_thumbstick_x1 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1332
 *         cdef float thumbstick_y0 = self.c_data[0].Thumbstick[0].y
 *         cdef float thumbstick_x1 = self.c_data[0].Thumbstick[1].x
 *         cdef float thumbstick_y1 = self.c_data[0].Thumbstick[1].y             # <<<<<<<<<<<<<<
 * 
 *         return (thumbstick_x0, thumbstick_y0), (thumbstick_x1, thumbstick_y1)
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).Thumbstick[1]).y;
  __pyx_v_thumbstick_y1 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1334
 *         cdef float thumbstick_y1 = self.c_data[0].Thumbstick[1].y
 * 
 *         return (thumbstick_x0, thumbstick_y0), (thumbstick_x1, thumbstick_y1)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_thumbstick_x0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_thumbstick_y0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1334, __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 = PyFloat_FromDouble(__pyx_v_thumbstick_x1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_thumbstick_y1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1334, __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_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1334, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1328
 * 
 *     @property
 *     def Thumbstick(self):             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_x0 = self.c_data[0].Thumbstick[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].Thumbstick[0].y
 */

  /* 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("psychxr.ovr.capi.ovrInputState.Thumbstick.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1337
 * 
 *     @property
 *     def ControllerType(self):             # <<<<<<<<<<<<<<
 *         cdef int ctrl_type = <int>self.c_data[0].ControllerType
 *         if ctrl_type == ovr_capi.ovrControllerType_XBox:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_14ControllerType_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_14ControllerType_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_14ControllerType___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_14ControllerType___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  int __pyx_v_ctrl_type;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1338
 *     @property
 *     def ControllerType(self):
 *         cdef int ctrl_type = <int>self.c_data[0].ControllerType             # <<<<<<<<<<<<<<
 *         if ctrl_type == ovr_capi.ovrControllerType_XBox:
 *             return 'xbox'
 */
  __pyx_v_ctrl_type = ((int)(__pyx_v_self->c_data[0]).ControllerType);

  /* "psychxr/ovr/capi.pyx":1339
 *     def ControllerType(self):
 *         cdef int ctrl_type = <int>self.c_data[0].ControllerType
 *         if ctrl_type == ovr_capi.ovrControllerType_XBox:             # <<<<<<<<<<<<<<
 *             return 'xbox'
 *         elif ctrl_type == ovr_capi.ovrControllerType_Remote:
 */
  switch (__pyx_v_ctrl_type) {
    case ovrControllerType_XBox:

    /* "psychxr/ovr/capi.pyx":1340
 *         cdef int ctrl_type = <int>self.c_data[0].ControllerType
 *         if ctrl_type == ovr_capi.ovrControllerType_XBox:
 *             return 'xbox'             # <<<<<<<<<<<<<<
 *         elif ctrl_type == ovr_capi.ovrControllerType_Remote:
 *             return 'remote'
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_xbox);
    __pyx_r = __pyx_n_s_xbox;
    goto __pyx_L0;

    /* "psychxr/ovr/capi.pyx":1339
 *     def ControllerType(self):
 *         cdef int ctrl_type = <int>self.c_data[0].ControllerType
 *         if ctrl_type == ovr_capi.ovrControllerType_XBox:             # <<<<<<<<<<<<<<
 *             return 'xbox'
 *         elif ctrl_type == ovr_capi.ovrControllerType_Remote:
 */
    break;

    /* "psychxr/ovr/capi.pyx":1341
 *         if ctrl_type == ovr_capi.ovrControllerType_XBox:
 *             return 'xbox'
 *         elif ctrl_type == ovr_capi.ovrControllerType_Remote:             # <<<<<<<<<<<<<<
 *             return 'remote'
 *         elif ctrl_type == ovr_capi.ovrControllerType_Touch:
 */
    case ovrControllerType_Remote:

    /* "psychxr/ovr/capi.pyx":1342
 *             return 'xbox'
 *         elif ctrl_type == ovr_capi.ovrControllerType_Remote:
 *             return 'remote'             # <<<<<<<<<<<<<<
 *         elif ctrl_type == ovr_capi.ovrControllerType_Touch:
 *             return 'touch'
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_remote);
    __pyx_r = __pyx_n_s_remote;
    goto __pyx_L0;

    /* "psychxr/ovr/capi.pyx":1341
 *         if ctrl_type == ovr_capi.ovrControllerType_XBox:
 *             return 'xbox'
 *         elif ctrl_type == ovr_capi.ovrControllerType_Remote:             # <<<<<<<<<<<<<<
 *             return 'remote'
 *         elif ctrl_type == ovr_capi.ovrControllerType_Touch:
 */
    break;

    /* "psychxr/ovr/capi.pyx":1343
 *         elif ctrl_type == ovr_capi.ovrControllerType_Remote:
 *             return 'remote'
 *         elif ctrl_type == ovr_capi.ovrControllerType_Touch:             # <<<<<<<<<<<<<<
 *             return 'touch'
 *         elif ctrl_type == ovr_capi.ovrControllerType_LTouch:
 */
    case ovrControllerType_Touch:

    /* "psychxr/ovr/capi.pyx":1344
 *             return 'remote'
 *         elif ctrl_type == ovr_capi.ovrControllerType_Touch:
 *             return 'touch'             # <<<<<<<<<<<<<<
 *         elif ctrl_type == ovr_capi.ovrControllerType_LTouch:
 *             return 'ltouch'
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_touch);
    __pyx_r = __pyx_n_s_touch;
    goto __pyx_L0;

    /* "psychxr/ovr/capi.pyx":1343
 *         elif ctrl_type == ovr_capi.ovrControllerType_Remote:
 *             return 'remote'
 *         elif ctrl_type == ovr_capi.ovrControllerType_Touch:             # <<<<<<<<<<<<<<
 *             return 'touch'
 *         elif ctrl_type == ovr_capi.ovrControllerType_LTouch:
 */
    break;

    /* "psychxr/ovr/capi.pyx":1345
 *         elif ctrl_type == ovr_capi.ovrControllerType_Touch:
 *             return 'touch'
 *         elif ctrl_type == ovr_capi.ovrControllerType_LTouch:             # <<<<<<<<<<<<<<
 *             return 'ltouch'
 *         elif ctrl_type == ovr_capi.ovrControllerType_RTouch:
 */
    case ovrControllerType_LTouch:

    /* "psychxr/ovr/capi.pyx":1346
 *             return 'touch'
 *         elif ctrl_type == ovr_capi.ovrControllerType_LTouch:
 *             return 'ltouch'             # <<<<<<<<<<<<<<
 *         elif ctrl_type == ovr_capi.ovrControllerType_RTouch:
 *             return 'rtouch'
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_ltouch);
    __pyx_r = __pyx_n_s_ltouch;
    goto __pyx_L0;

    /* "psychxr/ovr/capi.pyx":1345
 *         elif ctrl_type == ovr_capi.ovrControllerType_Touch:
 *             return 'touch'
 *         elif ctrl_type == ovr_capi.ovrControllerType_LTouch:             # <<<<<<<<<<<<<<
 *             return 'ltouch'
 *         elif ctrl_type == ovr_capi.ovrControllerType_RTouch:
 */
    break;

    /* "psychxr/ovr/capi.pyx":1347
 *         elif ctrl_type == ovr_capi.ovrControllerType_LTouch:
 *             return 'ltouch'
 *         elif ctrl_type == ovr_capi.ovrControllerType_RTouch:             # <<<<<<<<<<<<<<
 *             return 'rtouch'
 *         else:
 */
    case ovrControllerType_RTouch:

    /* "psychxr/ovr/capi.pyx":1348
 *             return 'ltouch'
 *         elif ctrl_type == ovr_capi.ovrControllerType_RTouch:
 *             return 'rtouch'             # <<<<<<<<<<<<<<
 *         else:
 *             return None
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_n_s_rtouch);
    __pyx_r = __pyx_n_s_rtouch;
    goto __pyx_L0;

    /* "psychxr/ovr/capi.pyx":1347
 *         elif ctrl_type == ovr_capi.ovrControllerType_LTouch:
 *             return 'ltouch'
 *         elif ctrl_type == ovr_capi.ovrControllerType_RTouch:             # <<<<<<<<<<<<<<
 *             return 'rtouch'
 *         else:
 */
    break;
    default:

    /* "psychxr/ovr/capi.pyx":1350
 *             return 'rtouch'
 *         else:
 *             return None             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    break;
  }

  /* "psychxr/ovr/capi.pyx":1337
 * 
 *     @property
 *     def ControllerType(self):             # <<<<<<<<<<<<<<
 *         cdef int ctrl_type = <int>self.c_data[0].ControllerType
 *         if ctrl_type == ovr_capi.ovrControllerType_XBox:
 */

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

/* "psychxr/ovr/capi.pyx":1353
 * 
 *     @property
 *     def IndexTriggerNoDeadzone(self):             # <<<<<<<<<<<<<<
 *         cdef float index_trigger_left = self.c_data[0].IndexTriggerNoDeadzone[0]
 *         cdef float index_trigger_right = self.c_data[0].IndexTriggerNoDeadzone[1]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_22IndexTriggerNoDeadzone_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_22IndexTriggerNoDeadzone_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_22IndexTriggerNoDeadzone___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_22IndexTriggerNoDeadzone___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  float __pyx_v_index_trigger_left;
  float __pyx_v_index_trigger_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1354
 *     @property
 *     def IndexTriggerNoDeadzone(self):
 *         cdef float index_trigger_left = self.c_data[0].IndexTriggerNoDeadzone[0]             # <<<<<<<<<<<<<<
 *         cdef float index_trigger_right = self.c_data[0].IndexTriggerNoDeadzone[1]
 * 
 */
  __pyx_v_index_trigger_left = ((__pyx_v_self->c_data[0]).IndexTriggerNoDeadzone[0]);

  /* "psychxr/ovr/capi.pyx":1355
 *     def IndexTriggerNoDeadzone(self):
 *         cdef float index_trigger_left = self.c_data[0].IndexTriggerNoDeadzone[0]
 *         cdef float index_trigger_right = self.c_data[0].IndexTriggerNoDeadzone[1]             # <<<<<<<<<<<<<<
 * 
 *         return index_trigger_left, index_trigger_right
 */
  __pyx_v_index_trigger_right = ((__pyx_v_self->c_data[0]).IndexTriggerNoDeadzone[1]);

  /* "psychxr/ovr/capi.pyx":1357
 *         cdef float index_trigger_right = self.c_data[0].IndexTriggerNoDeadzone[1]
 * 
 *         return index_trigger_left, index_trigger_right             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_index_trigger_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_index_trigger_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1357, __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;

  /* "psychxr/ovr/capi.pyx":1353
 * 
 *     @property
 *     def IndexTriggerNoDeadzone(self):             # <<<<<<<<<<<<<<
 *         cdef float index_trigger_left = self.c_data[0].IndexTriggerNoDeadzone[0]
 *         cdef float index_trigger_right = self.c_data[0].IndexTriggerNoDeadzone[1]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrInputState.IndexTriggerNoDeadzone.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1360
 * 
 *     @property
 *     def HandTriggerNoDeadzone(self):             # <<<<<<<<<<<<<<
 *         cdef float hand_trigger_left = self.c_data[0].HandTriggerNoDeadzone[0]
 *         cdef float hand_trigger_right = self.c_data[0].HandTriggerNoDeadzone[1]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_21HandTriggerNoDeadzone_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_21HandTriggerNoDeadzone_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_21HandTriggerNoDeadzone___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_21HandTriggerNoDeadzone___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  float __pyx_v_hand_trigger_left;
  float __pyx_v_hand_trigger_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1361
 *     @property
 *     def HandTriggerNoDeadzone(self):
 *         cdef float hand_trigger_left = self.c_data[0].HandTriggerNoDeadzone[0]             # <<<<<<<<<<<<<<
 *         cdef float hand_trigger_right = self.c_data[0].HandTriggerNoDeadzone[1]
 * 
 */
  __pyx_v_hand_trigger_left = ((__pyx_v_self->c_data[0]).HandTriggerNoDeadzone[0]);

  /* "psychxr/ovr/capi.pyx":1362
 *     def HandTriggerNoDeadzone(self):
 *         cdef float hand_trigger_left = self.c_data[0].HandTriggerNoDeadzone[0]
 *         cdef float hand_trigger_right = self.c_data[0].HandTriggerNoDeadzone[1]             # <<<<<<<<<<<<<<
 * 
 *         return hand_trigger_left, hand_trigger_right
 */
  __pyx_v_hand_trigger_right = ((__pyx_v_self->c_data[0]).HandTriggerNoDeadzone[1]);

  /* "psychxr/ovr/capi.pyx":1364
 *         cdef float hand_trigger_right = self.c_data[0].HandTriggerNoDeadzone[1]
 * 
 *         return hand_trigger_left, hand_trigger_right             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_hand_trigger_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_hand_trigger_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __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;

  /* "psychxr/ovr/capi.pyx":1360
 * 
 *     @property
 *     def HandTriggerNoDeadzone(self):             # <<<<<<<<<<<<<<
 *         cdef float hand_trigger_left = self.c_data[0].HandTriggerNoDeadzone[0]
 *         cdef float hand_trigger_right = self.c_data[0].HandTriggerNoDeadzone[1]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrInputState.HandTriggerNoDeadzone.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1367
 * 
 *     @property
 *     def ThumbstickNoDeadzone(self):             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_x0 = self.c_data[0].ThumbstickNoDeadzone[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickNoDeadzone[0].y
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_20ThumbstickNoDeadzone_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_20ThumbstickNoDeadzone_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_20ThumbstickNoDeadzone___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_20ThumbstickNoDeadzone___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  float __pyx_v_thumbstick_x0;
  float __pyx_v_thumbstick_y0;
  float __pyx_v_thumbstick_x1;
  float __pyx_v_thumbstick_y1;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1368
 *     @property
 *     def ThumbstickNoDeadzone(self):
 *         cdef float thumbstick_x0 = self.c_data[0].ThumbstickNoDeadzone[0].x             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickNoDeadzone[0].y
 *         cdef float thumbstick_x1 = self.c_data[0].ThumbstickNoDeadzone[1].x
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).ThumbstickNoDeadzone[0]).x;
  __pyx_v_thumbstick_x0 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1369
 *     def ThumbstickNoDeadzone(self):
 *         cdef float thumbstick_x0 = self.c_data[0].ThumbstickNoDeadzone[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickNoDeadzone[0].y             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_x1 = self.c_data[0].ThumbstickNoDeadzone[1].x
 *         cdef float thumbstick_y1 = self.c_data[0].ThumbstickNoDeadzone[1].y
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).ThumbstickNoDeadzone[0]).y;
  __pyx_v_thumbstick_y0 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1370
 *         cdef float thumbstick_x0 = self.c_data[0].ThumbstickNoDeadzone[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickNoDeadzone[0].y
 *         cdef float thumbstick_x1 = self.c_data[0].ThumbstickNoDeadzone[1].x             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_y1 = self.c_data[0].ThumbstickNoDeadzone[1].y
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).ThumbstickNoDeadzone[1]).x;
  __pyx_v_thumbstick_x1 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1371
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickNoDeadzone[0].y
 *         cdef float thumbstick_x1 = self.c_data[0].ThumbstickNoDeadzone[1].x
 *         cdef float thumbstick_y1 = self.c_data[0].ThumbstickNoDeadzone[1].y             # <<<<<<<<<<<<<<
 * 
 *         return (thumbstick_x0, thumbstick_y0), (thumbstick_x1, thumbstick_y1)
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).ThumbstickNoDeadzone[1]).y;
  __pyx_v_thumbstick_y1 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1373
 *         cdef float thumbstick_y1 = self.c_data[0].ThumbstickNoDeadzone[1].y
 * 
 *         return (thumbstick_x0, thumbstick_y0), (thumbstick_x1, thumbstick_y1)             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_thumbstick_x0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_thumbstick_y0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1373, __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 = PyFloat_FromDouble(__pyx_v_thumbstick_x1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_thumbstick_y1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __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_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1367
 * 
 *     @property
 *     def ThumbstickNoDeadzone(self):             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_x0 = self.c_data[0].ThumbstickNoDeadzone[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickNoDeadzone[0].y
 */

  /* 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("psychxr.ovr.capi.ovrInputState.ThumbstickNoDeadzone.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1376
 * 
 *     @property
 *     def IndexTriggerRaw(self):             # <<<<<<<<<<<<<<
 *         cdef float index_trigger_left = self.c_data[0].IndexTriggerRaw[0]
 *         cdef float index_trigger_right = self.c_data[0].IndexTriggerRaw[1]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_15IndexTriggerRaw_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_15IndexTriggerRaw_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_15IndexTriggerRaw___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_15IndexTriggerRaw___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  float __pyx_v_index_trigger_left;
  float __pyx_v_index_trigger_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1377
 *     @property
 *     def IndexTriggerRaw(self):
 *         cdef float index_trigger_left = self.c_data[0].IndexTriggerRaw[0]             # <<<<<<<<<<<<<<
 *         cdef float index_trigger_right = self.c_data[0].IndexTriggerRaw[1]
 * 
 */
  __pyx_v_index_trigger_left = ((__pyx_v_self->c_data[0]).IndexTriggerRaw[0]);

  /* "psychxr/ovr/capi.pyx":1378
 *     def IndexTriggerRaw(self):
 *         cdef float index_trigger_left = self.c_data[0].IndexTriggerRaw[0]
 *         cdef float index_trigger_right = self.c_data[0].IndexTriggerRaw[1]             # <<<<<<<<<<<<<<
 * 
 *         return index_trigger_left, index_trigger_right
 */
  __pyx_v_index_trigger_right = ((__pyx_v_self->c_data[0]).IndexTriggerRaw[1]);

  /* "psychxr/ovr/capi.pyx":1380
 *         cdef float index_trigger_right = self.c_data[0].IndexTriggerRaw[1]
 * 
 *         return index_trigger_left, index_trigger_right             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_index_trigger_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_index_trigger_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1380, __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;

  /* "psychxr/ovr/capi.pyx":1376
 * 
 *     @property
 *     def IndexTriggerRaw(self):             # <<<<<<<<<<<<<<
 *         cdef float index_trigger_left = self.c_data[0].IndexTriggerRaw[0]
 *         cdef float index_trigger_right = self.c_data[0].IndexTriggerRaw[1]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrInputState.IndexTriggerRaw.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1383
 * 
 *     @property
 *     def HandTriggerRaw(self):             # <<<<<<<<<<<<<<
 *         cdef float hand_trigger_left = self.c_data[0].HandTriggerRaw[0]
 *         cdef float hand_trigger_right = self.c_data[0].HandTriggerRaw[1]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_14HandTriggerRaw_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_14HandTriggerRaw_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_14HandTriggerRaw___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_14HandTriggerRaw___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  float __pyx_v_hand_trigger_left;
  float __pyx_v_hand_trigger_right;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1384
 *     @property
 *     def HandTriggerRaw(self):
 *         cdef float hand_trigger_left = self.c_data[0].HandTriggerRaw[0]             # <<<<<<<<<<<<<<
 *         cdef float hand_trigger_right = self.c_data[0].HandTriggerRaw[1]
 * 
 */
  __pyx_v_hand_trigger_left = ((__pyx_v_self->c_data[0]).HandTriggerRaw[0]);

  /* "psychxr/ovr/capi.pyx":1385
 *     def HandTriggerRaw(self):
 *         cdef float hand_trigger_left = self.c_data[0].HandTriggerRaw[0]
 *         cdef float hand_trigger_right = self.c_data[0].HandTriggerRaw[1]             # <<<<<<<<<<<<<<
 * 
 *         return hand_trigger_left, hand_trigger_right
 */
  __pyx_v_hand_trigger_right = ((__pyx_v_self->c_data[0]).HandTriggerRaw[1]);

  /* "psychxr/ovr/capi.pyx":1387
 *         cdef float hand_trigger_right = self.c_data[0].HandTriggerRaw[1]
 * 
 *         return hand_trigger_left, hand_trigger_right             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_hand_trigger_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_hand_trigger_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1387, __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;

  /* "psychxr/ovr/capi.pyx":1383
 * 
 *     @property
 *     def HandTriggerRaw(self):             # <<<<<<<<<<<<<<
 *         cdef float hand_trigger_left = self.c_data[0].HandTriggerRaw[0]
 *         cdef float hand_trigger_right = self.c_data[0].HandTriggerRaw[1]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrInputState.HandTriggerRaw.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1390
 * 
 *     @property
 *     def ThumbstickRaw(self):             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_x0 = self.c_data[0].ThumbstickRaw[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickRaw[0].y
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_13ThumbstickRaw_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_13ThumbstickRaw_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_13ThumbstickRaw___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_13ThumbstickRaw___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  float __pyx_v_thumbstick_x0;
  float __pyx_v_thumbstick_y0;
  float __pyx_v_thumbstick_x1;
  float __pyx_v_thumbstick_y1;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  float __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1391
 *     @property
 *     def ThumbstickRaw(self):
 *         cdef float thumbstick_x0 = self.c_data[0].ThumbstickRaw[0].x             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickRaw[0].y
 *         cdef float thumbstick_x1 = self.c_data[0].ThumbstickRaw[1].x
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).ThumbstickRaw[0]).x;
  __pyx_v_thumbstick_x0 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1392
 *     def ThumbstickRaw(self):
 *         cdef float thumbstick_x0 = self.c_data[0].ThumbstickRaw[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickRaw[0].y             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_x1 = self.c_data[0].ThumbstickRaw[1].x
 *         cdef float thumbstick_y1 = self.c_data[0].ThumbstickRaw[1].y
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).ThumbstickRaw[0]).y;
  __pyx_v_thumbstick_y0 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1393
 *         cdef float thumbstick_x0 = self.c_data[0].ThumbstickRaw[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickRaw[0].y
 *         cdef float thumbstick_x1 = self.c_data[0].ThumbstickRaw[1].x             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_y1 = self.c_data[0].ThumbstickRaw[1].y
 * 
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).ThumbstickRaw[1]).x;
  __pyx_v_thumbstick_x1 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1394
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickRaw[0].y
 *         cdef float thumbstick_x1 = self.c_data[0].ThumbstickRaw[1].x
 *         cdef float thumbstick_y1 = self.c_data[0].ThumbstickRaw[1].y             # <<<<<<<<<<<<<<
 * 
 *         return (thumbstick_x0, thumbstick_y0), (thumbstick_x1, thumbstick_y1)
 */
  __pyx_t_1 = ((__pyx_v_self->c_data[0]).ThumbstickRaw[1]).y;
  __pyx_v_thumbstick_y1 = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1396
 *         cdef float thumbstick_y1 = self.c_data[0].ThumbstickRaw[1].y
 * 
 *         return (thumbstick_x0, thumbstick_y0), (thumbstick_x1, thumbstick_y1)             # <<<<<<<<<<<<<<
 * 
 * cpdef object getInputState(str controller, object stateOut=None):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_thumbstick_x0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_thumbstick_y0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1396, __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 = PyFloat_FromDouble(__pyx_v_thumbstick_x1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyFloat_FromDouble(__pyx_v_thumbstick_y1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1396, __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_2);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
  __pyx_t_3 = 0;
  __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1390
 * 
 *     @property
 *     def ThumbstickRaw(self):             # <<<<<<<<<<<<<<
 *         cdef float thumbstick_x0 = self.c_data[0].ThumbstickRaw[0].x
 *         cdef float thumbstick_y0 = self.c_data[0].ThumbstickRaw[0].y
 */

  /* 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("psychxr.ovr.capi.ovrInputState.ThumbstickRaw.__get__", __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("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_3__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_7psychxr_3ovr_4capi_13ovrInputState_2__reduce_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__24, 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("psychxr.ovr.capi.ovrInputState.__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_7psychxr_3ovr_4capi_13ovrInputState_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_5__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_7psychxr_3ovr_4capi_13ovrInputState_4__setstate_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_13ovrInputState_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__25, 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("psychxr.ovr.capi.ovrInputState.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1398
 *         return (thumbstick_x0, thumbstick_y0), (thumbstick_x1, thumbstick_y1)
 * 
 * cpdef object getInputState(str controller, object stateOut=None):             # <<<<<<<<<<<<<<
 *     """Get a controller state as an object. If a 'InputStateData' object is
 *     passed to 'state_out', that object will be updated.
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_71getInputState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getInputState(PyObject *__pyx_v_controller, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getInputState *__pyx_optional_args) {
  PyObject *__pyx_v_stateOut = ((PyObject *)Py_None);
  ovrControllerType __pyx_v_ctrl_type;
  ovrInputState *__pyx_v_ptr_state;
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *__pyx_v_to_return = 0;
  CYTHON_UNUSED ovrResult __pyx_v_result;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getInputState", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_stateOut = __pyx_optional_args->stateOut;
    }
  }

  /* "psychxr/ovr/capi.pyx":1408
 *     """
 *     cdef ovr_capi.ovrControllerType ctrl_type
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_XBox
 *     elif controller == 'remote':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_xbox, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1408, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1409
 *     cdef ovr_capi.ovrControllerType ctrl_type
 *     if controller == 'xbox':
 *         ctrl_type = ovr_capi.ovrControllerType_XBox             # <<<<<<<<<<<<<<
 *     elif controller == 'remote':
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 */
    __pyx_v_ctrl_type = ovrControllerType_XBox;

    /* "psychxr/ovr/capi.pyx":1408
 *     """
 *     cdef ovr_capi.ovrControllerType ctrl_type
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_XBox
 *     elif controller == 'remote':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1410
 *     if controller == 'xbox':
 *         ctrl_type = ovr_capi.ovrControllerType_XBox
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 *     elif controller == 'touch':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_remote, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1410, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1411
 *         ctrl_type = ovr_capi.ovrControllerType_XBox
 *     elif controller == 'remote':
 *         ctrl_type = ovr_capi.ovrControllerType_Remote             # <<<<<<<<<<<<<<
 *     elif controller == 'touch':
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 */
    __pyx_v_ctrl_type = ovrControllerType_Remote;

    /* "psychxr/ovr/capi.pyx":1410
 *     if controller == 'xbox':
 *         ctrl_type = ovr_capi.ovrControllerType_XBox
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 *     elif controller == 'touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1412
 *     elif controller == 'remote':
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 *     elif controller == 'left_touch':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1412, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1413
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 *     elif controller == 'touch':
 *         ctrl_type = ovr_capi.ovrControllerType_Touch             # <<<<<<<<<<<<<<
 *     elif controller == 'left_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 */
    __pyx_v_ctrl_type = ovrControllerType_Touch;

    /* "psychxr/ovr/capi.pyx":1412
 *     elif controller == 'remote':
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 *     elif controller == 'left_touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1414
 *     elif controller == 'touch':
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 *     elif controller == 'right_touch':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_left_touch, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1415
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 *     elif controller == 'left_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch             # <<<<<<<<<<<<<<
 *     elif controller == 'right_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_RTouch
 */
    __pyx_v_ctrl_type = ovrControllerType_LTouch;

    /* "psychxr/ovr/capi.pyx":1414
 *     elif controller == 'touch':
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 *     elif controller == 'right_touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1416
 *     elif controller == 'left_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_RTouch
 * 
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_right_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1416, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1417
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 *     elif controller == 'right_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_RTouch             # <<<<<<<<<<<<<<
 * 
 *     # create a controller state object and set its data
 */
    __pyx_v_ctrl_type = ovrControllerType_RTouch;

    /* "psychxr/ovr/capi.pyx":1416
 *     elif controller == 'left_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_RTouch
 * 
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1422
 *     global _ptr_session_
 *     cdef ovr_capi.ovrInputState* ptr_state
 *     cdef ovrInputState to_return = ovrInputState()             # <<<<<<<<<<<<<<
 * 
 *     if stateOut is None:
 */
  __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4capi_ovrInputState), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1422, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "psychxr/ovr/capi.pyx":1424
 *     cdef ovrInputState to_return = ovrInputState()
 * 
 *     if stateOut is None:             # <<<<<<<<<<<<<<
 *         ptr_state = &(<ovrInputState>to_return).c_ovrInputState
 *     else:
 */
  __pyx_t_2 = (__pyx_v_stateOut == Py_None);
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1425
 * 
 *     if stateOut is None:
 *         ptr_state = &(<ovrInputState>to_return).c_ovrInputState             # <<<<<<<<<<<<<<
 *     else:
 *         ptr_state = &(<ovrInputState>stateOut).c_ovrInputState
 */
    __pyx_v_ptr_state = (&__pyx_v_to_return->c_ovrInputState);

    /* "psychxr/ovr/capi.pyx":1424
 *     cdef ovrInputState to_return = ovrInputState()
 * 
 *     if stateOut is None:             # <<<<<<<<<<<<<<
 *         ptr_state = &(<ovrInputState>to_return).c_ovrInputState
 *     else:
 */
    goto __pyx_L4;
  }

  /* "psychxr/ovr/capi.pyx":1427
 *         ptr_state = &(<ovrInputState>to_return).c_ovrInputState
 *     else:
 *         ptr_state = &(<ovrInputState>stateOut).c_ovrInputState             # <<<<<<<<<<<<<<
 * 
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_GetInputState(
 */
  /*else*/ {
    __pyx_v_ptr_state = (&((struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState *)__pyx_v_stateOut)->c_ovrInputState);
  }
  __pyx_L4:;

  /* "psychxr/ovr/capi.pyx":1429
 *         ptr_state = &(<ovrInputState>stateOut).c_ovrInputState
 * 
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_GetInputState(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         ctrl_type,
 */
  __pyx_v_result = ovr_GetInputState(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, __pyx_v_ctrl_type, __pyx_v_ptr_state);

  /* "psychxr/ovr/capi.pyx":1434
 *         ptr_state)
 * 
 *     if stateOut is None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  __pyx_t_1 = (__pyx_v_stateOut == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1435
 * 
 *     if stateOut is None:
 *         return None             # <<<<<<<<<<<<<<
 * 
 *     return to_return
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;

    /* "psychxr/ovr/capi.pyx":1434
 *         ptr_state)
 * 
 *     if stateOut is None:             # <<<<<<<<<<<<<<
 *         return None
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":1437
 *         return None
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * cpdef double pollController(str controller):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = ((PyObject *)__pyx_v_to_return);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1398
 *         return (thumbstick_x0, thumbstick_y0), (thumbstick_x1, thumbstick_y1)
 * 
 * cpdef object getInputState(str controller, object stateOut=None):             # <<<<<<<<<<<<<<
 *     """Get a controller state as an object. If a 'InputStateData' object is
 *     passed to 'state_out', that object will be updated.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.getInputState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_71getInputState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_70getInputState[] = "Get a controller state as an object. If a 'InputStateData' object is\n    passed to 'state_out', that object will be updated.\n    \n    :param controller: str\n    :param state_out: InputStateData or None\n    :return: InputStateData or None\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_71getInputState(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_controller = 0;
  PyObject *__pyx_v_stateOut = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getInputState (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_stateOut,0};
    PyObject* values[2] = {0,0};
    values[1] = ((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  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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stateOut);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getInputState") < 0)) __PYX_ERR(0, 1398, __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_controller = ((PyObject*)values[0]);
    __pyx_v_stateOut = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getInputState", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1398, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getInputState", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_controller), (&PyString_Type), 1, "controller", 1))) __PYX_ERR(0, 1398, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_70getInputState(__pyx_self, __pyx_v_controller, __pyx_v_stateOut);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_70getInputState(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, PyObject *__pyx_v_stateOut) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getInputState __pyx_t_2;
  __Pyx_RefNannySetupContext("getInputState", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.stateOut = __pyx_v_stateOut;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getInputState(__pyx_v_controller, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1439
 *     return to_return
 * 
 * cpdef double pollController(str controller):             # <<<<<<<<<<<<<<
 *     """Poll and update specified controller's state data. The time delta in
 *     seconds between the current and previous controller state is returned.
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_73pollController(PyObject *__pyx_self, PyObject *__pyx_v_controller); /*proto*/
static double __pyx_f_7psychxr_3ovr_4capi_pollController(PyObject *__pyx_v_controller, CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrInputState *__pyx_v_ptr_ctrl;
  ovrInputState *__pyx_v_ptr_ctrl_prev;
  ovrControllerType __pyx_v_ctrl_type;
  ovrResult __pyx_v_result;
  double __pyx_r;
  __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;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("pollController", 0);

  /* "psychxr/ovr/capi.pyx":1448
 *     """
 *     global _ptr_session_, _ctrl_states_, _ctrl_states_prev_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 * 
 */
  __pyx_v_ptr_ctrl = NULL;

  /* "psychxr/ovr/capi.pyx":1449
 *     global _ptr_session_, _ctrl_states_, _ctrl_states_prev_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL             # <<<<<<<<<<<<<<
 * 
 *     cdef ovr_capi.ovrControllerType ctrl_type
 */
  __pyx_v_ptr_ctrl_prev = NULL;

  /* "psychxr/ovr/capi.pyx":1452
 * 
 *     cdef ovr_capi.ovrControllerType ctrl_type
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_XBox
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_xbox, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1452, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1453
 *     cdef ovr_capi.ovrControllerType ctrl_type
 *     if controller == 'xbox':
 *         ctrl_type = ovr_capi.ovrControllerType_XBox             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 */
    __pyx_v_ctrl_type = ovrControllerType_XBox;

    /* "psychxr/ovr/capi.pyx":1454
 *     if controller == 'xbox':
 *         ctrl_type = ovr_capi.ovrControllerType_XBox
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1455
 *         ctrl_type = ovr_capi.ovrControllerType_XBox
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *     elif controller == 'remote':
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1452
 * 
 *     cdef ovr_capi.ovrControllerType ctrl_type
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_XBox
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1456
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_remote, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1456, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1457
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 *         ctrl_type = ovr_capi.ovrControllerType_Remote             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 */
    __pyx_v_ctrl_type = ovrControllerType_Remote;

    /* "psychxr/ovr/capi.pyx":1458
 *     elif controller == 'remote':
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1459
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *     elif controller == 'touch':
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1456
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_Remote
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1460
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1460, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1461
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 *         ctrl_type = ovr_capi.ovrControllerType_Touch             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 */
    __pyx_v_ctrl_type = ovrControllerType_Touch;

    /* "psychxr/ovr/capi.pyx":1462
 *     elif controller == 'touch':
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1463
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'left_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1460
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_Touch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1464
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_left_touch, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1464, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1465
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 */
    __pyx_v_ctrl_type = ovrControllerType_LTouch;

    /* "psychxr/ovr/capi.pyx":1466
 *     elif controller == 'left_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1467
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'right_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_RTouch
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1464
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_LTouch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1468
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_RTouch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_right_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1468, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1469
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_RTouch             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 */
    __pyx_v_ctrl_type = ovrControllerType_RTouch;

    /* "psychxr/ovr/capi.pyx":1470
 *     elif controller == 'right_touch':
 *         ctrl_type = ovr_capi.ovrControllerType_RTouch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 * 
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1471
 *         ctrl_type = ovr_capi.ovrControllerType_RTouch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 * 
 *     # copy the previous control state
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1468
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ctrl_type = ovr_capi.ovrControllerType_RTouch
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1474
 * 
 *     # copy the previous control state
 *     ptr_ctrl_prev[0] = ptr_ctrl[0]             # <<<<<<<<<<<<<<
 * 
 *     # update the current controller state
 */
  (__pyx_v_ptr_ctrl_prev[0]) = (__pyx_v_ptr_ctrl[0]);

  /* "psychxr/ovr/capi.pyx":1477
 * 
 *     # update the current controller state
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_GetInputState(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         ctrl_type,
 */
  __pyx_v_result = ovr_GetInputState(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, __pyx_v_ctrl_type, __pyx_v_ptr_ctrl);

  /* "psychxr/ovr/capi.pyx":1482
 *         ptr_ctrl)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1482, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1483
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 *     # return the time delta between the last time the controller was polled
 */
    __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1483, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (!__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_GOTREF(__pyx_t_3);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
        PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5};
        __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      } else
      #endif
      {
        __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1483, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "psychxr/ovr/capi.pyx":1482
 *         ptr_ctrl)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":1486
 * 
 *     # return the time delta between the last time the controller was polled
 *     return ptr_ctrl[0].TimeInSeconds - ptr_ctrl_prev[0].TimeInSeconds             # <<<<<<<<<<<<<<
 * 
 * cpdef double getControllerAbsTime(str controller):
 */
  __pyx_r = ((__pyx_v_ptr_ctrl[0]).TimeInSeconds - (__pyx_v_ptr_ctrl_prev[0]).TimeInSeconds);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1439
 *     return to_return
 * 
 * cpdef double pollController(str controller):             # <<<<<<<<<<<<<<
 *     """Poll and update specified controller's state data. The time delta in
 *     seconds between the current and previous controller state is returned.
 */

  /* 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_XDECREF(__pyx_t_7);
  __Pyx_WriteUnraisable("psychxr.ovr.capi.pollController", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_73pollController(PyObject *__pyx_self, PyObject *__pyx_v_controller); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_72pollController[] = "Poll and update specified controller's state data. The time delta in \n    seconds between the current and previous controller state is returned.\n    \n    :param controller: str or None\n    :return: double\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_73pollController(PyObject *__pyx_self, PyObject *__pyx_v_controller) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pollController (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_controller), (&PyString_Type), 1, "controller", 1))) __PYX_ERR(0, 1439, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_72pollController(__pyx_self, ((PyObject*)__pyx_v_controller));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_72pollController(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("pollController", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_7psychxr_3ovr_4capi_pollController(__pyx_v_controller, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1488
 *     return ptr_ctrl[0].TimeInSeconds - ptr_ctrl_prev[0].TimeInSeconds
 * 
 * cpdef double getControllerAbsTime(str controller):             # <<<<<<<<<<<<<<
 *     """Get the absolute time the state of the specified controller was last
 *     updated.
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_75getControllerAbsTime(PyObject *__pyx_self, PyObject *__pyx_v_controller); /*proto*/
static double __pyx_f_7psychxr_3ovr_4capi_getControllerAbsTime(PyObject *__pyx_v_controller, CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrInputState *__pyx_v_ptr_ctrl_state;
  double __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("getControllerAbsTime", 0);

  /* "psychxr/ovr/capi.pyx":1498
 *     # get pointer to control state
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL             # <<<<<<<<<<<<<<
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 */
  __pyx_v_ptr_ctrl_state = NULL;

  /* "psychxr/ovr/capi.pyx":1499
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_xbox, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1500
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1499
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1501
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_remote, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1502
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1501
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1503
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1503, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1504
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1503
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1505
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_left_touch, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1505, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1506
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'right_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1505
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1507
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 * 
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_right_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1508
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 * 
 *     return ptr_ctrl_state[0].TimeInSeconds
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1507
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 * 
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1510
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 * 
 *     return ptr_ctrl_state[0].TimeInSeconds             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple getIndexTriggerValues(str controller, bint deadZone=False):
 */
  __pyx_r = (__pyx_v_ptr_ctrl_state[0]).TimeInSeconds;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1488
 *     return ptr_ctrl[0].TimeInSeconds - ptr_ctrl_prev[0].TimeInSeconds
 * 
 * cpdef double getControllerAbsTime(str controller):             # <<<<<<<<<<<<<<
 *     """Get the absolute time the state of the specified controller was last
 *     updated.
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("psychxr.ovr.capi.getControllerAbsTime", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_75getControllerAbsTime(PyObject *__pyx_self, PyObject *__pyx_v_controller); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_74getControllerAbsTime[] = "Get the absolute time the state of the specified controller was last \n    updated.\n    \n    :param controller: str or None\n    :return: float\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_75getControllerAbsTime(PyObject *__pyx_self, PyObject *__pyx_v_controller) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getControllerAbsTime (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_controller), (&PyString_Type), 1, "controller", 1))) __PYX_ERR(0, 1488, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_74getControllerAbsTime(__pyx_self, ((PyObject*)__pyx_v_controller));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_74getControllerAbsTime(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getControllerAbsTime", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_7psychxr_3ovr_4capi_getControllerAbsTime(__pyx_v_controller, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1512
 *     return ptr_ctrl_state[0].TimeInSeconds
 * 
 * cpdef tuple getIndexTriggerValues(str controller, bint deadZone=False):             # <<<<<<<<<<<<<<
 *     """Get index trigger values for a specified controller.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_77getIndexTriggerValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getIndexTriggerValues(PyObject *__pyx_v_controller, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getIndexTriggerValues *__pyx_optional_args) {
  int __pyx_v_deadZone = ((int)0);
  ovrInputState *__pyx_v_ptr_ctrl_state;
  float __pyx_v_index_trigger_left;
  float __pyx_v_index_trigger_right;
  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;
  __Pyx_RefNannySetupContext("getIndexTriggerValues", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_deadZone = __pyx_optional_args->deadZone;
    }
  }

  /* "psychxr/ovr/capi.pyx":1522
 *     # get pointer to control state
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL             # <<<<<<<<<<<<<<
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 */
  __pyx_v_ptr_ctrl_state = NULL;

  /* "psychxr/ovr/capi.pyx":1523
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_xbox, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1523, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1524
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1523
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1525
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_remote, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1525, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1526
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1525
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1527
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1527, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1528
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1527
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1529
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_left_touch, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1529, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1530
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'right_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1529
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1531
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 * 
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_right_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1532
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 * 
 *     cdef float index_trigger_left = 0.0
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1531
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 * 
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1534
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 * 
 *     cdef float index_trigger_left = 0.0             # <<<<<<<<<<<<<<
 *     cdef float index_trigger_right = 0.0
 * 
 */
  __pyx_v_index_trigger_left = 0.0;

  /* "psychxr/ovr/capi.pyx":1535
 * 
 *     cdef float index_trigger_left = 0.0
 *     cdef float index_trigger_right = 0.0             # <<<<<<<<<<<<<<
 * 
 *     # get the value with or without the deadzone
 */
  __pyx_v_index_trigger_right = 0.0;

  /* "psychxr/ovr/capi.pyx":1538
 * 
 *     # get the value with or without the deadzone
 *     if not deadZone:             # <<<<<<<<<<<<<<
 *         index_trigger_left = ptr_ctrl_state[0].IndexTriggerNoDeadzone[0]
 *         index_trigger_right = ptr_ctrl_state[0].IndexTriggerNoDeadzone[1]
 */
  __pyx_t_2 = ((!(__pyx_v_deadZone != 0)) != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1539
 *     # get the value with or without the deadzone
 *     if not deadZone:
 *         index_trigger_left = ptr_ctrl_state[0].IndexTriggerNoDeadzone[0]             # <<<<<<<<<<<<<<
 *         index_trigger_right = ptr_ctrl_state[0].IndexTriggerNoDeadzone[1]
 *     else:
 */
    __pyx_v_index_trigger_left = ((__pyx_v_ptr_ctrl_state[0]).IndexTriggerNoDeadzone[0]);

    /* "psychxr/ovr/capi.pyx":1540
 *     if not deadZone:
 *         index_trigger_left = ptr_ctrl_state[0].IndexTriggerNoDeadzone[0]
 *         index_trigger_right = ptr_ctrl_state[0].IndexTriggerNoDeadzone[1]             # <<<<<<<<<<<<<<
 *     else:
 *         index_trigger_left = ptr_ctrl_state[0].IndexTrigger[0]
 */
    __pyx_v_index_trigger_right = ((__pyx_v_ptr_ctrl_state[0]).IndexTriggerNoDeadzone[1]);

    /* "psychxr/ovr/capi.pyx":1538
 * 
 *     # get the value with or without the deadzone
 *     if not deadZone:             # <<<<<<<<<<<<<<
 *         index_trigger_left = ptr_ctrl_state[0].IndexTriggerNoDeadzone[0]
 *         index_trigger_right = ptr_ctrl_state[0].IndexTriggerNoDeadzone[1]
 */
    goto __pyx_L4;
  }

  /* "psychxr/ovr/capi.pyx":1542
 *         index_trigger_right = ptr_ctrl_state[0].IndexTriggerNoDeadzone[1]
 *     else:
 *         index_trigger_left = ptr_ctrl_state[0].IndexTrigger[0]             # <<<<<<<<<<<<<<
 *         index_trigger_right = ptr_ctrl_state[0].IndexTrigger[1]
 * 
 */
  /*else*/ {
    __pyx_v_index_trigger_left = ((__pyx_v_ptr_ctrl_state[0]).IndexTrigger[0]);

    /* "psychxr/ovr/capi.pyx":1543
 *     else:
 *         index_trigger_left = ptr_ctrl_state[0].IndexTrigger[0]
 *         index_trigger_right = ptr_ctrl_state[0].IndexTrigger[1]             # <<<<<<<<<<<<<<
 * 
 *     return index_trigger_left, index_trigger_right
 */
    __pyx_v_index_trigger_right = ((__pyx_v_ptr_ctrl_state[0]).IndexTrigger[1]);
  }
  __pyx_L4:;

  /* "psychxr/ovr/capi.pyx":1545
 *         index_trigger_right = ptr_ctrl_state[0].IndexTrigger[1]
 * 
 *     return index_trigger_left, index_trigger_right             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple getHandTriggerValues(str controller, bint deadZone=False):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_index_trigger_left); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_index_trigger_right); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1545, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1545, __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_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1512
 *     return ptr_ctrl_state[0].TimeInSeconds
 * 
 * cpdef tuple getIndexTriggerValues(str controller, bint deadZone=False):             # <<<<<<<<<<<<<<
 *     """Get index trigger values for a specified controller.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psychxr.ovr.capi.getIndexTriggerValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_77getIndexTriggerValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_76getIndexTriggerValues[] = "Get index trigger values for a specified controller.\n    \n    :param controller: str\n    :param deadZone: boolean\n    :return: tuple\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_77getIndexTriggerValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_controller = 0;
  int __pyx_v_deadZone;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIndexTriggerValues (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_deadZone,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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_deadZone);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getIndexTriggerValues") < 0)) __PYX_ERR(0, 1512, __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_controller = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_deadZone = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_deadZone == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1512, __pyx_L3_error)
    } else {
      __pyx_v_deadZone = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getIndexTriggerValues", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1512, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getIndexTriggerValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_controller), (&PyString_Type), 1, "controller", 1))) __PYX_ERR(0, 1512, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_76getIndexTriggerValues(__pyx_self, __pyx_v_controller, __pyx_v_deadZone);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_76getIndexTriggerValues(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, int __pyx_v_deadZone) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getIndexTriggerValues __pyx_t_2;
  __Pyx_RefNannySetupContext("getIndexTriggerValues", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.deadZone = __pyx_v_deadZone;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getIndexTriggerValues(__pyx_v_controller, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1547
 *     return index_trigger_left, index_trigger_right
 * 
 * cpdef tuple getHandTriggerValues(str controller, bint deadZone=False):             # <<<<<<<<<<<<<<
 *     """Get hand trigger values for a specified controller.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_79getHandTriggerValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getHandTriggerValues(PyObject *__pyx_v_controller, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getHandTriggerValues *__pyx_optional_args) {
  int __pyx_v_deadZone = ((int)0);
  ovrInputState *__pyx_v_ptr_ctrl_state;
  float __pyx_v_hand_trigger_left;
  float __pyx_v_hand_trigger_right;
  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;
  __Pyx_RefNannySetupContext("getHandTriggerValues", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_deadZone = __pyx_optional_args->deadZone;
    }
  }

  /* "psychxr/ovr/capi.pyx":1557
 *     # get pointer to control state
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL             # <<<<<<<<<<<<<<
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 */
  __pyx_v_ptr_ctrl_state = NULL;

  /* "psychxr/ovr/capi.pyx":1558
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_xbox, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1558, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1559
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1558
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_state = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1560
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_remote, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1560, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1561
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1560
 *     if controller == 'xbox':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1562
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1562, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1563
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1562
 *     elif controller == 'remote':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1564
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_left_touch, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1564, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1565
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'right_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1564
 *     elif controller == 'touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1566
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 * 
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_right_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1566, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1567
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 * 
 *     cdef float hand_trigger_left = 0.0
 */
    __pyx_v_ptr_ctrl_state = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1566
 *     elif controller == 'left_touch':
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 * 
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1569
 *         ptr_ctrl_state = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 * 
 *     cdef float hand_trigger_left = 0.0             # <<<<<<<<<<<<<<
 *     cdef float hand_trigger_right = 0.0
 * 
 */
  __pyx_v_hand_trigger_left = 0.0;

  /* "psychxr/ovr/capi.pyx":1570
 * 
 *     cdef float hand_trigger_left = 0.0
 *     cdef float hand_trigger_right = 0.0             # <<<<<<<<<<<<<<
 * 
 *     # get the value with or without the deadzone
 */
  __pyx_v_hand_trigger_right = 0.0;

  /* "psychxr/ovr/capi.pyx":1573
 * 
 *     # get the value with or without the deadzone
 *     if not deadZone:             # <<<<<<<<<<<<<<
 *         hand_trigger_left = ptr_ctrl_state[0].HandTriggerNoDeadzone[0]
 *         hand_trigger_right = ptr_ctrl_state[0].HandTriggerNoDeadzone[1]
 */
  __pyx_t_2 = ((!(__pyx_v_deadZone != 0)) != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1574
 *     # get the value with or without the deadzone
 *     if not deadZone:
 *         hand_trigger_left = ptr_ctrl_state[0].HandTriggerNoDeadzone[0]             # <<<<<<<<<<<<<<
 *         hand_trigger_right = ptr_ctrl_state[0].HandTriggerNoDeadzone[1]
 *     else:
 */
    __pyx_v_hand_trigger_left = ((__pyx_v_ptr_ctrl_state[0]).HandTriggerNoDeadzone[0]);

    /* "psychxr/ovr/capi.pyx":1575
 *     if not deadZone:
 *         hand_trigger_left = ptr_ctrl_state[0].HandTriggerNoDeadzone[0]
 *         hand_trigger_right = ptr_ctrl_state[0].HandTriggerNoDeadzone[1]             # <<<<<<<<<<<<<<
 *     else:
 *         hand_trigger_left = ptr_ctrl_state[0].HandTrigger[0]
 */
    __pyx_v_hand_trigger_right = ((__pyx_v_ptr_ctrl_state[0]).HandTriggerNoDeadzone[1]);

    /* "psychxr/ovr/capi.pyx":1573
 * 
 *     # get the value with or without the deadzone
 *     if not deadZone:             # <<<<<<<<<<<<<<
 *         hand_trigger_left = ptr_ctrl_state[0].HandTriggerNoDeadzone[0]
 *         hand_trigger_right = ptr_ctrl_state[0].HandTriggerNoDeadzone[1]
 */
    goto __pyx_L4;
  }

  /* "psychxr/ovr/capi.pyx":1577
 *         hand_trigger_right = ptr_ctrl_state[0].HandTriggerNoDeadzone[1]
 *     else:
 *         hand_trigger_left = ptr_ctrl_state[0].HandTrigger[0]             # <<<<<<<<<<<<<<
 *         hand_trigger_right = ptr_ctrl_state[0].HandTrigger[1]
 * 
 */
  /*else*/ {
    __pyx_v_hand_trigger_left = ((__pyx_v_ptr_ctrl_state[0]).HandTrigger[0]);

    /* "psychxr/ovr/capi.pyx":1578
 *     else:
 *         hand_trigger_left = ptr_ctrl_state[0].HandTrigger[0]
 *         hand_trigger_right = ptr_ctrl_state[0].HandTrigger[1]             # <<<<<<<<<<<<<<
 * 
 *     return hand_trigger_left, hand_trigger_right
 */
    __pyx_v_hand_trigger_right = ((__pyx_v_ptr_ctrl_state[0]).HandTrigger[1]);
  }
  __pyx_L4:;

  /* "psychxr/ovr/capi.pyx":1580
 *         hand_trigger_right = ptr_ctrl_state[0].HandTrigger[1]
 * 
 *     return hand_trigger_left, hand_trigger_right             # <<<<<<<<<<<<<<
 * 
 * cdef float clip_input_range(float val):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyFloat_FromDouble(__pyx_v_hand_trigger_left); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_hand_trigger_right); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1580, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1580, __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_4);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
  __pyx_t_3 = 0;
  __pyx_t_4 = 0;
  __pyx_r = ((PyObject*)__pyx_t_5);
  __pyx_t_5 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1547
 *     return index_trigger_left, index_trigger_right
 * 
 * cpdef tuple getHandTriggerValues(str controller, bint deadZone=False):             # <<<<<<<<<<<<<<
 *     """Get hand trigger values for a specified controller.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("psychxr.ovr.capi.getHandTriggerValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_79getHandTriggerValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_78getHandTriggerValues[] = "Get hand trigger values for a specified controller.\n    \n    :param controller: str\n    :param deadzone: boolean\n    :return: tuple\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_79getHandTriggerValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_controller = 0;
  int __pyx_v_deadZone;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getHandTriggerValues (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_deadZone,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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_deadZone);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getHandTriggerValues") < 0)) __PYX_ERR(0, 1547, __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_controller = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_deadZone = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_deadZone == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1547, __pyx_L3_error)
    } else {
      __pyx_v_deadZone = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getHandTriggerValues", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1547, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getHandTriggerValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_controller), (&PyString_Type), 1, "controller", 1))) __PYX_ERR(0, 1547, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_78getHandTriggerValues(__pyx_self, __pyx_v_controller, __pyx_v_deadZone);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_78getHandTriggerValues(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, int __pyx_v_deadZone) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getHandTriggerValues __pyx_t_2;
  __Pyx_RefNannySetupContext("getHandTriggerValues", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.deadZone = __pyx_v_deadZone;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getHandTriggerValues(__pyx_v_controller, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1582
 *     return hand_trigger_left, hand_trigger_right
 * 
 * cdef float clip_input_range(float val):             # <<<<<<<<<<<<<<
 *     """Constrain an analog input device's range between -1.0 and 1.0. This is
 *     only accessible from module functions.
 */

static float __pyx_f_7psychxr_3ovr_4capi_clip_input_range(float __pyx_v_val) {
  float __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("clip_input_range", 0);

  /* "psychxr/ovr/capi.pyx":1590
 * 
 *     """
 *     if val > 1.0:             # <<<<<<<<<<<<<<
 *         val = 1.0
 *     elif val < 1.0:
 */
  __pyx_t_1 = ((__pyx_v_val > 1.0) != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1591
 *     """
 *     if val > 1.0:
 *         val = 1.0             # <<<<<<<<<<<<<<
 *     elif val < 1.0:
 *         val = 1.0
 */
    __pyx_v_val = 1.0;

    /* "psychxr/ovr/capi.pyx":1590
 * 
 *     """
 *     if val > 1.0:             # <<<<<<<<<<<<<<
 *         val = 1.0
 *     elif val < 1.0:
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1592
 *     if val > 1.0:
 *         val = 1.0
 *     elif val < 1.0:             # <<<<<<<<<<<<<<
 *         val = 1.0
 * 
 */
  __pyx_t_1 = ((__pyx_v_val < 1.0) != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1593
 *         val = 1.0
 *     elif val < 1.0:
 *         val = 1.0             # <<<<<<<<<<<<<<
 * 
 *     return val
 */
    __pyx_v_val = 1.0;

    /* "psychxr/ovr/capi.pyx":1592
 *     if val > 1.0:
 *         val = 1.0
 *     elif val < 1.0:             # <<<<<<<<<<<<<<
 *         val = 1.0
 * 
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1595
 *         val = 1.0
 * 
 *     return val             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple getThumbstickValues(str controller, bint deadZone=False):
 */
  __pyx_r = __pyx_v_val;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1582
 *     return hand_trigger_left, hand_trigger_right
 * 
 * cdef float clip_input_range(float val):             # <<<<<<<<<<<<<<
 *     """Constrain an analog input device's range between -1.0 and 1.0. This is
 *     only accessible from module functions.
 */

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

/* "psychxr/ovr/capi.pyx":1597
 *     return val
 * 
 * cpdef tuple getThumbstickValues(str controller, bint deadZone=False):             # <<<<<<<<<<<<<<
 *     """Get thumbstick values for a specified controller.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_81getThumbstickValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getThumbstickValues(PyObject *__pyx_v_controller, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getThumbstickValues *__pyx_optional_args) {
  int __pyx_v_deadZone = ((int)0);
  ovrInputState *__pyx_v_ptr_ctrl;
  CYTHON_UNUSED ovrInputState *__pyx_v_ptr_ctrl_prev;
  float __pyx_v_thumbstick0_x;
  float __pyx_v_thumbstick0_y;
  float __pyx_v_thumbstick1_x;
  float __pyx_v_thumbstick1_y;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  float __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  __Pyx_RefNannySetupContext("getThumbstickValues", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_deadZone = __pyx_optional_args->deadZone;
    }
  }

  /* "psychxr/ovr/capi.pyx":1607
 *     # get pointer to control state
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':
 */
  __pyx_v_ptr_ctrl = NULL;

  /* "psychxr/ovr/capi.pyx":1608
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL             # <<<<<<<<<<<<<<
 *     if controller == 'xbox':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 */
  __pyx_v_ptr_ctrl_prev = NULL;

  /* "psychxr/ovr/capi.pyx":1609
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_xbox, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1609, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1610
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1611
 *     if controller == 'xbox':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *     elif controller == 'remote':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1609
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1612
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_remote, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1612, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1613
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1614
 *     elif controller == 'remote':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *     elif controller == 'touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1612
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1615
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1615, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1616
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1617
 *     elif controller == 'touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'left_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1615
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1618
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_left_touch, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1618, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1619
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1620
 *     elif controller == 'left_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'right_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1618
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1621
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_right_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1621, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1622
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 * 
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1623
 *     elif controller == 'right_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 * 
 *     cdef float thumbstick0_x = 0.0
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1621
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1625
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 * 
 *     cdef float thumbstick0_x = 0.0             # <<<<<<<<<<<<<<
 *     cdef float thumbstick0_y = 0.0
 *     cdef float thumbstick1_x = 0.0
 */
  __pyx_v_thumbstick0_x = 0.0;

  /* "psychxr/ovr/capi.pyx":1626
 * 
 *     cdef float thumbstick0_x = 0.0
 *     cdef float thumbstick0_y = 0.0             # <<<<<<<<<<<<<<
 *     cdef float thumbstick1_x = 0.0
 *     cdef float thumbstick1_y = 0.0
 */
  __pyx_v_thumbstick0_y = 0.0;

  /* "psychxr/ovr/capi.pyx":1627
 *     cdef float thumbstick0_x = 0.0
 *     cdef float thumbstick0_y = 0.0
 *     cdef float thumbstick1_x = 0.0             # <<<<<<<<<<<<<<
 *     cdef float thumbstick1_y = 0.0
 * 
 */
  __pyx_v_thumbstick1_x = 0.0;

  /* "psychxr/ovr/capi.pyx":1628
 *     cdef float thumbstick0_y = 0.0
 *     cdef float thumbstick1_x = 0.0
 *     cdef float thumbstick1_y = 0.0             # <<<<<<<<<<<<<<
 * 
 *     # get the value with or without the deadzone
 */
  __pyx_v_thumbstick1_y = 0.0;

  /* "psychxr/ovr/capi.pyx":1631
 * 
 *     # get the value with or without the deadzone
 *     if not deadZone:             # <<<<<<<<<<<<<<
 *         thumbstick0_x = ptr_ctrl[0].Thumbstick[0].x
 *         thumbstick0_y = ptr_ctrl[0].Thumbstick[0].y
 */
  __pyx_t_2 = ((!(__pyx_v_deadZone != 0)) != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1632
 *     # get the value with or without the deadzone
 *     if not deadZone:
 *         thumbstick0_x = ptr_ctrl[0].Thumbstick[0].x             # <<<<<<<<<<<<<<
 *         thumbstick0_y = ptr_ctrl[0].Thumbstick[0].y
 *         thumbstick1_x = ptr_ctrl[0].Thumbstick[1].x
 */
    __pyx_t_3 = ((__pyx_v_ptr_ctrl[0]).Thumbstick[0]).x;
    __pyx_v_thumbstick0_x = __pyx_t_3;

    /* "psychxr/ovr/capi.pyx":1633
 *     if not deadZone:
 *         thumbstick0_x = ptr_ctrl[0].Thumbstick[0].x
 *         thumbstick0_y = ptr_ctrl[0].Thumbstick[0].y             # <<<<<<<<<<<<<<
 *         thumbstick1_x = ptr_ctrl[0].Thumbstick[1].x
 *         thumbstick1_y = ptr_ctrl[0].Thumbstick[1].y
 */
    __pyx_t_3 = ((__pyx_v_ptr_ctrl[0]).Thumbstick[0]).y;
    __pyx_v_thumbstick0_y = __pyx_t_3;

    /* "psychxr/ovr/capi.pyx":1634
 *         thumbstick0_x = ptr_ctrl[0].Thumbstick[0].x
 *         thumbstick0_y = ptr_ctrl[0].Thumbstick[0].y
 *         thumbstick1_x = ptr_ctrl[0].Thumbstick[1].x             # <<<<<<<<<<<<<<
 *         thumbstick1_y = ptr_ctrl[0].Thumbstick[1].y
 *     else:
 */
    __pyx_t_3 = ((__pyx_v_ptr_ctrl[0]).Thumbstick[1]).x;
    __pyx_v_thumbstick1_x = __pyx_t_3;

    /* "psychxr/ovr/capi.pyx":1635
 *         thumbstick0_y = ptr_ctrl[0].Thumbstick[0].y
 *         thumbstick1_x = ptr_ctrl[0].Thumbstick[1].x
 *         thumbstick1_y = ptr_ctrl[0].Thumbstick[1].y             # <<<<<<<<<<<<<<
 *     else:
 *         thumbstick0_x = ptr_ctrl[0].ThumbstickNoDeadzone[0].x
 */
    __pyx_t_3 = ((__pyx_v_ptr_ctrl[0]).Thumbstick[1]).y;
    __pyx_v_thumbstick1_y = __pyx_t_3;

    /* "psychxr/ovr/capi.pyx":1631
 * 
 *     # get the value with or without the deadzone
 *     if not deadZone:             # <<<<<<<<<<<<<<
 *         thumbstick0_x = ptr_ctrl[0].Thumbstick[0].x
 *         thumbstick0_y = ptr_ctrl[0].Thumbstick[0].y
 */
    goto __pyx_L4;
  }

  /* "psychxr/ovr/capi.pyx":1637
 *         thumbstick1_y = ptr_ctrl[0].Thumbstick[1].y
 *     else:
 *         thumbstick0_x = ptr_ctrl[0].ThumbstickNoDeadzone[0].x             # <<<<<<<<<<<<<<
 *         thumbstick0_y = ptr_ctrl[0].ThumbstickNoDeadzone[0].y
 *         thumbstick1_x = ptr_ctrl[0].ThumbstickNoDeadzone[1].x
 */
  /*else*/ {
    __pyx_t_3 = ((__pyx_v_ptr_ctrl[0]).ThumbstickNoDeadzone[0]).x;
    __pyx_v_thumbstick0_x = __pyx_t_3;

    /* "psychxr/ovr/capi.pyx":1638
 *     else:
 *         thumbstick0_x = ptr_ctrl[0].ThumbstickNoDeadzone[0].x
 *         thumbstick0_y = ptr_ctrl[0].ThumbstickNoDeadzone[0].y             # <<<<<<<<<<<<<<
 *         thumbstick1_x = ptr_ctrl[0].ThumbstickNoDeadzone[1].x
 *         thumbstick1_y = ptr_ctrl[0].ThumbstickNoDeadzone[1].y
 */
    __pyx_t_3 = ((__pyx_v_ptr_ctrl[0]).ThumbstickNoDeadzone[0]).y;
    __pyx_v_thumbstick0_y = __pyx_t_3;

    /* "psychxr/ovr/capi.pyx":1639
 *         thumbstick0_x = ptr_ctrl[0].ThumbstickNoDeadzone[0].x
 *         thumbstick0_y = ptr_ctrl[0].ThumbstickNoDeadzone[0].y
 *         thumbstick1_x = ptr_ctrl[0].ThumbstickNoDeadzone[1].x             # <<<<<<<<<<<<<<
 *         thumbstick1_y = ptr_ctrl[0].ThumbstickNoDeadzone[1].y
 * 
 */
    __pyx_t_3 = ((__pyx_v_ptr_ctrl[0]).ThumbstickNoDeadzone[1]).x;
    __pyx_v_thumbstick1_x = __pyx_t_3;

    /* "psychxr/ovr/capi.pyx":1640
 *         thumbstick0_y = ptr_ctrl[0].ThumbstickNoDeadzone[0].y
 *         thumbstick1_x = ptr_ctrl[0].ThumbstickNoDeadzone[1].x
 *         thumbstick1_y = ptr_ctrl[0].ThumbstickNoDeadzone[1].y             # <<<<<<<<<<<<<<
 * 
 *     # clip range
 */
    __pyx_t_3 = ((__pyx_v_ptr_ctrl[0]).ThumbstickNoDeadzone[1]).y;
    __pyx_v_thumbstick1_y = __pyx_t_3;
  }
  __pyx_L4:;

  /* "psychxr/ovr/capi.pyx":1643
 * 
 *     # clip range
 *     thumbstick0_x = clip_input_range(thumbstick0_x)             # <<<<<<<<<<<<<<
 *     thumbstick0_y = clip_input_range(thumbstick0_y)
 *     thumbstick1_x = clip_input_range(thumbstick1_x)
 */
  __pyx_v_thumbstick0_x = __pyx_f_7psychxr_3ovr_4capi_clip_input_range(__pyx_v_thumbstick0_x);

  /* "psychxr/ovr/capi.pyx":1644
 *     # clip range
 *     thumbstick0_x = clip_input_range(thumbstick0_x)
 *     thumbstick0_y = clip_input_range(thumbstick0_y)             # <<<<<<<<<<<<<<
 *     thumbstick1_x = clip_input_range(thumbstick1_x)
 *     thumbstick1_y = clip_input_range(thumbstick1_y)
 */
  __pyx_v_thumbstick0_y = __pyx_f_7psychxr_3ovr_4capi_clip_input_range(__pyx_v_thumbstick0_y);

  /* "psychxr/ovr/capi.pyx":1645
 *     thumbstick0_x = clip_input_range(thumbstick0_x)
 *     thumbstick0_y = clip_input_range(thumbstick0_y)
 *     thumbstick1_x = clip_input_range(thumbstick1_x)             # <<<<<<<<<<<<<<
 *     thumbstick1_y = clip_input_range(thumbstick1_y)
 * 
 */
  __pyx_v_thumbstick1_x = __pyx_f_7psychxr_3ovr_4capi_clip_input_range(__pyx_v_thumbstick1_x);

  /* "psychxr/ovr/capi.pyx":1646
 *     thumbstick0_y = clip_input_range(thumbstick0_y)
 *     thumbstick1_x = clip_input_range(thumbstick1_x)
 *     thumbstick1_y = clip_input_range(thumbstick1_y)             # <<<<<<<<<<<<<<
 * 
 *     return (thumbstick0_x, thumbstick0_y), (thumbstick1_x, thumbstick1_y)
 */
  __pyx_v_thumbstick1_y = __pyx_f_7psychxr_3ovr_4capi_clip_input_range(__pyx_v_thumbstick1_y);

  /* "psychxr/ovr/capi.pyx":1648
 *     thumbstick1_y = clip_input_range(thumbstick1_y)
 * 
 *     return (thumbstick0_x, thumbstick0_y), (thumbstick1_x, thumbstick1_y)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint getButtons(str controller, object buttonNames, str trigger='continuous'):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_thumbstick0_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_thumbstick0_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
  __pyx_t_4 = 0;
  __pyx_t_5 = 0;
  __pyx_t_5 = PyFloat_FromDouble(__pyx_v_thumbstick1_x); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = PyFloat_FromDouble(__pyx_v_thumbstick1_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_5);
  PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
  __Pyx_GIVEREF(__pyx_t_4);
  PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_4);
  __pyx_t_5 = 0;
  __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1648, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_GIVEREF(__pyx_t_6);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_7);
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_7);
  __pyx_t_6 = 0;
  __pyx_t_7 = 0;
  __pyx_r = ((PyObject*)__pyx_t_4);
  __pyx_t_4 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1597
 *     return val
 * 
 * cpdef tuple getThumbstickValues(str controller, bint deadZone=False):             # <<<<<<<<<<<<<<
 *     """Get thumbstick values for a specified controller.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("psychxr.ovr.capi.getThumbstickValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_81getThumbstickValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_80getThumbstickValues[] = "Get thumbstick values for a specified controller.\n    \n    :param controller: \n    :param dead_zone: \n    :return: tuple\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_81getThumbstickValues(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_controller = 0;
  int __pyx_v_deadZone;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getThumbstickValues (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_deadZone,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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_deadZone);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getThumbstickValues") < 0)) __PYX_ERR(0, 1597, __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_controller = ((PyObject*)values[0]);
    if (values[1]) {
      __pyx_v_deadZone = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_deadZone == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1597, __pyx_L3_error)
    } else {
      __pyx_v_deadZone = ((int)0);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getThumbstickValues", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1597, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getThumbstickValues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_controller), (&PyString_Type), 1, "controller", 1))) __PYX_ERR(0, 1597, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_80getThumbstickValues(__pyx_self, __pyx_v_controller, __pyx_v_deadZone);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_80getThumbstickValues(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, int __pyx_v_deadZone) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getThumbstickValues __pyx_t_2;
  __Pyx_RefNannySetupContext("getThumbstickValues", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.deadZone = __pyx_v_deadZone;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getThumbstickValues(__pyx_v_controller, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1597, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1650
 *     return (thumbstick0_x, thumbstick0_y), (thumbstick1_x, thumbstick1_y)
 * 
 * cpdef bint getButtons(str controller, object buttonNames, str trigger='continuous'):             # <<<<<<<<<<<<<<
 *     """Get the state of a specified button for a given controller.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_83getButtons(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_getButtons(PyObject *__pyx_v_controller, PyObject *__pyx_v_buttonNames, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getButtons *__pyx_optional_args) {
  PyObject *__pyx_v_trigger = ((PyObject*)__pyx_n_s_continuous);
  ovrInputState *__pyx_v_ptr_ctrl;
  ovrInputState *__pyx_v_ptr_ctrl_prev;
  unsigned int __pyx_v_button_bits;
  int __pyx_v_i;
  int __pyx_v_N;
  int __pyx_v_pressed;
  int __pyx_r;
  __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;
  unsigned int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("getButtons", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_trigger = __pyx_optional_args->trigger;
    }
  }

  /* "psychxr/ovr/capi.pyx":1672
 *     # get pointer to control state
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':
 */
  __pyx_v_ptr_ctrl = NULL;

  /* "psychxr/ovr/capi.pyx":1673
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL             # <<<<<<<<<<<<<<
 *     if controller == 'xbox':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 */
  __pyx_v_ptr_ctrl_prev = NULL;

  /* "psychxr/ovr/capi.pyx":1674
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_xbox, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1674, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1675
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1676
 *     if controller == 'xbox':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *     elif controller == 'remote':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1674
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1677
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_remote, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1677, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1678
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1679
 *     elif controller == 'remote':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *     elif controller == 'touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1677
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1680
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1680, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1681
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1682
 *     elif controller == 'touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'left_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1680
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1683
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_left_touch, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1683, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1684
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1685
 *     elif controller == 'left_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'right_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1683
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1686
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_right_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1686, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1687
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 * 
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1688
 *     elif controller == 'right_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 * 
 *     cdef unsigned int button_bits = 0x00000000
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1686
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1690
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 * 
 *     cdef unsigned int button_bits = 0x00000000             # <<<<<<<<<<<<<<
 *     cdef int i, N
 *     if isinstance(buttonNames, str):  # don't loop if a string is specified
 */
  __pyx_v_button_bits = 0x00000000;

  /* "psychxr/ovr/capi.pyx":1692
 *     cdef unsigned int button_bits = 0x00000000
 *     cdef int i, N
 *     if isinstance(buttonNames, str):  # don't loop if a string is specified             # <<<<<<<<<<<<<<
 *         button_bits |= ctrl_button_lut[buttonNames]
 *     elif isinstance(buttonNames, (tuple, list)):
 */
  __pyx_t_2 = PyString_Check(__pyx_v_buttonNames); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1693
 *     cdef int i, N
 *     if isinstance(buttonNames, str):  # don't loop if a string is specified
 *         button_bits |= ctrl_button_lut[buttonNames]             # <<<<<<<<<<<<<<
 *     elif isinstance(buttonNames, (tuple, list)):
 *         # loop over all names and combine them
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_button_bits); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1693, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut, __pyx_v_buttonNames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1693, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_InPlaceOr(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1693, __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_6 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1693, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_button_bits = __pyx_t_6;

    /* "psychxr/ovr/capi.pyx":1692
 *     cdef unsigned int button_bits = 0x00000000
 *     cdef int i, N
 *     if isinstance(buttonNames, str):  # don't loop if a string is specified             # <<<<<<<<<<<<<<
 *         button_bits |= ctrl_button_lut[buttonNames]
 *     elif isinstance(buttonNames, (tuple, list)):
 */
    goto __pyx_L4;
  }

  /* "psychxr/ovr/capi.pyx":1694
 *     if isinstance(buttonNames, str):  # don't loop if a string is specified
 *         button_bits |= ctrl_button_lut[buttonNames]
 *     elif isinstance(buttonNames, (tuple, list)):             # <<<<<<<<<<<<<<
 *         # loop over all names and combine them
 *         N = <int>len(buttonNames)
 */
  __pyx_t_2 = PyTuple_Check(__pyx_v_buttonNames); 
  __pyx_t_7 = (__pyx_t_2 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = PyList_Check(__pyx_v_buttonNames); 
  __pyx_t_2 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1696
 *     elif isinstance(buttonNames, (tuple, list)):
 *         # loop over all names and combine them
 *         N = <int>len(buttonNames)             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             button_bits |= ctrl_button_lut[buttonNames[i]]
 */
    __pyx_t_8 = PyObject_Length(__pyx_v_buttonNames); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1696, __pyx_L1_error)
    __pyx_v_N = ((int)__pyx_t_8);

    /* "psychxr/ovr/capi.pyx":1697
 *         # loop over all names and combine them
 *         N = <int>len(buttonNames)
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             button_bits |= ctrl_button_lut[buttonNames[i]]
 * 
 */
    __pyx_t_9 = __pyx_v_N;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "psychxr/ovr/capi.pyx":1698
 *         N = <int>len(buttonNames)
 *         for i in range(N):
 *             button_bits |= ctrl_button_lut[buttonNames[i]]             # <<<<<<<<<<<<<<
 * 
 *     # test if the button was pressed
 */
      __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_button_bits); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1698, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_buttonNames, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_InPlaceOr(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1698, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1698, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_button_bits = __pyx_t_6;
    }

    /* "psychxr/ovr/capi.pyx":1694
 *     if isinstance(buttonNames, str):  # don't loop if a string is specified
 *         button_bits |= ctrl_button_lut[buttonNames]
 *     elif isinstance(buttonNames, (tuple, list)):             # <<<<<<<<<<<<<<
 *         # loop over all names and combine them
 *         N = <int>len(buttonNames)
 */
  }
  __pyx_L4:;

  /* "psychxr/ovr/capi.pyx":1702
 *     # test if the button was pressed
 *     cdef bint pressed
 *     if trigger == 'continuous':             # <<<<<<<<<<<<<<
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits
 *     elif trigger == 'rising' or trigger == 'pressed':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_trigger, __pyx_n_s_continuous, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1702, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1703
 *     cdef bint pressed
 *     if trigger == 'continuous':
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits             # <<<<<<<<<<<<<<
 *     elif trigger == 'rising' or trigger == 'pressed':
 *         # rising edge, will trigger once when pressed
 */
    __pyx_v_pressed = ((__pyx_v_ptr_ctrl->Buttons & __pyx_v_button_bits) == __pyx_v_button_bits);

    /* "psychxr/ovr/capi.pyx":1702
 *     # test if the button was pressed
 *     cdef bint pressed
 *     if trigger == 'continuous':             # <<<<<<<<<<<<<<
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits
 *     elif trigger == 'rising' or trigger == 'pressed':
 */
    goto __pyx_L9;
  }

  /* "psychxr/ovr/capi.pyx":1704
 *     if trigger == 'continuous':
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits
 *     elif trigger == 'rising' or trigger == 'pressed':             # <<<<<<<<<<<<<<
 *         # rising edge, will trigger once when pressed
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits and \
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_trigger, __pyx_n_s_rising, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1704, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_2 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_trigger, __pyx_n_s_pressed, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1704, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1706
 *     elif trigger == 'rising' or trigger == 'pressed':
 *         # rising edge, will trigger once when pressed
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits and \             # <<<<<<<<<<<<<<
 *             (ptr_ctrl_prev.Buttons & button_bits) != button_bits
 *     elif trigger == 'falling' or trigger == 'released':
 */
    __pyx_t_2 = (((__pyx_v_ptr_ctrl->Buttons & __pyx_v_button_bits) == __pyx_v_button_bits) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L12_bool_binop_done;
    }

    /* "psychxr/ovr/capi.pyx":1707
 *         # rising edge, will trigger once when pressed
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits and \
 *             (ptr_ctrl_prev.Buttons & button_bits) != button_bits             # <<<<<<<<<<<<<<
 *     elif trigger == 'falling' or trigger == 'released':
 *         # falling edge, will trigger once when released
 */
    __pyx_t_2 = (((__pyx_v_ptr_ctrl_prev->Buttons & __pyx_v_button_bits) != __pyx_v_button_bits) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L12_bool_binop_done:;
    __pyx_v_pressed = __pyx_t_1;

    /* "psychxr/ovr/capi.pyx":1704
 *     if trigger == 'continuous':
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits
 *     elif trigger == 'rising' or trigger == 'pressed':             # <<<<<<<<<<<<<<
 *         # rising edge, will trigger once when pressed
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits and \
 */
    goto __pyx_L9;
  }

  /* "psychxr/ovr/capi.pyx":1708
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits and \
 *             (ptr_ctrl_prev.Buttons & button_bits) != button_bits
 *     elif trigger == 'falling' or trigger == 'released':             # <<<<<<<<<<<<<<
 *         # falling edge, will trigger once when released
 *         pressed = (ptr_ctrl.Buttons & button_bits) != button_bits and \
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_trigger, __pyx_n_s_falling, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_2 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_trigger, __pyx_n_s_released, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1708, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L14_bool_binop_done:;
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1710
 *     elif trigger == 'falling' or trigger == 'released':
 *         # falling edge, will trigger once when released
 *         pressed = (ptr_ctrl.Buttons & button_bits) != button_bits and \             # <<<<<<<<<<<<<<
 *             (ptr_ctrl_prev.Buttons & button_bits) == button_bits
 *     else:
 */
    __pyx_t_2 = (((__pyx_v_ptr_ctrl->Buttons & __pyx_v_button_bits) != __pyx_v_button_bits) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L16_bool_binop_done;
    }

    /* "psychxr/ovr/capi.pyx":1711
 *         # falling edge, will trigger once when released
 *         pressed = (ptr_ctrl.Buttons & button_bits) != button_bits and \
 *             (ptr_ctrl_prev.Buttons & button_bits) == button_bits             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")
 */
    __pyx_t_2 = (((__pyx_v_ptr_ctrl_prev->Buttons & __pyx_v_button_bits) == __pyx_v_button_bits) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L16_bool_binop_done:;
    __pyx_v_pressed = __pyx_t_1;

    /* "psychxr/ovr/capi.pyx":1708
 *         pressed = (ptr_ctrl.Buttons & button_bits) == button_bits and \
 *             (ptr_ctrl_prev.Buttons & button_bits) != button_bits
 *     elif trigger == 'falling' or trigger == 'released':             # <<<<<<<<<<<<<<
 *         # falling edge, will trigger once when released
 *         pressed = (ptr_ctrl.Buttons & button_bits) != button_bits and \
 */
    goto __pyx_L9;
  }

  /* "psychxr/ovr/capi.pyx":1713
 *             (ptr_ctrl_prev.Buttons & button_bits) == button_bits
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")             # <<<<<<<<<<<<<<
 * 
 *     return pressed
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1713, __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, 1713, __pyx_L1_error)
  }
  __pyx_L9:;

  /* "psychxr/ovr/capi.pyx":1715
 *         raise ValueError("Invalid trigger mode specified.")
 * 
 *     return pressed             # <<<<<<<<<<<<<<
 * 
 * cpdef bint getTouches(str controller, object touchNames, str trigger='continuous'):
 */
  __pyx_r = __pyx_v_pressed;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1650
 *     return (thumbstick0_x, thumbstick0_y), (thumbstick1_x, thumbstick1_y)
 * 
 * cpdef bint getButtons(str controller, object buttonNames, str trigger='continuous'):             # <<<<<<<<<<<<<<
 *     """Get the state of a specified button for a given controller.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("psychxr.ovr.capi.getButtons", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_83getButtons(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_82getButtons[] = "Get the state of a specified button for a given controller. \n    \n    Buttons to test are specified using their string names. Argument\n    'button_names' accepts a single string or a list. If a list is specified,\n    the returned value will reflect whether all buttons were triggered at the\n    time the controller was polled last. \n    \n    An optional trigger mode may be specified which defines the button's\n    activation criteria. Be default, trigger='continuous' which will return the\n    immediate state of the button is used. Using 'rising' will return True once \n    when the button is first pressed, whereas 'falling' will return True once \n    the button is released.\n    \n    :param controller: str\n    :param buttonNames: str, tuple or list\n    :param trigger: str\n    :return: boolean\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_83getButtons(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_controller = 0;
  PyObject *__pyx_v_buttonNames = 0;
  PyObject *__pyx_v_trigger = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getButtons (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_buttonNames,&__pyx_n_s_trigger,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject*)__pyx_n_s_continuous);
    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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_buttonNames)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getButtons", 0, 2, 3, 1); __PYX_ERR(0, 1650, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trigger);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getButtons") < 0)) __PYX_ERR(0, 1650, __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_controller = ((PyObject*)values[0]);
    __pyx_v_buttonNames = values[1];
    __pyx_v_trigger = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getButtons", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1650, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getButtons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_controller), (&PyString_Type), 1, "controller", 1))) __PYX_ERR(0, 1650, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_trigger), (&PyString_Type), 1, "trigger", 1))) __PYX_ERR(0, 1650, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_82getButtons(__pyx_self, __pyx_v_controller, __pyx_v_buttonNames, __pyx_v_trigger);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_82getButtons(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, PyObject *__pyx_v_buttonNames, PyObject *__pyx_v_trigger) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getButtons __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getButtons", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.trigger = __pyx_v_trigger;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getButtons(__pyx_v_controller, __pyx_v_buttonNames, 0, &__pyx_t_2); 
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.getButtons", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1717
 *     return pressed
 * 
 * cpdef bint getTouches(str controller, object touchNames, str trigger='continuous'):             # <<<<<<<<<<<<<<
 *     """Get touches for a specified device.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_85getTouches(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_getTouches(PyObject *__pyx_v_controller, PyObject *__pyx_v_touchNames, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_getTouches *__pyx_optional_args) {
  PyObject *__pyx_v_trigger = ((PyObject*)__pyx_n_s_continuous);
  ovrInputState *__pyx_v_ptr_ctrl;
  ovrInputState *__pyx_v_ptr_ctrl_prev;
  unsigned int __pyx_v_touch_bits;
  int __pyx_v_i;
  int __pyx_v_N;
  int __pyx_v_touched;
  int __pyx_r;
  __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;
  unsigned int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  __Pyx_RefNannySetupContext("getTouches", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_trigger = __pyx_optional_args->trigger;
    }
  }

  /* "psychxr/ovr/capi.pyx":1737
 *     # get pointer to control state
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':
 */
  __pyx_v_ptr_ctrl = NULL;

  /* "psychxr/ovr/capi.pyx":1738
 *     global _ctrl_states_
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL             # <<<<<<<<<<<<<<
 *     if controller == 'xbox':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 */
  __pyx_v_ptr_ctrl_prev = NULL;

  /* "psychxr/ovr/capi.pyx":1739
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_xbox, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1739, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1740
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1741
 *     if controller == 'xbox':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]             # <<<<<<<<<<<<<<
 *     elif controller == 'remote':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_xbox)]));

    /* "psychxr/ovr/capi.pyx":1739
 *     cdef ovr_capi.ovrInputState* ptr_ctrl = NULL
 *     cdef ovr_capi.ovrInputState* ptr_ctrl_prev = NULL
 *     if controller == 'xbox':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1742
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_remote, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1742, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1743
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1744
 *     elif controller == 'remote':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]             # <<<<<<<<<<<<<<
 *     elif controller == 'touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_remote)]));

    /* "psychxr/ovr/capi.pyx":1742
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.xbox]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.xbox]
 *     elif controller == 'remote':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1745
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1746
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1747
 *     elif controller == 'touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'left_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_touch)]));

    /* "psychxr/ovr/capi.pyx":1745
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.remote]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.remote]
 *     elif controller == 'touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1748
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_left_touch, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1748, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1749
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1750
 *     elif controller == 'left_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]             # <<<<<<<<<<<<<<
 *     elif controller == 'right_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_left_touch)]));

    /* "psychxr/ovr/capi.pyx":1748
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.touch]
 *     elif controller == 'left_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1751
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_controller, __pyx_n_s_right_touch, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1751, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1752
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 * 
 */
    __pyx_v_ptr_ctrl = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1753
 *     elif controller == 'right_touch':
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]             # <<<<<<<<<<<<<<
 * 
 *     cdef unsigned int touch_bits = 0x00000000
 */
    __pyx_v_ptr_ctrl_prev = (&(__pyx_v_7psychxr_3ovr_4capi__ctrl_states_prev_[((int)__pyx_e_7psychxr_3ovr_4capi_right_touch)]));

    /* "psychxr/ovr/capi.pyx":1751
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.left_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.left_touch]
 *     elif controller == 'right_touch':             # <<<<<<<<<<<<<<
 *         ptr_ctrl = &_ctrl_states_[<int>LibOVRControllers.right_touch]
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1755
 *         ptr_ctrl_prev = &_ctrl_states_prev_[<int>LibOVRControllers.right_touch]
 * 
 *     cdef unsigned int touch_bits = 0x00000000             # <<<<<<<<<<<<<<
 *     cdef int i, N
 *     if isinstance(touchNames, str):  # don't loop if a string is specified
 */
  __pyx_v_touch_bits = 0x00000000;

  /* "psychxr/ovr/capi.pyx":1757
 *     cdef unsigned int touch_bits = 0x00000000
 *     cdef int i, N
 *     if isinstance(touchNames, str):  # don't loop if a string is specified             # <<<<<<<<<<<<<<
 *         touch_bits |= ctrl_button_lut[touchNames]
 *     elif isinstance(touchNames, (tuple, list)):
 */
  __pyx_t_2 = PyString_Check(__pyx_v_touchNames); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1758
 *     cdef int i, N
 *     if isinstance(touchNames, str):  # don't loop if a string is specified
 *         touch_bits |= ctrl_button_lut[touchNames]             # <<<<<<<<<<<<<<
 *     elif isinstance(touchNames, (tuple, list)):
 *         # loop over all names and combine them
 */
    __pyx_t_3 = __Pyx_PyInt_From_unsigned_int(__pyx_v_touch_bits); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1758, __pyx_L1_error)
    }
    __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut, __pyx_v_touchNames); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyNumber_InPlaceOr(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1758, __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_6 = __Pyx_PyInt_As_unsigned_int(__pyx_t_5); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1758, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_touch_bits = __pyx_t_6;

    /* "psychxr/ovr/capi.pyx":1757
 *     cdef unsigned int touch_bits = 0x00000000
 *     cdef int i, N
 *     if isinstance(touchNames, str):  # don't loop if a string is specified             # <<<<<<<<<<<<<<
 *         touch_bits |= ctrl_button_lut[touchNames]
 *     elif isinstance(touchNames, (tuple, list)):
 */
    goto __pyx_L4;
  }

  /* "psychxr/ovr/capi.pyx":1759
 *     if isinstance(touchNames, str):  # don't loop if a string is specified
 *         touch_bits |= ctrl_button_lut[touchNames]
 *     elif isinstance(touchNames, (tuple, list)):             # <<<<<<<<<<<<<<
 *         # loop over all names and combine them
 *         N = <int>len(touchNames)
 */
  __pyx_t_2 = PyTuple_Check(__pyx_v_touchNames); 
  __pyx_t_7 = (__pyx_t_2 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_7 = PyList_Check(__pyx_v_touchNames); 
  __pyx_t_2 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1761
 *     elif isinstance(touchNames, (tuple, list)):
 *         # loop over all names and combine them
 *         N = <int>len(touchNames)             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             touch_bits |= ctrl_button_lut[touchNames[i]]
 */
    __pyx_t_8 = PyObject_Length(__pyx_v_touchNames); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1761, __pyx_L1_error)
    __pyx_v_N = ((int)__pyx_t_8);

    /* "psychxr/ovr/capi.pyx":1762
 *         # loop over all names and combine them
 *         N = <int>len(touchNames)
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             touch_bits |= ctrl_button_lut[touchNames[i]]
 * 
 */
    __pyx_t_9 = __pyx_v_N;
    for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
      __pyx_v_i = __pyx_t_10;

      /* "psychxr/ovr/capi.pyx":1763
 *         N = <int>len(touchNames)
 *         for i in range(N):
 *             touch_bits |= ctrl_button_lut[touchNames[i]]             # <<<<<<<<<<<<<<
 * 
 *     # test if the button was pressed
 */
      __pyx_t_5 = __Pyx_PyInt_From_unsigned_int(__pyx_v_touch_bits); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      if (unlikely(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 1763, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_touchNames, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyNumber_InPlaceOr(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1763, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyInt_As_unsigned_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (unsigned int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1763, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_touch_bits = __pyx_t_6;
    }

    /* "psychxr/ovr/capi.pyx":1759
 *     if isinstance(touchNames, str):  # don't loop if a string is specified
 *         touch_bits |= ctrl_button_lut[touchNames]
 *     elif isinstance(touchNames, (tuple, list)):             # <<<<<<<<<<<<<<
 *         # loop over all names and combine them
 *         N = <int>len(touchNames)
 */
  }
  __pyx_L4:;

  /* "psychxr/ovr/capi.pyx":1767
 *     # test if the button was pressed
 *     cdef bint touched
 *     if trigger == 'continuous':             # <<<<<<<<<<<<<<
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits
 *     elif trigger == 'rising' or trigger == 'pressed':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_trigger, __pyx_n_s_continuous, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1767, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1768
 *     cdef bint touched
 *     if trigger == 'continuous':
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits             # <<<<<<<<<<<<<<
 *     elif trigger == 'rising' or trigger == 'pressed':
 *         # rising edge, will trigger once when pressed
 */
    __pyx_v_touched = ((__pyx_v_ptr_ctrl->Touches & __pyx_v_touch_bits) == __pyx_v_touch_bits);

    /* "psychxr/ovr/capi.pyx":1767
 *     # test if the button was pressed
 *     cdef bint touched
 *     if trigger == 'continuous':             # <<<<<<<<<<<<<<
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits
 *     elif trigger == 'rising' or trigger == 'pressed':
 */
    goto __pyx_L9;
  }

  /* "psychxr/ovr/capi.pyx":1769
 *     if trigger == 'continuous':
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits
 *     elif trigger == 'rising' or trigger == 'pressed':             # <<<<<<<<<<<<<<
 *         # rising edge, will trigger once when pressed
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits and \
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_trigger, __pyx_n_s_rising, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_2 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L10_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_trigger, __pyx_n_s_pressed, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1769, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L10_bool_binop_done:;
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1771
 *     elif trigger == 'rising' or trigger == 'pressed':
 *         # rising edge, will trigger once when pressed
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits and \             # <<<<<<<<<<<<<<
 *             (ptr_ctrl_prev.Touches & touch_bits) != touch_bits
 *     elif trigger == 'falling' or trigger == 'released':
 */
    __pyx_t_2 = (((__pyx_v_ptr_ctrl->Touches & __pyx_v_touch_bits) == __pyx_v_touch_bits) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L12_bool_binop_done;
    }

    /* "psychxr/ovr/capi.pyx":1772
 *         # rising edge, will trigger once when pressed
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits and \
 *             (ptr_ctrl_prev.Touches & touch_bits) != touch_bits             # <<<<<<<<<<<<<<
 *     elif trigger == 'falling' or trigger == 'released':
 *         # falling edge, will trigger once when released
 */
    __pyx_t_2 = (((__pyx_v_ptr_ctrl_prev->Touches & __pyx_v_touch_bits) != __pyx_v_touch_bits) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L12_bool_binop_done:;
    __pyx_v_touched = __pyx_t_1;

    /* "psychxr/ovr/capi.pyx":1769
 *     if trigger == 'continuous':
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits
 *     elif trigger == 'rising' or trigger == 'pressed':             # <<<<<<<<<<<<<<
 *         # rising edge, will trigger once when pressed
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits and \
 */
    goto __pyx_L9;
  }

  /* "psychxr/ovr/capi.pyx":1773
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits and \
 *             (ptr_ctrl_prev.Touches & touch_bits) != touch_bits
 *     elif trigger == 'falling' or trigger == 'released':             # <<<<<<<<<<<<<<
 *         # falling edge, will trigger once when released
 *         touched = (ptr_ctrl.Touches & touch_bits) != touch_bits and \
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_trigger, __pyx_n_s_falling, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __pyx_t_7 = (__pyx_t_2 != 0);
  if (!__pyx_t_7) {
  } else {
    __pyx_t_1 = __pyx_t_7;
    goto __pyx_L14_bool_binop_done;
  }
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_trigger, __pyx_n_s_released, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1773, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_7 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L14_bool_binop_done:;
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1775
 *     elif trigger == 'falling' or trigger == 'released':
 *         # falling edge, will trigger once when released
 *         touched = (ptr_ctrl.Touches & touch_bits) != touch_bits and \             # <<<<<<<<<<<<<<
 *             (ptr_ctrl_prev.Touches & touch_bits) == touch_bits
 *     else:
 */
    __pyx_t_2 = (((__pyx_v_ptr_ctrl->Touches & __pyx_v_touch_bits) != __pyx_v_touch_bits) != 0);
    if (__pyx_t_2) {
    } else {
      __pyx_t_1 = __pyx_t_2;
      goto __pyx_L16_bool_binop_done;
    }

    /* "psychxr/ovr/capi.pyx":1776
 *         # falling edge, will trigger once when released
 *         touched = (ptr_ctrl.Touches & touch_bits) != touch_bits and \
 *             (ptr_ctrl_prev.Touches & touch_bits) == touch_bits             # <<<<<<<<<<<<<<
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")
 */
    __pyx_t_2 = (((__pyx_v_ptr_ctrl_prev->Touches & __pyx_v_touch_bits) == __pyx_v_touch_bits) != 0);
    __pyx_t_1 = __pyx_t_2;
    __pyx_L16_bool_binop_done:;
    __pyx_v_touched = __pyx_t_1;

    /* "psychxr/ovr/capi.pyx":1773
 *         touched = (ptr_ctrl.Touches & touch_bits) == touch_bits and \
 *             (ptr_ctrl_prev.Touches & touch_bits) != touch_bits
 *     elif trigger == 'falling' or trigger == 'released':             # <<<<<<<<<<<<<<
 *         # falling edge, will trigger once when released
 *         touched = (ptr_ctrl.Touches & touch_bits) != touch_bits and \
 */
    goto __pyx_L9;
  }

  /* "psychxr/ovr/capi.pyx":1778
 *             (ptr_ctrl_prev.Touches & touch_bits) == touch_bits
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")             # <<<<<<<<<<<<<<
 * 
 *     return touched
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1778, __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, 1778, __pyx_L1_error)
  }
  __pyx_L9:;

  /* "psychxr/ovr/capi.pyx":1780
 *         raise ValueError("Invalid trigger mode specified.")
 * 
 *     return touched             # <<<<<<<<<<<<<<
 * 
 * # List of controller names that are available to the user. These are handled by
 */
  __pyx_r = __pyx_v_touched;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1717
 *     return pressed
 * 
 * cpdef bint getTouches(str controller, object touchNames, str trigger='continuous'):             # <<<<<<<<<<<<<<
 *     """Get touches for a specified device.
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_WriteUnraisable("psychxr.ovr.capi.getTouches", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_85getTouches(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_84getTouches[] = "Get touches for a specified device.\n    \n    Touches reveal information about the user's hand pose, for instance, whether \n    a pointing or pinching gesture is being made. Oculus Touch controllers are\n    required for this functionality.\n\n    Touch points to test are specified using their string names. Argument\n    'touch_names' accepts a single string or a list. If a list is specified,\n    the returned value will reflect whether all touches were triggered at the\n    time the controller was polled last. \n    \n    :param controller: str\n    :param touchNames: str, tuple or list\n    :param trigger: str\n    :return: boolean\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_85getTouches(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_controller = 0;
  PyObject *__pyx_v_touchNames = 0;
  PyObject *__pyx_v_trigger = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getTouches (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_controller,&__pyx_n_s_touchNames,&__pyx_n_s_trigger,0};
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject*)__pyx_n_s_continuous);
    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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_controller)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_touchNames)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("getTouches", 0, 2, 3, 1); __PYX_ERR(0, 1717, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_trigger);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getTouches") < 0)) __PYX_ERR(0, 1717, __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_controller = ((PyObject*)values[0]);
    __pyx_v_touchNames = values[1];
    __pyx_v_trigger = ((PyObject*)values[2]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getTouches", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1717, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.getTouches", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_controller), (&PyString_Type), 1, "controller", 1))) __PYX_ERR(0, 1717, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_trigger), (&PyString_Type), 1, "trigger", 1))) __PYX_ERR(0, 1717, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_84getTouches(__pyx_self, __pyx_v_controller, __pyx_v_touchNames, __pyx_v_trigger);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_84getTouches(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_controller, PyObject *__pyx_v_touchNames, PyObject *__pyx_v_trigger) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  struct __pyx_opt_args_7psychxr_3ovr_4capi_getTouches __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getTouches", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_2.__pyx_n = 1;
  __pyx_t_2.trigger = __pyx_v_trigger;
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getTouches(__pyx_v_controller, __pyx_v_touchNames, 0, &__pyx_t_2); 
  __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1717, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.getTouches", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1788
 * controller_names = ['xbox', 'remote', 'touch', 'left_touch', 'right_touch']
 * 
 * cpdef list getConnectedControllerTypes():             # <<<<<<<<<<<<<<
 *     """Get a list of currently connected controllers. You can check if a
 *     controller is attached by testing for its membership in the list using its
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_87getConnectedControllerTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getConnectedControllerTypes(CYTHON_UNUSED int __pyx_skip_dispatch) {
  unsigned int __pyx_v_result;
  PyObject *__pyx_v_ctrl_types = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("getConnectedControllerTypes", 0);

  /* "psychxr/ovr/capi.pyx":1796
 * 
 *     """
 *     cdef unsigned int result = ovr_capi.ovr_GetConnectedControllerTypes(             # <<<<<<<<<<<<<<
 *         _ptr_session_)
 * 
 */
  __pyx_v_result = ovr_GetConnectedControllerTypes(__pyx_v_7psychxr_3ovr_4capi__ptr_session_);

  /* "psychxr/ovr/capi.pyx":1799
 *         _ptr_session_)
 * 
 *     cdef list ctrl_types = list()             # <<<<<<<<<<<<<<
 *     if (result & ovr_capi.ovrControllerType_XBox) == \
 *             ovr_capi.ovrControllerType_XBox:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1799, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_ctrl_types = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1800
 * 
 *     cdef list ctrl_types = list()
 *     if (result & ovr_capi.ovrControllerType_XBox) == \             # <<<<<<<<<<<<<<
 *             ovr_capi.ovrControllerType_XBox:
 *         ctrl_types.append('xbox')
 */
  __pyx_t_2 = (((__pyx_v_result & ovrControllerType_XBox) == ovrControllerType_XBox) != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1802
 *     if (result & ovr_capi.ovrControllerType_XBox) == \
 *             ovr_capi.ovrControllerType_XBox:
 *         ctrl_types.append('xbox')             # <<<<<<<<<<<<<<
 *     elif (result & ovr_capi.ovrControllerType_Remote) == \
 *             ovr_capi.ovrControllerType_Remote:
 */
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_ctrl_types, __pyx_n_s_xbox); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1802, __pyx_L1_error)

    /* "psychxr/ovr/capi.pyx":1800
 * 
 *     cdef list ctrl_types = list()
 *     if (result & ovr_capi.ovrControllerType_XBox) == \             # <<<<<<<<<<<<<<
 *             ovr_capi.ovrControllerType_XBox:
 *         ctrl_types.append('xbox')
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1803
 *             ovr_capi.ovrControllerType_XBox:
 *         ctrl_types.append('xbox')
 *     elif (result & ovr_capi.ovrControllerType_Remote) == \             # <<<<<<<<<<<<<<
 *             ovr_capi.ovrControllerType_Remote:
 *         ctrl_types.append('remote')
 */
  __pyx_t_2 = (((__pyx_v_result & ovrControllerType_Remote) == ovrControllerType_Remote) != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1805
 *     elif (result & ovr_capi.ovrControllerType_Remote) == \
 *             ovr_capi.ovrControllerType_Remote:
 *         ctrl_types.append('remote')             # <<<<<<<<<<<<<<
 *     elif (result & ovr_capi.ovrControllerType_Touch) == \
 *             ovr_capi.ovrControllerType_Touch:
 */
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_ctrl_types, __pyx_n_s_remote); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1805, __pyx_L1_error)

    /* "psychxr/ovr/capi.pyx":1803
 *             ovr_capi.ovrControllerType_XBox:
 *         ctrl_types.append('xbox')
 *     elif (result & ovr_capi.ovrControllerType_Remote) == \             # <<<<<<<<<<<<<<
 *             ovr_capi.ovrControllerType_Remote:
 *         ctrl_types.append('remote')
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1806
 *             ovr_capi.ovrControllerType_Remote:
 *         ctrl_types.append('remote')
 *     elif (result & ovr_capi.ovrControllerType_Touch) == \             # <<<<<<<<<<<<<<
 *             ovr_capi.ovrControllerType_Touch:
 *         ctrl_types.append('touch')
 */
  __pyx_t_2 = (((__pyx_v_result & ovrControllerType_Touch) == ovrControllerType_Touch) != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1808
 *     elif (result & ovr_capi.ovrControllerType_Touch) == \
 *             ovr_capi.ovrControllerType_Touch:
 *         ctrl_types.append('touch')             # <<<<<<<<<<<<<<
 *     elif (result & ovr_capi.ovrControllerType_LTouch) == \
 *             ovr_capi.ovrControllerType_LTouch:
 */
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_ctrl_types, __pyx_n_s_touch); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1808, __pyx_L1_error)

    /* "psychxr/ovr/capi.pyx":1806
 *             ovr_capi.ovrControllerType_Remote:
 *         ctrl_types.append('remote')
 *     elif (result & ovr_capi.ovrControllerType_Touch) == \             # <<<<<<<<<<<<<<
 *             ovr_capi.ovrControllerType_Touch:
 *         ctrl_types.append('touch')
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1809
 *             ovr_capi.ovrControllerType_Touch:
 *         ctrl_types.append('touch')
 *     elif (result & ovr_capi.ovrControllerType_LTouch) == \             # <<<<<<<<<<<<<<
 *             ovr_capi.ovrControllerType_LTouch:
 *         ctrl_types.append('left_touch')
 */
  __pyx_t_2 = (((__pyx_v_result & ovrControllerType_LTouch) == ovrControllerType_LTouch) != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1811
 *     elif (result & ovr_capi.ovrControllerType_LTouch) == \
 *             ovr_capi.ovrControllerType_LTouch:
 *         ctrl_types.append('left_touch')             # <<<<<<<<<<<<<<
 *     elif (result & ovr_capi.ovrControllerType_RTouch) == \
 *             ovr_capi.ovrControllerType_RTouch:
 */
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_ctrl_types, __pyx_n_s_left_touch); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1811, __pyx_L1_error)

    /* "psychxr/ovr/capi.pyx":1809
 *             ovr_capi.ovrControllerType_Touch:
 *         ctrl_types.append('touch')
 *     elif (result & ovr_capi.ovrControllerType_LTouch) == \             # <<<<<<<<<<<<<<
 *             ovr_capi.ovrControllerType_LTouch:
 *         ctrl_types.append('left_touch')
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1812
 *             ovr_capi.ovrControllerType_LTouch:
 *         ctrl_types.append('left_touch')
 *     elif (result & ovr_capi.ovrControllerType_RTouch) == \             # <<<<<<<<<<<<<<
 *             ovr_capi.ovrControllerType_RTouch:
 *         ctrl_types.append('right_touch')
 */
  __pyx_t_2 = (((__pyx_v_result & ovrControllerType_RTouch) == ovrControllerType_RTouch) != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1814
 *     elif (result & ovr_capi.ovrControllerType_RTouch) == \
 *             ovr_capi.ovrControllerType_RTouch:
 *         ctrl_types.append('right_touch')             # <<<<<<<<<<<<<<
 * 
 *     return ctrl_types
 */
    __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_ctrl_types, __pyx_n_s_right_touch); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1814, __pyx_L1_error)

    /* "psychxr/ovr/capi.pyx":1812
 *             ovr_capi.ovrControllerType_LTouch:
 *         ctrl_types.append('left_touch')
 *     elif (result & ovr_capi.ovrControllerType_RTouch) == \             # <<<<<<<<<<<<<<
 *             ovr_capi.ovrControllerType_RTouch:
 *         ctrl_types.append('right_touch')
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1816
 *         ctrl_types.append('right_touch')
 * 
 *     return ctrl_types             # <<<<<<<<<<<<<<
 * 
 * # -------------------------------
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ctrl_types);
  __pyx_r = __pyx_v_ctrl_types;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1788
 * controller_names = ['xbox', 'remote', 'touch', 'left_touch', 'right_touch']
 * 
 * cpdef list getConnectedControllerTypes():             # <<<<<<<<<<<<<<
 *     """Get a list of currently connected controllers. You can check if a
 *     controller is attached by testing for its membership in the list using its
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.getConnectedControllerTypes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ctrl_types);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_87getConnectedControllerTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_86getConnectedControllerTypes[] = "Get a list of currently connected controllers. You can check if a\n    controller is attached by testing for its membership in the list using its\n    name.\n    \n    :return: list  \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_87getConnectedControllerTypes(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getConnectedControllerTypes (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_86getConnectedControllerTypes(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_86getConnectedControllerTypes(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getConnectedControllerTypes", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getConnectedControllerTypes(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1788, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1826
 *     cdef ovr_capi.ovrPerfStatsPerCompositorFrame  c_ovrPerfStatsPerCompositorFrame
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrPerfStatsPerCompositorFrame
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame___cinit__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static int __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/ovr/capi.pyx":1827
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.c_data = &self.c_ovrPerfStatsPerCompositorFrame             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __pyx_v_self->c_data = (&__pyx_v_self->c_ovrPerfStatsPerCompositorFrame);

  /* "psychxr/ovr/capi.pyx":1826
 *     cdef ovr_capi.ovrPerfStatsPerCompositorFrame  c_ovrPerfStatsPerCompositorFrame
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrPerfStatsPerCompositorFrame
 * 
 */

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

/* "psychxr/ovr/capi.pyx":1830
 * 
 *     @property
 *     def HmdVsyncIndex(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].HmdVsyncIndex
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13HmdVsyncIndex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13HmdVsyncIndex_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13HmdVsyncIndex___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13HmdVsyncIndex___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1831
 *     @property
 *     def HmdVsyncIndex(self):
 *         return self.c_data[0].HmdVsyncIndex             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->c_data[0]).HmdVsyncIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1830
 * 
 *     @property
 *     def HmdVsyncIndex(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].HmdVsyncIndex
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.HmdVsyncIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1834
 * 
 *     @property
 *     def AppFrameIndex(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].AppFrameIndex
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13AppFrameIndex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13AppFrameIndex_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13AppFrameIndex___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13AppFrameIndex___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1835
 *     @property
 *     def AppFrameIndex(self):
 *         return self.c_data[0].AppFrameIndex             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->c_data[0]).AppFrameIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1835, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1834
 * 
 *     @property
 *     def AppFrameIndex(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].AppFrameIndex
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.AppFrameIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1838
 * 
 *     @property
 *     def AppDroppedFrameCount(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].AppDroppedFrameCount
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20AppDroppedFrameCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20AppDroppedFrameCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20AppDroppedFrameCount___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20AppDroppedFrameCount___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1839
 *     @property
 *     def AppDroppedFrameCount(self):
 *         return self.c_data[0].AppDroppedFrameCount             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->c_data[0]).AppDroppedFrameCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1838
 * 
 *     @property
 *     def AppDroppedFrameCount(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].AppDroppedFrameCount
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.AppDroppedFrameCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1842
 * 
 *     @property
 *     def AppQueueAheadTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].AppQueueAheadTime
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppQueueAheadTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppQueueAheadTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppQueueAheadTime___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppQueueAheadTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1843
 *     @property
 *     def AppQueueAheadTime(self):
 *         return self.c_data[0].AppQueueAheadTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).AppQueueAheadTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1842
 * 
 *     @property
 *     def AppQueueAheadTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].AppQueueAheadTime
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.AppQueueAheadTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1846
 * 
 *     @property
 *     def AppCpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].AppCpuElapsedTime
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppCpuElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppCpuElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppCpuElapsedTime___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppCpuElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1847
 *     @property
 *     def AppCpuElapsedTime(self):
 *         return self.c_data[0].AppCpuElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).AppCpuElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1847, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1846
 * 
 *     @property
 *     def AppCpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].AppCpuElapsedTime
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.AppCpuElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1850
 * 
 *     @property
 *     def AppGpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].AppGpuElapsedTime
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppGpuElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppGpuElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppGpuElapsedTime___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppGpuElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1851
 *     @property
 *     def AppGpuElapsedTime(self):
 *         return self.c_data[0].AppGpuElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).AppGpuElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1851, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1850
 * 
 *     @property
 *     def AppGpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].AppGpuElapsedTime
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.AppGpuElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1854
 * 
 *     @property
 *     def CompositorFrameIndex(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorFrameIndex
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20CompositorFrameIndex_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20CompositorFrameIndex_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20CompositorFrameIndex___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20CompositorFrameIndex___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1855
 *     @property
 *     def CompositorFrameIndex(self):
 *         return self.c_data[0].CompositorFrameIndex             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->c_data[0]).CompositorFrameIndex); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1854
 * 
 *     @property
 *     def CompositorFrameIndex(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorFrameIndex
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.CompositorFrameIndex.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1858
 * 
 *     @property
 *     def CompositorLatency(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorLatency
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17CompositorLatency_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17CompositorLatency_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17CompositorLatency___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17CompositorLatency___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1859
 *     @property
 *     def CompositorLatency(self):
 *         return self.c_data[0].CompositorLatency             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).CompositorLatency); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1859, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1858
 * 
 *     @property
 *     def CompositorLatency(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorLatency
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.CompositorLatency.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1862
 * 
 *     @property
 *     def CompositorCpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorCpuElapsedTime
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorCpuElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorCpuElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorCpuElapsedTime___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorCpuElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1863
 *     @property
 *     def CompositorCpuElapsedTime(self):
 *         return self.c_data[0].CompositorCpuElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).CompositorCpuElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1863, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1862
 * 
 *     @property
 *     def CompositorCpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorCpuElapsedTime
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.CompositorCpuElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1866
 * 
 *     @property
 *     def CompositorGpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorGpuElapsedTime
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorGpuElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorGpuElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorGpuElapsedTime___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorGpuElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1867
 *     @property
 *     def CompositorGpuElapsedTime(self):
 *         return self.c_data[0].CompositorGpuElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).CompositorGpuElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1867, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1866
 * 
 *     @property
 *     def CompositorGpuElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorGpuElapsedTime
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.CompositorGpuElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1870
 * 
 *     @property
 *     def CompositorCpuStartToGpuEndElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorCpuStartToGpuEndElapsedTime
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_37CompositorCpuStartToGpuEndElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_37CompositorCpuStartToGpuEndElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_37CompositorCpuStartToGpuEndElapsedTime___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_37CompositorCpuStartToGpuEndElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1871
 *     @property
 *     def CompositorCpuStartToGpuEndElapsedTime(self):
 *         return self.c_data[0].CompositorCpuStartToGpuEndElapsedTime             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).CompositorCpuStartToGpuEndElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1870
 * 
 *     @property
 *     def CompositorCpuStartToGpuEndElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorCpuStartToGpuEndElapsedTime
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.CompositorCpuStartToGpuEndElapsedTime.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1874
 * 
 *     @property
 *     def CompositorGpuEndToVsyncElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorGpuEndToVsyncElapsedTime
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_34CompositorGpuEndToVsyncElapsedTime_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_34CompositorGpuEndToVsyncElapsedTime_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_34CompositorGpuEndToVsyncElapsedTime___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_34CompositorGpuEndToVsyncElapsedTime___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1875
 *     @property
 *     def CompositorGpuEndToVsyncElapsedTime(self):
 *         return self.c_data[0].CompositorGpuEndToVsyncElapsedTime             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->c_data[0]).CompositorGpuEndToVsyncElapsedTime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1875, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1874
 * 
 *     @property
 *     def CompositorGpuEndToVsyncElapsedTime(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].CompositorGpuEndToVsyncElapsedTime
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.CompositorGpuEndToVsyncElapsedTime.__get__", __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("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_3__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_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_2__reduce_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__28, 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("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.__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_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_5__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_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_4__setstate_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__29, 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("psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1883
 *     cdef list perf_stats
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrPerfStats
 * 
 */

/* Python wrapper */
static int __pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  CYTHON_UNUSED PyObject *__pyx_v_args = 0;
  CYTHON_UNUSED PyObject *__pyx_v_kwargs = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
  __Pyx_INCREF(__pyx_args);
  __pyx_v_args = __pyx_args;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats___cinit__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);

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

static int __pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats___cinit__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwargs) {
  int __pyx_v_i;
  int __pyx_v_N;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "psychxr/ovr/capi.pyx":1884
 * 
 *     def __cinit__(self, *args, **kwargs):
 *         self.c_data = &self.c_ovrPerfStats             # <<<<<<<<<<<<<<
 * 
 *         # initialize performance stats list
 */
  __pyx_v_self->c_data = (&__pyx_v_self->c_ovrPerfStats);

  /* "psychxr/ovr/capi.pyx":1887
 * 
 *         # initialize performance stats list
 *         self.perf_stats = list()             # <<<<<<<<<<<<<<
 *         cdef int i, N
 *         N = <int>ovr_capi.ovrMaxProvidedFrameStats
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1887, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_GOTREF(__pyx_v_self->perf_stats);
  __Pyx_DECREF(__pyx_v_self->perf_stats);
  __pyx_v_self->perf_stats = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1889
 *         self.perf_stats = list()
 *         cdef int i, N
 *         N = <int>ovr_capi.ovrMaxProvidedFrameStats             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             self.perf_stats.append(ovrPerfStatsPerCompositorFrame())
 */
  __pyx_v_N = ((int)ovrMaxProvidedFrameStats);

  /* "psychxr/ovr/capi.pyx":1890
 *         cdef int i, N
 *         N = <int>ovr_capi.ovrMaxProvidedFrameStats
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             self.perf_stats.append(ovrPerfStatsPerCompositorFrame())
 *             (<ovrPerfStatsPerCompositorFrame>self.perf_stats[i]).c_data[0] = \
 */
  __pyx_t_2 = __pyx_v_N;
  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
    __pyx_v_i = __pyx_t_3;

    /* "psychxr/ovr/capi.pyx":1891
 *         N = <int>ovr_capi.ovrMaxProvidedFrameStats
 *         for i in range(N):
 *             self.perf_stats.append(ovrPerfStatsPerCompositorFrame())             # <<<<<<<<<<<<<<
 *             (<ovrPerfStatsPerCompositorFrame>self.perf_stats[i]).c_data[0] = \
 *                 self.c_data[0].FrameStats[i]
 */
    if (unlikely(__pyx_v_self->perf_stats == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append");
      __PYX_ERR(0, 1891, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_self->perf_stats, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1891, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":1892
 *         for i in range(N):
 *             self.perf_stats.append(ovrPerfStatsPerCompositorFrame())
 *             (<ovrPerfStatsPerCompositorFrame>self.perf_stats[i]).c_data[0] = \             # <<<<<<<<<<<<<<
 *                 self.c_data[0].FrameStats[i]
 * 
 */
    if (unlikely(__pyx_v_self->perf_stats == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1892, __pyx_L1_error)
    }
    __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->perf_stats, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1892, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    (((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_t_1)->c_data[0]) = ((__pyx_v_self->c_data[0]).FrameStats[__pyx_v_i]);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "psychxr/ovr/capi.pyx":1883
 *     cdef list perf_stats
 * 
 *     def __cinit__(self, *args, **kwargs):             # <<<<<<<<<<<<<<
 *         self.c_data = &self.c_ovrPerfStats
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStats.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1896
 * 
 *     @property
 *     def FrameStatsCount(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].FrameStatsCount
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_15FrameStatsCount_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_15FrameStatsCount_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_15FrameStatsCount___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_15FrameStatsCount___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1897
 *     @property
 *     def FrameStatsCount(self):
 *         return self.c_data[0].FrameStatsCount             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->c_data[0]).FrameStatsCount); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1897, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1896
 * 
 *     @property
 *     def FrameStatsCount(self):             # <<<<<<<<<<<<<<
 *         return self.c_data[0].FrameStatsCount
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStats.FrameStatsCount.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1900
 * 
 *     @property
 *     def AnyFrameStatsDropped(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data[0].AnyFrameStatsDropped
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_20AnyFrameStatsDropped_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_20AnyFrameStatsDropped_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_20AnyFrameStatsDropped___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_20AnyFrameStatsDropped___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1901
 *     @property
 *     def AnyFrameStatsDropped(self):
 *         return <bint>self.c_data[0].AnyFrameStatsDropped             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_self->c_data[0]).AnyFrameStatsDropped != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1900
 * 
 *     @property
 *     def AnyFrameStatsDropped(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data[0].AnyFrameStatsDropped
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStats.AnyFrameStatsDropped.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1904
 * 
 *     @property
 *     def FrameStats(self):             # <<<<<<<<<<<<<<
 *         cdef int i, N
 *         N = self.c_data[0].FrameStatsCount
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_10FrameStats_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_10FrameStats_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_10FrameStats___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_10FrameStats___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self) {
  int __pyx_v_i;
  int __pyx_v_N;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1906
 *     def FrameStats(self):
 *         cdef int i, N
 *         N = self.c_data[0].FrameStatsCount             # <<<<<<<<<<<<<<
 *         for i in range(N):
 *             (<ovrPerfStatsPerCompositorFrame>self.perf_stats[i]).c_data[0] = \
 */
  __pyx_t_1 = (__pyx_v_self->c_data[0]).FrameStatsCount;
  __pyx_v_N = __pyx_t_1;

  /* "psychxr/ovr/capi.pyx":1907
 *         cdef int i, N
 *         N = self.c_data[0].FrameStatsCount
 *         for i in range(N):             # <<<<<<<<<<<<<<
 *             (<ovrPerfStatsPerCompositorFrame>self.perf_stats[i]).c_data[0] = \
 *                 self.c_data[0].FrameStats[i]
 */
  __pyx_t_1 = __pyx_v_N;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "psychxr/ovr/capi.pyx":1908
 *         N = self.c_data[0].FrameStatsCount
 *         for i in range(N):
 *             (<ovrPerfStatsPerCompositorFrame>self.perf_stats[i]).c_data[0] = \             # <<<<<<<<<<<<<<
 *                 self.c_data[0].FrameStats[i]
 * 
 */
    if (unlikely(__pyx_v_self->perf_stats == Py_None)) {
      PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
      __PYX_ERR(0, 1908, __pyx_L1_error)
    }
    __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->perf_stats, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1908, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    (((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame *)__pyx_t_3)->c_data[0]) = ((__pyx_v_self->c_data[0]).FrameStats[__pyx_v_i]);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }

  /* "psychxr/ovr/capi.pyx":1911
 *                 self.c_data[0].FrameStats[i]
 * 
 *         return self.perf_stats             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self->perf_stats);
  __pyx_r = __pyx_v_self->perf_stats;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1904
 * 
 *     @property
 *     def FrameStats(self):             # <<<<<<<<<<<<<<
 *         cdef int i, N
 *         N = self.c_data[0].FrameStatsCount
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStats.FrameStats.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1914
 * 
 *     @property
 *     def AdaptiveGpuPerformanceScale(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data[0].AdaptiveGpuPerformanceScale
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_27AdaptiveGpuPerformanceScale_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_27AdaptiveGpuPerformanceScale_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_27AdaptiveGpuPerformanceScale___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_27AdaptiveGpuPerformanceScale___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1915
 *     @property
 *     def AdaptiveGpuPerformanceScale(self):
 *         return <bint>self.c_data[0].AdaptiveGpuPerformanceScale             # <<<<<<<<<<<<<<
 * 
 *     @property
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_self->c_data[0]).AdaptiveGpuPerformanceScale != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1914
 * 
 *     @property
 *     def AdaptiveGpuPerformanceScale(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data[0].AdaptiveGpuPerformanceScale
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStats.AdaptiveGpuPerformanceScale.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1918
 * 
 *     @property
 *     def AswIsAvailable(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data[0].AswIsAvailable
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_14AswIsAvailable_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_14AswIsAvailable_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_14AswIsAvailable___get__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_14AswIsAvailable___get__(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "psychxr/ovr/capi.pyx":1919
 *     @property
 *     def AswIsAvailable(self):
 *         return <bint>self.c_data[0].AswIsAvailable             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(((__pyx_v_self->c_data[0]).AswIsAvailable != 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1919, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1918
 * 
 *     @property
 *     def AswIsAvailable(self):             # <<<<<<<<<<<<<<
 *         return <bint>self.c_data[0].AswIsAvailable
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("psychxr.ovr.capi.ovrPerfStats.AswIsAvailable.__get__", __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("no default __reduce__ due to non-trivial __cinit__")
 * def __setstate_cython__(self, __pyx_state):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_3__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_3__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_7psychxr_3ovr_4capi_12ovrPerfStats_2__reduce_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)__pyx_v_self));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__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("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("psychxr.ovr.capi.ovrPerfStats.__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_7psychxr_3ovr_4capi_12ovrPerfStats_5__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_5__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_7psychxr_3ovr_4capi_12ovrPerfStats_4__setstate_cython__(((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_12ovrPerfStats_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __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__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("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("psychxr.ovr.capi.ovrPerfStats.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "psychxr/ovr/capi.pyx":1922
 * 
 * 
 * cpdef ovrPerfStats getFrameStats():             # <<<<<<<<<<<<<<
 *     """Get most recent performance stats, returns an object with fields
 *     corresponding to various performance stats reported by the SDK.
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_89getFrameStats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_f_7psychxr_3ovr_4capi_getFrameStats(CYTHON_UNUSED int __pyx_skip_dispatch) {
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_v_to_return = 0;
  ovrResult __pyx_v_result;
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("getFrameStats", 0);

  /* "psychxr/ovr/capi.pyx":1931
 *     global _ptr_session_
 * 
 *     cdef ovrPerfStats to_return = ovrPerfStats()             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_GetPerfStats(
 *         _ptr_session_,
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_7psychxr_3ovr_4capi_ovrPerfStats), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_to_return = ((struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":1932
 * 
 *     cdef ovrPerfStats to_return = ovrPerfStats()
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_GetPerfStats(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         &(<ovrPerfStats>to_return).c_data[0])
 */
  __pyx_v_result = ovr_GetPerfStats(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (&(__pyx_v_to_return->c_data[0])));

  /* "psychxr/ovr/capi.pyx":1936
 *         &(<ovrPerfStats>to_return).c_data[0])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1936, __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, 1936, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1937
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 *     return to_return
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1937, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1937, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":1936
 *         &(<ovrPerfStats>to_return).c_data[0])
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":1939
 *         check_result(result)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * cpdef void resetFrameStats():
 */
  __Pyx_XDECREF(((PyObject *)__pyx_r));
  __Pyx_INCREF(((PyObject *)__pyx_v_to_return));
  __pyx_r = __pyx_v_to_return;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":1922
 * 
 * 
 * cpdef ovrPerfStats getFrameStats():             # <<<<<<<<<<<<<<
 *     """Get most recent performance stats, returns an object with fields
 *     corresponding to various performance stats reported by the SDK.
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("psychxr.ovr.capi.getFrameStats", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_to_return);
  __Pyx_XGIVEREF((PyObject *)__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_89getFrameStats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_88getFrameStats[] = "Get most recent performance stats, returns an object with fields\n    corresponding to various performance stats reported by the SDK.\n    \n    :return: dict \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_89getFrameStats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFrameStats (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_88getFrameStats(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_88getFrameStats(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getFrameStats", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)__pyx_f_7psychxr_3ovr_4capi_getFrameStats(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1922, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1941
 *     return to_return
 * 
 * cpdef void resetFrameStats():             # <<<<<<<<<<<<<<
 *     """Flushes backlog of frame stats.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_91resetFrameStats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_resetFrameStats(CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrResult __pyx_v_result;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("resetFrameStats", 0);

  /* "psychxr/ovr/capi.pyx":1948
 *     """
 *     global _ptr_session_
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_ResetPerfStats(             # <<<<<<<<<<<<<<
 *         _ptr_session_)
 * 
 */
  __pyx_v_result = ovr_ResetPerfStats(__pyx_v_7psychxr_3ovr_4capi__ptr_session_);

  /* "psychxr/ovr/capi.pyx":1951
 *         _ptr_session_)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1951, __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, 1951, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1952
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 * # List of available performance HUD modes.
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1952, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":1951
 *         _ptr_session_)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":1941
 *     return to_return
 * 
 * cpdef void resetFrameStats():             # <<<<<<<<<<<<<<
 *     """Flushes backlog of frame stats.
 * 
 */

  /* 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_WriteUnraisable("psychxr.ovr.capi.resetFrameStats", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_91resetFrameStats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_90resetFrameStats[] = "Flushes backlog of frame stats.\n    \n    :return: None \n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_91resetFrameStats(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("resetFrameStats (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_90resetFrameStats(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_90resetFrameStats(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("resetFrameStats", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_resetFrameStats(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1965
 *     'VersionInfo']
 * 
 * cpdef void perfHudMode(str mode='Off'):             # <<<<<<<<<<<<<<
 *     """Display a performance HUD with a specified mode.
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_93perfHudMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_perfHudMode(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_perfHudMode *__pyx_optional_args) {
  PyObject *__pyx_v_mode = ((PyObject*)__pyx_n_s_Off);
  int __pyx_v_perf_hud_mode;
  CYTHON_UNUSED ovrBool __pyx_v_ret;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("perfHudMode", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_mode = __pyx_optional_args->mode;
    }
  }

  /* "psychxr/ovr/capi.pyx":1973
 *     """
 *     global _ptr_session_
 *     cdef int perf_hud_mode = 0             # <<<<<<<<<<<<<<
 * 
 *     if mode == 'Off':
 */
  __pyx_v_perf_hud_mode = 0;

  /* "psychxr/ovr/capi.pyx":1975
 *     cdef int perf_hud_mode = 0
 * 
 *     if mode == 'Off':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_Off
 *     elif mode == 'PerfSummary':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_Off, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1975, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1976
 * 
 *     if mode == 'Off':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_Off             # <<<<<<<<<<<<<<
 *     elif mode == 'PerfSummary':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_PerfSummary
 */
    __pyx_v_perf_hud_mode = ((int)ovrPerfHud_Off);

    /* "psychxr/ovr/capi.pyx":1975
 *     cdef int perf_hud_mode = 0
 * 
 *     if mode == 'Off':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_Off
 *     elif mode == 'PerfSummary':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1977
 *     if mode == 'Off':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_Off
 *     elif mode == 'PerfSummary':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_PerfSummary
 *     elif mode == 'LatencyTiming':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_PerfSummary, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1977, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1978
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_Off
 *     elif mode == 'PerfSummary':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_PerfSummary             # <<<<<<<<<<<<<<
 *     elif mode == 'LatencyTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_LatencyTiming
 */
    __pyx_v_perf_hud_mode = ((int)ovrPerfHud_PerfSummary);

    /* "psychxr/ovr/capi.pyx":1977
 *     if mode == 'Off':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_Off
 *     elif mode == 'PerfSummary':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_PerfSummary
 *     elif mode == 'LatencyTiming':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1979
 *     elif mode == 'PerfSummary':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_PerfSummary
 *     elif mode == 'LatencyTiming':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_LatencyTiming
 *     elif mode == 'AppRenderTiming':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_LatencyTiming, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1979, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1980
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_PerfSummary
 *     elif mode == 'LatencyTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_LatencyTiming             # <<<<<<<<<<<<<<
 *     elif mode == 'AppRenderTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AppRenderTiming
 */
    __pyx_v_perf_hud_mode = ((int)ovrPerfHud_LatencyTiming);

    /* "psychxr/ovr/capi.pyx":1979
 *     elif mode == 'PerfSummary':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_PerfSummary
 *     elif mode == 'LatencyTiming':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_LatencyTiming
 *     elif mode == 'AppRenderTiming':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1981
 *     elif mode == 'LatencyTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_LatencyTiming
 *     elif mode == 'AppRenderTiming':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AppRenderTiming
 *     elif mode == 'CompRenderTiming':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_AppRenderTiming, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1981, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1982
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_LatencyTiming
 *     elif mode == 'AppRenderTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AppRenderTiming             # <<<<<<<<<<<<<<
 *     elif mode == 'CompRenderTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_CompRenderTiming
 */
    __pyx_v_perf_hud_mode = ((int)ovrPerfHud_AppRenderTiming);

    /* "psychxr/ovr/capi.pyx":1981
 *     elif mode == 'LatencyTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_LatencyTiming
 *     elif mode == 'AppRenderTiming':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AppRenderTiming
 *     elif mode == 'CompRenderTiming':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1983
 *     elif mode == 'AppRenderTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AppRenderTiming
 *     elif mode == 'CompRenderTiming':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_CompRenderTiming
 *     elif mode == 'AswStats':
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_CompRenderTiming, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1983, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1984
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AppRenderTiming
 *     elif mode == 'CompRenderTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_CompRenderTiming             # <<<<<<<<<<<<<<
 *     elif mode == 'AswStats':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AswStats
 */
    __pyx_v_perf_hud_mode = ((int)ovrPerfHud_CompRenderTiming);

    /* "psychxr/ovr/capi.pyx":1983
 *     elif mode == 'AppRenderTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AppRenderTiming
 *     elif mode == 'CompRenderTiming':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_CompRenderTiming
 *     elif mode == 'AswStats':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1985
 *     elif mode == 'CompRenderTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_CompRenderTiming
 *     elif mode == 'AswStats':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AswStats
 *     elif mode == 'VersionInfo':
 */
  __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_AswStats, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1985, __pyx_L1_error)
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "psychxr/ovr/capi.pyx":1986
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_CompRenderTiming
 *     elif mode == 'AswStats':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AswStats             # <<<<<<<<<<<<<<
 *     elif mode == 'VersionInfo':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_VersionInfo
 */
    __pyx_v_perf_hud_mode = ((int)ovrPerfHud_AswStats);

    /* "psychxr/ovr/capi.pyx":1985
 *     elif mode == 'CompRenderTiming':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_CompRenderTiming
 *     elif mode == 'AswStats':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AswStats
 *     elif mode == 'VersionInfo':
 */
    goto __pyx_L3;
  }

  /* "psychxr/ovr/capi.pyx":1987
 *     elif mode == 'AswStats':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AswStats
 *     elif mode == 'VersionInfo':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_VersionInfo
 * 
 */
  __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_VersionInfo, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1987, __pyx_L1_error)
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":1988
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AswStats
 *     elif mode == 'VersionInfo':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_VersionInfo             # <<<<<<<<<<<<<<
 * 
 *     cdef ovr_capi.ovrBool ret = ovr_capi.ovr_SetInt(
 */
    __pyx_v_perf_hud_mode = ((int)ovrPerfHud_VersionInfo);

    /* "psychxr/ovr/capi.pyx":1987
 *     elif mode == 'AswStats':
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_AswStats
 *     elif mode == 'VersionInfo':             # <<<<<<<<<<<<<<
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_VersionInfo
 * 
 */
  }
  __pyx_L3:;

  /* "psychxr/ovr/capi.pyx":1990
 *         perf_hud_mode = <int>ovr_capi.ovrPerfHud_VersionInfo
 * 
 *     cdef ovr_capi.ovrBool ret = ovr_capi.ovr_SetInt(             # <<<<<<<<<<<<<<
 *         _ptr_session_, b"PerfHudMode", perf_hud_mode)
 * 
 */
  __pyx_v_ret = ovr_SetInt(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ((char const *)"PerfHudMode"), __pyx_v_perf_hud_mode);

  /* "psychxr/ovr/capi.pyx":1965
 *     'VersionInfo']
 * 
 * cpdef void perfHudMode(str mode='Off'):             # <<<<<<<<<<<<<<
 *     """Display a performance HUD with a specified mode.
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("psychxr.ovr.capi.perfHudMode", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_93perfHudMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_7psychxr_3ovr_4capi_92perfHudMode[] = "Display a performance HUD with a specified mode.\n    \n    :param mode: str \n    :return: None\n    \n    ";
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_93perfHudMode(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("perfHudMode (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_mode,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject*)__pyx_n_s_Off);
    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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_mode);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "perfHudMode") < 0)) __PYX_ERR(0, 1965, __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_mode = ((PyObject*)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("perfHudMode", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1965, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.perfHudMode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mode), (&PyString_Type), 1, "mode", 1))) __PYX_ERR(0, 1965, __pyx_L1_error)
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_92perfHudMode(__pyx_self, __pyx_v_mode);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_92perfHudMode(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_mode) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  struct __pyx_opt_args_7psychxr_3ovr_4capi_perfHudMode __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("perfHudMode", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1.__pyx_n = 1;
  __pyx_t_1.mode = __pyx_v_mode;
  __pyx_f_7psychxr_3ovr_4capi_perfHudMode(0, &__pyx_t_1); 
  __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":1999
 * cdef ovr_capi.ovrBoundaryLookAndFeel _boundary_style_
 * 
 * cpdef void setBoundryColor(float r, float g, float b):             # <<<<<<<<<<<<<<
 *     global _ptr_session_, _boundary_style_
 * 
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_95setBoundryColor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_setBoundryColor(float __pyx_v_r, float __pyx_v_g, float __pyx_v_b, CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrColorf __pyx_v_color;
  ovrResult __pyx_v_result;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("setBoundryColor", 0);

  /* "psychxr/ovr/capi.pyx":2003
 * 
 *     cdef ovr_capi.ovrColorf color
 *     color.r = r             # <<<<<<<<<<<<<<
 *     color.g = g
 *     color.b = b
 */
  __pyx_v_color.r = __pyx_v_r;

  /* "psychxr/ovr/capi.pyx":2004
 *     cdef ovr_capi.ovrColorf color
 *     color.r = r
 *     color.g = g             # <<<<<<<<<<<<<<
 *     color.b = b
 * 
 */
  __pyx_v_color.g = __pyx_v_g;

  /* "psychxr/ovr/capi.pyx":2005
 *     color.r = r
 *     color.g = g
 *     color.b = b             # <<<<<<<<<<<<<<
 * 
 *     _boundary_style_.Color = color
 */
  __pyx_v_color.b = __pyx_v_b;

  /* "psychxr/ovr/capi.pyx":2007
 *     color.b = b
 * 
 *     _boundary_style_.Color = color             # <<<<<<<<<<<<<<
 * 
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_SetBoundaryLookAndFeel(
 */
  __pyx_v_7psychxr_3ovr_4capi__boundary_style_.Color = __pyx_v_color;

  /* "psychxr/ovr/capi.pyx":2009
 *     _boundary_style_.Color = color
 * 
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_SetBoundaryLookAndFeel(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         &_boundary_style_)
 */
  __pyx_v_result = ovr_SetBoundaryLookAndFeel(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (&__pyx_v_7psychxr_3ovr_4capi__boundary_style_));

  /* "psychxr/ovr/capi.pyx":2013
 *         &_boundary_style_)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2013, __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, 2013, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":2014
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 * cpdef void resetBoundryColor():
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2014, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2014, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2014, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":2013
 *         &_boundary_style_)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":1999
 * cdef ovr_capi.ovrBoundaryLookAndFeel _boundary_style_
 * 
 * cpdef void setBoundryColor(float r, float g, float b):             # <<<<<<<<<<<<<<
 *     global _ptr_session_, _boundary_style_
 * 
 */

  /* 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_WriteUnraisable("psychxr.ovr.capi.setBoundryColor", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_95setBoundryColor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_95setBoundryColor(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  float __pyx_v_r;
  float __pyx_v_g;
  float __pyx_v_b;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("setBoundryColor (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] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_r)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_g)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setBoundryColor", 1, 3, 3, 1); __PYX_ERR(0, 1999, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("setBoundryColor", 1, 3, 3, 2); __PYX_ERR(0, 1999, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setBoundryColor") < 0)) __PYX_ERR(0, 1999, __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_AsFloat(values[0]); if (unlikely((__pyx_v_r == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1999, __pyx_L3_error)
    __pyx_v_g = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_g == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1999, __pyx_L3_error)
    __pyx_v_b = __pyx_PyFloat_AsFloat(values[2]); if (unlikely((__pyx_v_b == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1999, __pyx_L3_error)
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("setBoundryColor", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1999, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.setBoundryColor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_94setBoundryColor(__pyx_self, __pyx_v_r, __pyx_v_g, __pyx_v_b);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_94setBoundryColor(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_r, float __pyx_v_g, float __pyx_v_b) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("setBoundryColor", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_setBoundryColor(__pyx_v_r, __pyx_v_g, __pyx_v_b, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1999, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":2016
 *         check_result(result)
 * 
 * cpdef void resetBoundryColor():             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_ResetBoundaryLookAndFeel(
 *         _ptr_session_)
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_97resetBoundryColor(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_resetBoundryColor(CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrResult __pyx_v_result;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("resetBoundryColor", 0);

  /* "psychxr/ovr/capi.pyx":2017
 * 
 * cpdef void resetBoundryColor():
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_ResetBoundaryLookAndFeel(             # <<<<<<<<<<<<<<
 *         _ptr_session_)
 * 
 */
  __pyx_v_result = ovr_ResetBoundaryLookAndFeel(__pyx_v_7psychxr_3ovr_4capi__ptr_session_);

  /* "psychxr/ovr/capi.pyx":2020
 *         _ptr_session_)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2020, __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, 2020, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":2021
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 * cpdef bint isBoundryVisible():
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2021, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2021, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2021, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2021, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2021, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2021, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":2020
 *         _ptr_session_)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":2016
 *         check_result(result)
 * 
 * cpdef void resetBoundryColor():             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_ResetBoundaryLookAndFeel(
 *         _ptr_session_)
 */

  /* 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_WriteUnraisable("psychxr.ovr.capi.resetBoundryColor", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_97resetBoundryColor(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_97resetBoundryColor(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("resetBoundryColor (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_96resetBoundryColor(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_96resetBoundryColor(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("resetBoundryColor", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_7psychxr_3ovr_4capi_resetBoundryColor(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2016, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":2023
 *         check_result(result)
 * 
 * cpdef bint isBoundryVisible():             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrBool is_visible
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_GetBoundaryVisible(
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_99isBoundryVisible(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static int __pyx_f_7psychxr_3ovr_4capi_isBoundryVisible(CYTHON_UNUSED int __pyx_skip_dispatch) {
  ovrBool __pyx_v_is_visible;
  ovrResult __pyx_v_result;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("isBoundryVisible", 0);

  /* "psychxr/ovr/capi.pyx":2025
 * cpdef bint isBoundryVisible():
 *     cdef ovr_capi.ovrBool is_visible
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_GetBoundaryVisible(             # <<<<<<<<<<<<<<
 *         _ptr_session_, &is_visible)
 * 
 */
  __pyx_v_result = ovr_GetBoundaryVisible(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, (&__pyx_v_is_visible));

  /* "psychxr/ovr/capi.pyx":2028
 *         _ptr_session_, &is_visible)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2028, __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, 2028, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":2029
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 *     return <bint>is_visible
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2029, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2029, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2029, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2029, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2029, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2029, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":2028
 *         _ptr_session_, &is_visible)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":2031
 *         check_result(result)
 * 
 *     return <bint>is_visible             # <<<<<<<<<<<<<<
 * 
 * cpdef void showBoundry(bint show=True):
 */
  __pyx_r = (__pyx_v_is_visible != 0);
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":2023
 *         check_result(result)
 * 
 * cpdef bint isBoundryVisible():             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrBool is_visible
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_GetBoundaryVisible(
 */

  /* 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_XDECREF(__pyx_t_6);
  __Pyx_WriteUnraisable("psychxr.ovr.capi.isBoundryVisible", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_99isBoundryVisible(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_99isBoundryVisible(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("isBoundryVisible (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_98isBoundryVisible(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_98isBoundryVisible(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("isBoundryVisible", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_7psychxr_3ovr_4capi_isBoundryVisible(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2023, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":2033
 *     return <bint>is_visible
 * 
 * cpdef void showBoundry(bint show=True):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_RequestBoundaryVisible(
 *         _ptr_session_, <ovr_capi.ovrBool>show)
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_101showBoundry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static void __pyx_f_7psychxr_3ovr_4capi_showBoundry(CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_7psychxr_3ovr_4capi_showBoundry *__pyx_optional_args) {
  int __pyx_v_show = ((int)1);
  ovrResult __pyx_v_result;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  __Pyx_RefNannySetupContext("showBoundry", 0);
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_show = __pyx_optional_args->show;
    }
  }

  /* "psychxr/ovr/capi.pyx":2034
 * 
 * cpdef void showBoundry(bint show=True):
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_RequestBoundaryVisible(             # <<<<<<<<<<<<<<
 *         _ptr_session_, <ovr_capi.ovrBool>show)
 * 
 */
  __pyx_v_result = ovr_RequestBoundaryVisible(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ((ovrBool)__pyx_v_show));

  /* "psychxr/ovr/capi.pyx":2037
 *         _ptr_session_, <ovr_capi.ovrBool>show)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_debug_mode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2037, __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, 2037, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "psychxr/ovr/capi.pyx":2038
 * 
 *     if debug_mode:
 *         check_result(result)             # <<<<<<<<<<<<<<
 * 
 * # -----------------------
 */
    __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_check_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2038, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __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);
      }
    }
    if (!__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2038, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_GOTREF(__pyx_t_1);
    } else {
      #if CYTHON_FAST_PYCALL
      if (PyFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2038, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      #if CYTHON_FAST_PYCCALL
      if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
        PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2038, __pyx_L1_error)
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else
      #endif
      {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2038, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_4);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
        __pyx_t_4 = 0;
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2038, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "psychxr/ovr/capi.pyx":2037
 *         _ptr_session_, <ovr_capi.ovrBool>show)
 * 
 *     if debug_mode:             # <<<<<<<<<<<<<<
 *         check_result(result)
 * 
 */
  }

  /* "psychxr/ovr/capi.pyx":2033
 *     return <bint>is_visible
 * 
 * cpdef void showBoundry(bint show=True):             # <<<<<<<<<<<<<<
 *     cdef ovr_capi.ovrResult result = ovr_capi.ovr_RequestBoundaryVisible(
 *         _ptr_session_, <ovr_capi.ovrBool>show)
 */

  /* 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_WriteUnraisable("psychxr.ovr.capi.showBoundry", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_101showBoundry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_101showBoundry(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_show;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("showBoundry (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_show,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 = PyDict_GetItem(__pyx_kwds, __pyx_n_s_show);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "showBoundry") < 0)) __PYX_ERR(0, 2033, __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_show = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_show == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2033, __pyx_L3_error)
    } else {
      __pyx_v_show = ((int)1);
    }
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("showBoundry", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2033, __pyx_L3_error)
  __pyx_L3_error:;
  __Pyx_AddTraceback("psychxr.ovr.capi.showBoundry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_100showBoundry(__pyx_self, __pyx_v_show);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_100showBoundry(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_show) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  struct __pyx_opt_args_7psychxr_3ovr_4capi_showBoundry __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  __Pyx_RefNannySetupContext("showBoundry", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1.__pyx_n = 1;
  __pyx_t_1.show = __pyx_v_show;
  __pyx_f_7psychxr_3ovr_4capi_showBoundry(0, &__pyx_t_1); 
  __pyx_t_2 = __Pyx_void_to_None(NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":2044
 * # -----------------------
 * #
 * cpdef float getPlayerHeight():             # <<<<<<<<<<<<<<
 *     global _ptr_session_
 *     cdef float to_return  = ovr_capi.ovr_GetFloat(
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_103getPlayerHeight(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static float __pyx_f_7psychxr_3ovr_4capi_getPlayerHeight(CYTHON_UNUSED int __pyx_skip_dispatch) {
  float __pyx_v_to_return;
  float __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPlayerHeight", 0);

  /* "psychxr/ovr/capi.pyx":2046
 * cpdef float getPlayerHeight():
 *     global _ptr_session_
 *     cdef float to_return  = ovr_capi.ovr_GetFloat(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         b"PlayerHeight",
 */
  __pyx_v_to_return = ovr_GetFloat(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ((char const *)"PlayerHeight"), ((float)1.778));

  /* "psychxr/ovr/capi.pyx":2051
 *         <float>1.778)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * cpdef float getEyeHeight():
 */
  __pyx_r = __pyx_v_to_return;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":2044
 * # -----------------------
 * #
 * cpdef float getPlayerHeight():             # <<<<<<<<<<<<<<
 *     global _ptr_session_
 *     cdef float to_return  = ovr_capi.ovr_GetFloat(
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_103getPlayerHeight(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_103getPlayerHeight(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getPlayerHeight (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_102getPlayerHeight(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_102getPlayerHeight(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getPlayerHeight", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_7psychxr_3ovr_4capi_getPlayerHeight(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2044, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":2053
 *     return to_return
 * 
 * cpdef float getEyeHeight():             # <<<<<<<<<<<<<<
 *     global _ptr_session_
 *     cdef float to_return  = ovr_capi.ovr_GetFloat(
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_105getEyeHeight(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static float __pyx_f_7psychxr_3ovr_4capi_getEyeHeight(CYTHON_UNUSED int __pyx_skip_dispatch) {
  float __pyx_v_to_return;
  float __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeHeight", 0);

  /* "psychxr/ovr/capi.pyx":2055
 * cpdef float getEyeHeight():
 *     global _ptr_session_
 *     cdef float to_return  = ovr_capi.ovr_GetFloat(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         b"EyeHeight",
 */
  __pyx_v_to_return = ovr_GetFloat(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ((char const *)"EyeHeight"), ((float)1.675));

  /* "psychxr/ovr/capi.pyx":2060
 *         <float>1.675)
 * 
 *     return to_return             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple getNeckEyeDistance():
 */
  __pyx_r = __pyx_v_to_return;
  goto __pyx_L0;

  /* "psychxr/ovr/capi.pyx":2053
 *     return to_return
 * 
 * cpdef float getEyeHeight():             # <<<<<<<<<<<<<<
 *     global _ptr_session_
 *     cdef float to_return  = ovr_capi.ovr_GetFloat(
 */

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

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_105getEyeHeight(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_105getEyeHeight(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeHeight (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_104getEyeHeight(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_104getEyeHeight(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getEyeHeight", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(__pyx_f_7psychxr_3ovr_4capi_getEyeHeight(0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":2062
 *     return to_return
 * 
 * cpdef tuple getNeckEyeDistance():             # <<<<<<<<<<<<<<
 *     global _ptr_session_
 *     cdef float vals[2]
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_107getNeckEyeDistance(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getNeckEyeDistance(CYTHON_UNUSED int __pyx_skip_dispatch) {
  float __pyx_v_vals[2];
  CYTHON_UNUSED unsigned int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getNeckEyeDistance", 0);

  /* "psychxr/ovr/capi.pyx":2066
 *     cdef float vals[2]
 * 
 *     cdef unsigned int ret  = ovr_capi.ovr_GetFloatArray(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         b"NeckEyeDistance",
 */
  __pyx_v_ret = ovr_GetFloatArray(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ((char const *)"NeckEyeDistance"), __pyx_v_vals, ((unsigned int)2));

  /* "psychxr/ovr/capi.pyx":2072
 *         <unsigned int>2)
 * 
 *     return <float>vals[0], <float>vals[1]             # <<<<<<<<<<<<<<
 * 
 * cpdef tuple getEyeToNoseDist():
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((float)(__pyx_v_vals[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(((float)(__pyx_v_vals[1]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2072, __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;

  /* "psychxr/ovr/capi.pyx":2062
 *     return to_return
 * 
 * cpdef tuple getNeckEyeDistance():             # <<<<<<<<<<<<<<
 *     global _ptr_session_
 *     cdef float vals[2]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.getNeckEyeDistance", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_107getNeckEyeDistance(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_107getNeckEyeDistance(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getNeckEyeDistance (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_106getNeckEyeDistance(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_106getNeckEyeDistance(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getNeckEyeDistance", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getNeckEyeDistance(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2062, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "psychxr/ovr/capi.pyx":2074
 *     return <float>vals[0], <float>vals[1]
 * 
 * cpdef tuple getEyeToNoseDist():             # <<<<<<<<<<<<<<
 *     global _ptr_session_
 *     cdef float vals[2]
 */

static PyObject *__pyx_pw_7psychxr_3ovr_4capi_109getEyeToNoseDist(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_7psychxr_3ovr_4capi_getEyeToNoseDist(CYTHON_UNUSED int __pyx_skip_dispatch) {
  float __pyx_v_vals[2];
  CYTHON_UNUSED unsigned int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  __Pyx_RefNannySetupContext("getEyeToNoseDist", 0);

  /* "psychxr/ovr/capi.pyx":2078
 *     cdef float vals[2]
 * 
 *     cdef unsigned int ret  = ovr_capi.ovr_GetFloatArray(             # <<<<<<<<<<<<<<
 *         _ptr_session_,
 *         b"EyeToNoseDist",
 */
  __pyx_v_ret = ovr_GetFloatArray(__pyx_v_7psychxr_3ovr_4capi__ptr_session_, ((char const *)"EyeToNoseDist"), __pyx_v_vals, ((unsigned int)2));

  /* "psychxr/ovr/capi.pyx":2084
 *         <unsigned int>2)
 * 
 *     return <float>vals[0], <float>vals[1]             # <<<<<<<<<<<<<<
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble(((float)(__pyx_v_vals[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyFloat_FromDouble(((float)(__pyx_v_vals[1]))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2084, __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;

  /* "psychxr/ovr/capi.pyx":2074
 *     return <float>vals[0], <float>vals[1]
 * 
 * cpdef tuple getEyeToNoseDist():             # <<<<<<<<<<<<<<
 *     global _ptr_session_
 *     cdef float vals[2]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("psychxr.ovr.capi.getEyeToNoseDist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_109getEyeToNoseDist(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_7psychxr_3ovr_4capi_109getEyeToNoseDist(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getEyeToNoseDist (wrapper)", 0);
  __pyx_r = __pyx_pf_7psychxr_3ovr_4capi_108getEyeToNoseDist(__pyx_self);

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

static PyObject *__pyx_pf_7psychxr_3ovr_4capi_108getEyeToNoseDist(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  __Pyx_RefNannySetupContext("getEyeToNoseDist", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_7psychxr_3ovr_4capi_getEyeToNoseDist(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

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

/* "ovr_errorcode.pxd":120
 *         char[512] ErrorString
 * 
 * cdef inline int OVR_SUCCESS(ovrResult result):             # <<<<<<<<<<<<<<
 *     return result >= ovrSuccessType.ovrSuccess
 * 
 */

static CYTHON_INLINE int __pyx_f_7psychxr_3ovr_13ovr_errorcode_OVR_SUCCESS(ovrResult __pyx_v_result) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("OVR_SUCCESS", 0);

  /* "ovr_errorcode.pxd":121
 * 
 * cdef inline int OVR_SUCCESS(ovrResult result):
 *     return result >= ovrSuccessType.ovrSuccess             # <<<<<<<<<<<<<<
 * 
 * cdef inline int OVR_UNQUALIFIED_SUCCESS(ovrResult result):
 */
  __pyx_r = (__pyx_v_result >= ovrSuccess);
  goto __pyx_L0;

  /* "ovr_errorcode.pxd":120
 *         char[512] ErrorString
 * 
 * cdef inline int OVR_SUCCESS(ovrResult result):             # <<<<<<<<<<<<<<
 *     return result >= ovrSuccessType.ovrSuccess
 * 
 */

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

/* "ovr_errorcode.pxd":123
 *     return result >= ovrSuccessType.ovrSuccess
 * 
 * cdef inline int OVR_UNQUALIFIED_SUCCESS(ovrResult result):             # <<<<<<<<<<<<<<
 *     return result == ovrSuccessType.ovrSuccess
 * 
 */

static CYTHON_INLINE int __pyx_f_7psychxr_3ovr_13ovr_errorcode_OVR_UNQUALIFIED_SUCCESS(ovrResult __pyx_v_result) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("OVR_UNQUALIFIED_SUCCESS", 0);

  /* "ovr_errorcode.pxd":124
 * 
 * cdef inline int OVR_UNQUALIFIED_SUCCESS(ovrResult result):
 *     return result == ovrSuccessType.ovrSuccess             # <<<<<<<<<<<<<<
 * 
 * cdef inline int OVR_FAILURE(ovrResult result):
 */
  __pyx_r = (__pyx_v_result == ovrSuccess);
  goto __pyx_L0;

  /* "ovr_errorcode.pxd":123
 *     return result >= ovrSuccessType.ovrSuccess
 * 
 * cdef inline int OVR_UNQUALIFIED_SUCCESS(ovrResult result):             # <<<<<<<<<<<<<<
 *     return result == ovrSuccessType.ovrSuccess
 * 
 */

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

/* "ovr_errorcode.pxd":126
 *     return result == ovrSuccessType.ovrSuccess
 * 
 * cdef inline int OVR_FAILURE(ovrResult result):             # <<<<<<<<<<<<<<
 *     return not OVR_SUCCESS(result)
 */

static CYTHON_INLINE int __pyx_f_7psychxr_3ovr_13ovr_errorcode_OVR_FAILURE(ovrResult __pyx_v_result) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("OVR_FAILURE", 0);

  /* "ovr_errorcode.pxd":127
 * 
 * cdef inline int OVR_FAILURE(ovrResult result):
 *     return not OVR_SUCCESS(result)             # <<<<<<<<<<<<<<
 */
  __pyx_r = (!(__pyx_f_7psychxr_3ovr_13ovr_errorcode_OVR_SUCCESS(__pyx_v_result) != 0));
  goto __pyx_L0;

  /* "ovr_errorcode.pxd":126
 *     return result == ovrSuccessType.ovrSuccess
 * 
 * cdef inline int OVR_FAILURE(ovrResult result):             # <<<<<<<<<<<<<<
 *     return not OVR_SUCCESS(result)
 */

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

static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrColorf(PyTypeObject *t, PyObject *a, 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_7psychxr_3ovr_4capi_9ovrColorf_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrColorf(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_7psychxr_3ovr_4capi_9ovrColorf_r(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1r_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_9ovrColorf_g(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1g_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_9ovrColorf_b(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1b_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_9ovrColorf_a(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_1a_1__get__(o);
}

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

static PyMethodDef __pyx_methods_7psychxr_3ovr_4capi_ovrColorf[] = {
  {"as_tuple", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_3as_tuple, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_5__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_9ovrColorf_7__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_3ovr_4capi_ovrColorf[] = {
  {(char *)"r", __pyx_getprop_7psychxr_3ovr_4capi_9ovrColorf_r, __pyx_setprop_7psychxr_3ovr_4capi_9ovrColorf_r, (char *)0, 0},
  {(char *)"g", __pyx_getprop_7psychxr_3ovr_4capi_9ovrColorf_g, __pyx_setprop_7psychxr_3ovr_4capi_9ovrColorf_g, (char *)0, 0},
  {(char *)"b", __pyx_getprop_7psychxr_3ovr_4capi_9ovrColorf_b, __pyx_setprop_7psychxr_3ovr_4capi_9ovrColorf_b, (char *)0, 0},
  {(char *)"a", __pyx_getprop_7psychxr_3ovr_4capi_9ovrColorf_a, __pyx_setprop_7psychxr_3ovr_4capi_9ovrColorf_a, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_3ovr_4capi_ovrColorf = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.ovr.capi.ovrColorf", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_3ovr_4capi_ovrColorf), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrColorf, /*tp_dealloc*/
  0, /*tp_print*/
  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_7psychxr_3ovr_4capi_ovrColorf, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_3ovr_4capi_ovrColorf, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_3ovr_4capi_ovrColorf, /*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
};

static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrHmdDesc(PyTypeObject *t, PyObject *a, 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_7psychxr_3ovr_4capi_10ovrHmdDesc_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrHmdDesc(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_7psychxr_3ovr_4capi_10ovrHmdDesc_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_4type_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_ProductName(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_11ProductName_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_Manufacturer(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_12Manufacturer_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_VendorId(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_8VendorId_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_ProductId(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_9ProductId_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_SerialNumber(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_12SerialNumber_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_FirmwareMajor(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMajor_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_FirmwareMinor(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_13FirmwareMinor_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_AvailableHmdCaps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_16AvailableHmdCaps_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_DefaultHmdCaps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_14DefaultHmdCaps_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_AvailableTrackingCaps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_21AvailableTrackingCaps_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_DefaultTrackingCaps(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_19DefaultTrackingCaps_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_DefaultEyeFov(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_13DefaultEyeFov_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_MaxEyeFov(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_9MaxEyeFov_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_Resolution(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_10Resolution_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_DisplayRefreshRate(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_18DisplayRefreshRate_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_3ovr_4capi_ovrHmdDesc[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_10ovrHmdDesc_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_3ovr_4capi_ovrHmdDesc[] = {
  {(char *)"type", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_type, 0, (char *)0, 0},
  {(char *)"ProductName", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_ProductName, 0, (char *)0, 0},
  {(char *)"Manufacturer", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_Manufacturer, 0, (char *)0, 0},
  {(char *)"VendorId", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_VendorId, 0, (char *)0, 0},
  {(char *)"ProductId", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_ProductId, 0, (char *)0, 0},
  {(char *)"SerialNumber", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_SerialNumber, 0, (char *)0, 0},
  {(char *)"FirmwareMajor", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_FirmwareMajor, 0, (char *)0, 0},
  {(char *)"FirmwareMinor", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_FirmwareMinor, 0, (char *)0, 0},
  {(char *)"AvailableHmdCaps", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_AvailableHmdCaps, 0, (char *)0, 0},
  {(char *)"DefaultHmdCaps", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_DefaultHmdCaps, 0, (char *)0, 0},
  {(char *)"AvailableTrackingCaps", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_AvailableTrackingCaps, 0, (char *)0, 0},
  {(char *)"DefaultTrackingCaps", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_DefaultTrackingCaps, 0, (char *)0, 0},
  {(char *)"DefaultEyeFov", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_DefaultEyeFov, 0, (char *)0, 0},
  {(char *)"MaxEyeFov", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_MaxEyeFov, 0, (char *)0, 0},
  {(char *)"Resolution", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_Resolution, 0, (char *)0, 0},
  {(char *)"DisplayRefreshRate", __pyx_getprop_7psychxr_3ovr_4capi_10ovrHmdDesc_DisplayRefreshRate, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_3ovr_4capi_ovrHmdDesc = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.ovr.capi.ovrHmdDesc", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_3ovr_4capi_ovrHmdDesc), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrHmdDesc, /*tp_dealloc*/
  0, /*tp_print*/
  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_7psychxr_3ovr_4capi_ovrHmdDesc, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_3ovr_4capi_ovrHmdDesc, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_3ovr_4capi_ovrHmdDesc, /*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
};

static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc(PyTypeObject *t, PyObject *a, 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_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc(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_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_4Type_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Format_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_ArraySize(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9ArraySize_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5Width_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_6Height_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_MipLevels(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_9MipLevels_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_SampleCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11SampleCount_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_StaticImage(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_11StaticImage_1__get__(o);
}

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

static PyMethodDef __pyx_methods_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc[] = {
  {(char *)"Type", __pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Type, __pyx_setprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Type, (char *)0, 0},
  {(char *)"Format", __pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Format, __pyx_setprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Format, (char *)0, 0},
  {(char *)"ArraySize", __pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_ArraySize, __pyx_setprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_ArraySize, (char *)0, 0},
  {(char *)"Width", __pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Width, __pyx_setprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Width, (char *)0, 0},
  {(char *)"Height", __pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Height, __pyx_setprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_Height, (char *)0, 0},
  {(char *)"MipLevels", __pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_MipLevels, __pyx_setprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_MipLevels, (char *)0, 0},
  {(char *)"SampleCount", __pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_SampleCount, __pyx_setprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_SampleCount, (char *)0, 0},
  {(char *)"StaticImage", __pyx_getprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_StaticImage, __pyx_setprop_7psychxr_3ovr_4capi_23ovrTextureSwapChainDesc_StaticImage, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.ovr.capi.ovrTextureSwapChainDesc", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc, /*tp_dealloc*/
  0, /*tp_print*/
  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*/
  "ovrTextureSwapChainDesc\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc, /*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
};

static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrPoseStatef(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *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_7psychxr_3ovr_4capi_ovrPoseStatef *)o);
  p->field_the_pose = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *)Py_None); Py_INCREF(Py_None);
  p->field_angular_velocity = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)Py_None); Py_INCREF(Py_None);
  p->field_linear_velocity = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)Py_None); Py_INCREF(Py_None);
  p->field_angular_acceleration = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)Py_None); Py_INCREF(Py_None);
  p->field_linear_acceleration = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrPoseStatef(PyObject *o) {
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *p = (struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)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->field_the_pose);
  Py_CLEAR(p->field_angular_velocity);
  Py_CLEAR(p->field_linear_velocity);
  Py_CLEAR(p->field_angular_acceleration);
  Py_CLEAR(p->field_linear_acceleration);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_7psychxr_3ovr_4capi_ovrPoseStatef(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *p = (struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)o;
  if (p->field_the_pose) {
    e = (*v)(((PyObject *)p->field_the_pose), a); if (e) return e;
  }
  if (p->field_angular_velocity) {
    e = (*v)(((PyObject *)p->field_angular_velocity), a); if (e) return e;
  }
  if (p->field_linear_velocity) {
    e = (*v)(((PyObject *)p->field_linear_velocity), a); if (e) return e;
  }
  if (p->field_angular_acceleration) {
    e = (*v)(((PyObject *)p->field_angular_acceleration), a); if (e) return e;
  }
  if (p->field_linear_acceleration) {
    e = (*v)(((PyObject *)p->field_linear_acceleration), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7psychxr_3ovr_4capi_ovrPoseStatef(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *p = (struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef *)o;
  tmp = ((PyObject*)p->field_the_pose);
  p->field_the_pose = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->field_angular_velocity);
  p->field_angular_velocity = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->field_linear_velocity);
  p->field_linear_velocity = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->field_angular_acceleration);
  p->field_angular_acceleration = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->field_linear_acceleration);
  p->field_linear_acceleration = ((struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_ThePose(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_7ThePose_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_AngularVelocity(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_15AngularVelocity_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_LinearVelocity(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_14LinearVelocity_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_AngularAcceleration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_19AngularAcceleration_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_LinearAcceleration(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_18LinearAcceleration_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_TimeInSeconds(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_13TimeInSeconds_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_3ovr_4capi_ovrPoseStatef[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_13ovrPoseStatef_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_3ovr_4capi_ovrPoseStatef[] = {
  {(char *)"ThePose", __pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_ThePose, 0, (char *)0, 0},
  {(char *)"AngularVelocity", __pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_AngularVelocity, 0, (char *)0, 0},
  {(char *)"LinearVelocity", __pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_LinearVelocity, 0, (char *)0, 0},
  {(char *)"AngularAcceleration", __pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_AngularAcceleration, 0, (char *)0, 0},
  {(char *)"LinearAcceleration", __pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_LinearAcceleration, 0, (char *)0, 0},
  {(char *)"TimeInSeconds", __pyx_getprop_7psychxr_3ovr_4capi_13ovrPoseStatef_TimeInSeconds, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_3ovr_4capi_ovrPoseStatef = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.ovr.capi.ovrPoseStatef", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPoseStatef), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrPoseStatef, /*tp_dealloc*/
  0, /*tp_print*/
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  "Pose state data.\n\n    ", /*tp_doc*/
  __pyx_tp_traverse_7psychxr_3ovr_4capi_ovrPoseStatef, /*tp_traverse*/
  __pyx_tp_clear_7psychxr_3ovr_4capi_ovrPoseStatef, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_3ovr_4capi_ovrPoseStatef, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_3ovr_4capi_ovrPoseStatef, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_3ovr_4capi_ovrPoseStatef, /*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
};

static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_TrackingStateData(PyTypeObject *t, PyObject *a, 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_7psychxr_3ovr_4capi_17TrackingStateData_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_3ovr_4capi_TrackingStateData(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_7psychxr_3ovr_4capi_17TrackingStateData_HeadPose(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_8HeadPose_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_17TrackingStateData_StatusFlags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_11StatusFlags_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_17TrackingStateData_HandPoses(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_9HandPoses_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_17TrackingStateData_HandStatusFlags(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_15HandStatusFlags_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_3ovr_4capi_TrackingStateData[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_17TrackingStateData_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_3ovr_4capi_TrackingStateData[] = {
  {(char *)"HeadPose", __pyx_getprop_7psychxr_3ovr_4capi_17TrackingStateData_HeadPose, 0, (char *)0, 0},
  {(char *)"StatusFlags", __pyx_getprop_7psychxr_3ovr_4capi_17TrackingStateData_StatusFlags, 0, (char *)0, 0},
  {(char *)"HandPoses", __pyx_getprop_7psychxr_3ovr_4capi_17TrackingStateData_HandPoses, 0, (char *)0, 0},
  {(char *)"HandStatusFlags", __pyx_getprop_7psychxr_3ovr_4capi_17TrackingStateData_HandStatusFlags, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_3ovr_4capi_TrackingStateData = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.ovr.capi.TrackingStateData", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_3ovr_4capi_TrackingStateData), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_3ovr_4capi_TrackingStateData, /*tp_dealloc*/
  0, /*tp_print*/
  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*/
  "Structure which stores tracking state information. All attributes are\n    read-only, returning a copy of the data in the accessed field.\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_3ovr_4capi_TrackingStateData, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_3ovr_4capi_TrackingStateData, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_3ovr_4capi_TrackingStateData, /*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
};

static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrMirrorTextureDesc(PyTypeObject *t, PyObject *a, 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_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrMirrorTextureDesc(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_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_Format(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Format_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_Width(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5Width_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_Height(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_6Height_1__get__(o);
}

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

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_MirrorOptions(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_13MirrorOptions_1__get__(o);
}

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

static PyMethodDef __pyx_methods_7psychxr_3ovr_4capi_ovrMirrorTextureDesc[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_3ovr_4capi_ovrMirrorTextureDesc[] = {
  {(char *)"Format", __pyx_getprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_Format, __pyx_setprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_Format, (char *)0, 0},
  {(char *)"Width", __pyx_getprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_Width, __pyx_setprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_Width, (char *)0, 0},
  {(char *)"Height", __pyx_getprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_Height, __pyx_setprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_Height, (char *)0, 0},
  {(char *)"MirrorOptions", __pyx_getprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_MirrorOptions, __pyx_setprop_7psychxr_3ovr_4capi_20ovrMirrorTextureDesc_MirrorOptions, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_3ovr_4capi_ovrMirrorTextureDesc = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.ovr.capi.ovrMirrorTextureDesc", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_3ovr_4capi_ovrMirrorTextureDesc), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrMirrorTextureDesc, /*tp_dealloc*/
  0, /*tp_print*/
  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*/
  "ovrTextureSwapChainDesc\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_3ovr_4capi_ovrMirrorTextureDesc, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_3ovr_4capi_ovrMirrorTextureDesc, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_3ovr_4capi_ovrMirrorTextureDesc, /*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
};

static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrSessionStatus(PyTypeObject *t, PyObject *a, 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_7psychxr_3ovr_4capi_16ovrSessionStatus_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrSessionStatus(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_7psychxr_3ovr_4capi_ovrSessionStatus[] = {
  {"IsVisible", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_3IsVisible, METH_NOARGS, 0},
  {"HmdPresent", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_5HmdPresent, METH_NOARGS, 0},
  {"DisplayLost", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_7DisplayLost, METH_NOARGS, 0},
  {"ShouldQuit", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_9ShouldQuit, METH_NOARGS, 0},
  {"ShouldRecenter", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_11ShouldRecenter, METH_NOARGS, 0},
  {"HasInputFocus", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_13HasInputFocus, METH_NOARGS, 0},
  {"OverlayPresent", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_15OverlayPresent, METH_NOARGS, 0},
  {"DepthRequested", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_17DepthRequested, METH_NOARGS, 0},
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_19__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_16ovrSessionStatus_21__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_3ovr_4capi_ovrSessionStatus = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.ovr.capi.ovrSessionStatus", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_3ovr_4capi_ovrSessionStatus), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrSessionStatus, /*tp_dealloc*/
  0, /*tp_print*/
  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_7psychxr_3ovr_4capi_ovrSessionStatus, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_3ovr_4capi_ovrSessionStatus, /*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
};

static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrInputState(PyTypeObject *t, PyObject *a, 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_7psychxr_3ovr_4capi_13ovrInputState_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrInputState(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_7psychxr_3ovr_4capi_13ovrInputState_TimeInSeconds(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_13TimeInSeconds_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_Buttons(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_7Buttons_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_Touches(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_7Touches_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_IndexTrigger(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_12IndexTrigger_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_HandTrigger(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_11HandTrigger_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_Thumbstick(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_10Thumbstick_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_ControllerType(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_14ControllerType_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_IndexTriggerNoDeadzone(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_22IndexTriggerNoDeadzone_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_HandTriggerNoDeadzone(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_21HandTriggerNoDeadzone_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_ThumbstickNoDeadzone(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_20ThumbstickNoDeadzone_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_IndexTriggerRaw(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_15IndexTriggerRaw_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_HandTriggerRaw(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_14HandTriggerRaw_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_ThumbstickRaw(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_13ThumbstickRaw_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_3ovr_4capi_ovrInputState[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_13ovrInputState_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_3ovr_4capi_ovrInputState[] = {
  {(char *)"TimeInSeconds", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_TimeInSeconds, 0, (char *)0, 0},
  {(char *)"Buttons", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_Buttons, 0, (char *)0, 0},
  {(char *)"Touches", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_Touches, 0, (char *)0, 0},
  {(char *)"IndexTrigger", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_IndexTrigger, 0, (char *)0, 0},
  {(char *)"HandTrigger", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_HandTrigger, 0, (char *)0, 0},
  {(char *)"Thumbstick", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_Thumbstick, 0, (char *)0, 0},
  {(char *)"ControllerType", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_ControllerType, 0, (char *)0, 0},
  {(char *)"IndexTriggerNoDeadzone", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_IndexTriggerNoDeadzone, 0, (char *)0, 0},
  {(char *)"HandTriggerNoDeadzone", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_HandTriggerNoDeadzone, 0, (char *)0, 0},
  {(char *)"ThumbstickNoDeadzone", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_ThumbstickNoDeadzone, 0, (char *)0, 0},
  {(char *)"IndexTriggerRaw", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_IndexTriggerRaw, 0, (char *)0, 0},
  {(char *)"HandTriggerRaw", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_HandTriggerRaw, 0, (char *)0, 0},
  {(char *)"ThumbstickRaw", __pyx_getprop_7psychxr_3ovr_4capi_13ovrInputState_ThumbstickRaw, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_3ovr_4capi_ovrInputState = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.ovr.capi.ovrInputState", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_3ovr_4capi_ovrInputState), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrInputState, /*tp_dealloc*/
  0, /*tp_print*/
  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*/
  "Class storing the state of an input device. Fields can only be updated\n    by calling 'get_input_state()'.\n\n    ", /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_3ovr_4capi_ovrInputState, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_3ovr_4capi_ovrInputState, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_3ovr_4capi_ovrInputState, /*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
};

static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame(PyTypeObject *t, PyObject *a, 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_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame(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_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_HmdVsyncIndex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13HmdVsyncIndex_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_AppFrameIndex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_13AppFrameIndex_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_AppDroppedFrameCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20AppDroppedFrameCount_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_AppQueueAheadTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppQueueAheadTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_AppCpuElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppCpuElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_AppGpuElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17AppGpuElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorFrameIndex(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_20CompositorFrameIndex_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorLatency(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_17CompositorLatency_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorCpuElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorCpuElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorGpuElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_24CompositorGpuElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorCpuStartToGpuEndElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_37CompositorCpuStartToGpuEndElapsedTime_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorGpuEndToVsyncElapsedTime(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_34CompositorGpuEndToVsyncElapsedTime_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame[] = {
  {(char *)"HmdVsyncIndex", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_HmdVsyncIndex, 0, (char *)0, 0},
  {(char *)"AppFrameIndex", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_AppFrameIndex, 0, (char *)0, 0},
  {(char *)"AppDroppedFrameCount", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_AppDroppedFrameCount, 0, (char *)0, 0},
  {(char *)"AppQueueAheadTime", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_AppQueueAheadTime, 0, (char *)0, 0},
  {(char *)"AppCpuElapsedTime", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_AppCpuElapsedTime, 0, (char *)0, 0},
  {(char *)"AppGpuElapsedTime", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_AppGpuElapsedTime, 0, (char *)0, 0},
  {(char *)"CompositorFrameIndex", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorFrameIndex, 0, (char *)0, 0},
  {(char *)"CompositorLatency", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorLatency, 0, (char *)0, 0},
  {(char *)"CompositorCpuElapsedTime", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorCpuElapsedTime, 0, (char *)0, 0},
  {(char *)"CompositorGpuElapsedTime", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorGpuElapsedTime, 0, (char *)0, 0},
  {(char *)"CompositorCpuStartToGpuEndElapsedTime", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorCpuStartToGpuEndElapsedTime, 0, (char *)0, 0},
  {(char *)"CompositorGpuEndToVsyncElapsedTime", __pyx_getprop_7psychxr_3ovr_4capi_30ovrPerfStatsPerCompositorFrame_CompositorGpuEndToVsyncElapsedTime, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.ovr.capi.ovrPerfStatsPerCompositorFrame", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame, /*tp_dealloc*/
  0, /*tp_print*/
  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_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame, /*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
};

static PyObject *__pyx_tp_new_7psychxr_3ovr_4capi_ovrPerfStats(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *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_7psychxr_3ovr_4capi_ovrPerfStats *)o);
  p->perf_stats = ((PyObject*)Py_None); Py_INCREF(Py_None);
  if (unlikely(__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_1__cinit__(o, a, k) < 0)) goto bad;
  return o;
  bad:
  Py_DECREF(o); o = 0;
  return NULL;
}

static void __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrPerfStats(PyObject *o) {
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *p = (struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)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->perf_stats);
  (*Py_TYPE(o)->tp_free)(o);
}

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

static int __pyx_tp_clear_7psychxr_3ovr_4capi_ovrPerfStats(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *p = (struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats *)o;
  tmp = ((PyObject*)p->perf_stats);
  p->perf_stats = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_12ovrPerfStats_FrameStatsCount(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_15FrameStatsCount_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_12ovrPerfStats_AnyFrameStatsDropped(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_20AnyFrameStatsDropped_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_12ovrPerfStats_FrameStats(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_10FrameStats_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_12ovrPerfStats_AdaptiveGpuPerformanceScale(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_27AdaptiveGpuPerformanceScale_1__get__(o);
}

static PyObject *__pyx_getprop_7psychxr_3ovr_4capi_12ovrPerfStats_AswIsAvailable(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_14AswIsAvailable_1__get__(o);
}

static PyMethodDef __pyx_methods_7psychxr_3ovr_4capi_ovrPerfStats[] = {
  {"__reduce_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_3__reduce_cython__, METH_NOARGS, 0},
  {"__setstate_cython__", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_12ovrPerfStats_5__setstate_cython__, METH_O, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_7psychxr_3ovr_4capi_ovrPerfStats[] = {
  {(char *)"FrameStatsCount", __pyx_getprop_7psychxr_3ovr_4capi_12ovrPerfStats_FrameStatsCount, 0, (char *)0, 0},
  {(char *)"AnyFrameStatsDropped", __pyx_getprop_7psychxr_3ovr_4capi_12ovrPerfStats_AnyFrameStatsDropped, 0, (char *)0, 0},
  {(char *)"FrameStats", __pyx_getprop_7psychxr_3ovr_4capi_12ovrPerfStats_FrameStats, 0, (char *)0, 0},
  {(char *)"AdaptiveGpuPerformanceScale", __pyx_getprop_7psychxr_3ovr_4capi_12ovrPerfStats_AdaptiveGpuPerformanceScale, 0, (char *)0, 0},
  {(char *)"AswIsAvailable", __pyx_getprop_7psychxr_3ovr_4capi_12ovrPerfStats_AswIsAvailable, 0, (char *)0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_7psychxr_3ovr_4capi_ovrPerfStats = {
  PyVarObject_HEAD_INIT(0, 0)
  "psychxr.ovr.capi.ovrPerfStats", /*tp_name*/
  sizeof(struct __pyx_obj_7psychxr_3ovr_4capi_ovrPerfStats), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7psychxr_3ovr_4capi_ovrPerfStats, /*tp_dealloc*/
  0, /*tp_print*/
  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|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7psychxr_3ovr_4capi_ovrPerfStats, /*tp_traverse*/
  __pyx_tp_clear_7psychxr_3ovr_4capi_ovrPerfStats, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_7psychxr_3ovr_4capi_ovrPerfStats, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_7psychxr_3ovr_4capi_ovrPerfStats, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7psychxr_3ovr_4capi_ovrPerfStats, /*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
};

static PyMethodDef __pyx_methods[] = {
  {"isOculusServiceRunning", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_9isOculusServiceRunning, METH_VARARGS|METH_KEYWORDS, 0},
  {"isHmdConnected", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_11isHmdConnected, METH_VARARGS|METH_KEYWORDS, 0},
  {"startSession", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_13startSession, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_12startSession},
  {"endSession", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_15endSession, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_14endSession},
  {"getHmdDesc", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_17getHmdDesc, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_16getHmdDesc},
  {"createTextureSwapChainGL", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_19createTextureSwapChainGL, METH_O, __pyx_doc_7psychxr_3ovr_4capi_18createTextureSwapChainGL},
  {"getFovTextureSize", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_21getFovTextureSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_20getFovTextureSize},
  {"configEyeRenderDesc", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_23configEyeRenderDesc, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_22configEyeRenderDesc},
  {"getHmdToEyePose", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_25getHmdToEyePose, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_24getHmdToEyePose},
  {"getBufferSize", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_27getBufferSize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_26getBufferSize},
  {"setRenderSwapChain", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_29setRenderSwapChain, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_28setRenderSwapChain},
  {"getRenderViewport", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_31getRenderViewport, METH_O, __pyx_doc_7psychxr_3ovr_4capi_30getRenderViewport},
  {"setRenderViewport", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_33setRenderViewport, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_32setRenderViewport},
  {"getRenderLayerFlags", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_35getRenderLayerFlags, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_34getRenderLayerFlags},
  {"setRenderLayerFlags", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_37setRenderLayerFlags, METH_O, __pyx_doc_7psychxr_3ovr_4capi_36setRenderLayerFlags},
  {"getTrackingState", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_39getTrackingState, METH_VARARGS|METH_KEYWORDS, 0},
  {"setTrackingOriginType", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_41setTrackingOriginType, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_40setTrackingOriginType},
  {"getTrackingOriginType", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_43getTrackingOriginType, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_42getTrackingOriginType},
  {"recenterTrackingOrigin", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_45recenterTrackingOrigin, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_44recenterTrackingOrigin},
  {"specifyTrackingOrigin", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_47specifyTrackingOrigin, METH_O, __pyx_doc_7psychxr_3ovr_4capi_46specifyTrackingOrigin},
  {"calcEyePoses", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_49calcEyePoses, METH_O, __pyx_doc_7psychxr_3ovr_4capi_48calcEyePoses},
  {"getEyeViewMatrix", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_51getEyeViewMatrix, METH_O, __pyx_doc_7psychxr_3ovr_4capi_50getEyeViewMatrix},
  {"getEyeProjectionMatrix", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_53getEyeProjectionMatrix, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_52getEyeProjectionMatrix},
  {"getDisplayTime", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_55getDisplayTime, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_54getDisplayTime},
  {"waitToBeginFrame", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_57waitToBeginFrame, METH_VARARGS|METH_KEYWORDS, 0},
  {"beginFrame", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_59beginFrame, METH_VARARGS|METH_KEYWORDS, 0},
  {"commitSwapChain", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_61commitSwapChain, METH_O, 0},
  {"endFrame", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_63endFrame, METH_VARARGS|METH_KEYWORDS, 0},
  {"setupMirrorTexture", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_65setupMirrorTexture, METH_O, __pyx_doc_7psychxr_3ovr_4capi_64setupMirrorTexture},
  {"getMirrorTexture", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_67getMirrorTexture, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_66getMirrorTexture},
  {"getSessionStatus", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_69getSessionStatus, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_68getSessionStatus},
  {"getInputState", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_71getInputState, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_70getInputState},
  {"pollController", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_73pollController, METH_O, __pyx_doc_7psychxr_3ovr_4capi_72pollController},
  {"getControllerAbsTime", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_75getControllerAbsTime, METH_O, __pyx_doc_7psychxr_3ovr_4capi_74getControllerAbsTime},
  {"getIndexTriggerValues", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_77getIndexTriggerValues, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_76getIndexTriggerValues},
  {"getHandTriggerValues", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_79getHandTriggerValues, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_78getHandTriggerValues},
  {"getThumbstickValues", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_81getThumbstickValues, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_80getThumbstickValues},
  {"getButtons", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_83getButtons, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_82getButtons},
  {"getTouches", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_85getTouches, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_84getTouches},
  {"getConnectedControllerTypes", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_87getConnectedControllerTypes, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_86getConnectedControllerTypes},
  {"getFrameStats", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_89getFrameStats, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_88getFrameStats},
  {"resetFrameStats", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_91resetFrameStats, METH_NOARGS, __pyx_doc_7psychxr_3ovr_4capi_90resetFrameStats},
  {"perfHudMode", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_93perfHudMode, METH_VARARGS|METH_KEYWORDS, __pyx_doc_7psychxr_3ovr_4capi_92perfHudMode},
  {"setBoundryColor", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_95setBoundryColor, METH_VARARGS|METH_KEYWORDS, 0},
  {"resetBoundryColor", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_97resetBoundryColor, METH_NOARGS, 0},
  {"isBoundryVisible", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_99isBoundryVisible, METH_NOARGS, 0},
  {"showBoundry", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_101showBoundry, METH_VARARGS|METH_KEYWORDS, 0},
  {"getPlayerHeight", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_103getPlayerHeight, METH_NOARGS, 0},
  {"getEyeHeight", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_105getEyeHeight, METH_NOARGS, 0},
  {"getNeckEyeDistance", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_107getNeckEyeDistance, METH_NOARGS, 0},
  {"getEyeToNoseDist", (PyCFunction)__pyx_pw_7psychxr_3ovr_4capi_109getEyeToNoseDist, METH_NOARGS, 0},
  {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_capi(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_capi},
  {0, NULL}
};
#endif

static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    "capi",
    __pyx_k_This_file_exposes_LibOVR_functio, /* 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

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
  {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
  {&__pyx_n_s_AppRenderTiming, __pyx_k_AppRenderTiming, sizeof(__pyx_k_AppRenderTiming), 0, 0, 1, 1},
  {&__pyx_n_s_AswStats, __pyx_k_AswStats, sizeof(__pyx_k_AswStats), 0, 0, 1, 1},
  {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1},
  {&__pyx_n_s_Back, __pyx_k_Back, sizeof(__pyx_k_Back), 0, 0, 1, 1},
  {&__pyx_n_s_CompRenderTiming, __pyx_k_CompRenderTiming, sizeof(__pyx_k_CompRenderTiming), 0, 0, 1, 1},
  {&__pyx_n_s_Down, __pyx_k_Down, sizeof(__pyx_k_Down), 0, 0, 1, 1},
  {&__pyx_n_s_Enter, __pyx_k_Enter, sizeof(__pyx_k_Enter), 0, 0, 1, 1},
  {&__pyx_n_s_GL, __pyx_k_GL, sizeof(__pyx_k_GL), 0, 0, 1, 1},
  {&__pyx_n_s_Home, __pyx_k_Home, sizeof(__pyx_k_Home), 0, 0, 1, 1},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_kp_s_Invalid_trigger_mode_specified, __pyx_k_Invalid_trigger_mode_specified, sizeof(__pyx_k_Invalid_trigger_mode_specified), 0, 0, 1, 0},
  {&__pyx_n_s_LIndexPointing, __pyx_k_LIndexPointing, sizeof(__pyx_k_LIndexPointing), 0, 0, 1, 1},
  {&__pyx_n_s_LIndexTrigger, __pyx_k_LIndexTrigger, sizeof(__pyx_k_LIndexTrigger), 0, 0, 1, 1},
  {&__pyx_n_s_LMask, __pyx_k_LMask, sizeof(__pyx_k_LMask), 0, 0, 1, 1},
  {&__pyx_n_s_LShoulder, __pyx_k_LShoulder, sizeof(__pyx_k_LShoulder), 0, 0, 1, 1},
  {&__pyx_n_s_LThumb, __pyx_k_LThumb, sizeof(__pyx_k_LThumb), 0, 0, 1, 1},
  {&__pyx_n_s_LThumbRest, __pyx_k_LThumbRest, sizeof(__pyx_k_LThumbRest), 0, 0, 1, 1},
  {&__pyx_n_s_LThumbUp, __pyx_k_LThumbUp, sizeof(__pyx_k_LThumbUp), 0, 0, 1, 1},
  {&__pyx_n_s_LatencyTiming, __pyx_k_LatencyTiming, sizeof(__pyx_k_LatencyTiming), 0, 0, 1, 1},
  {&__pyx_n_s_Left, __pyx_k_Left, sizeof(__pyx_k_Left), 0, 0, 1, 1},
  {&__pyx_kp_s_Maximum_number_of_swap_chains_in, __pyx_k_Maximum_number_of_swap_chains_in, sizeof(__pyx_k_Maximum_number_of_swap_chains_in), 0, 0, 1, 0},
  {&__pyx_n_s_OVR_FORMAT_B8G8R8A8_UNORM, __pyx_k_OVR_FORMAT_B8G8R8A8_UNORM, sizeof(__pyx_k_OVR_FORMAT_B8G8R8A8_UNORM), 0, 0, 1, 1},
  {&__pyx_n_s_OVR_FORMAT_B8G8R8_UNORM, __pyx_k_OVR_FORMAT_B8G8R8_UNORM, sizeof(__pyx_k_OVR_FORMAT_B8G8R8_UNORM), 0, 0, 1, 1},
  {&__pyx_n_s_OVR_FORMAT_D16_UNORM, __pyx_k_OVR_FORMAT_D16_UNORM, sizeof(__pyx_k_OVR_FORMAT_D16_UNORM), 0, 0, 1, 1},
  {&__pyx_n_s_OVR_FORMAT_D24_UNORM_S8_UINT, __pyx_k_OVR_FORMAT_D24_UNORM_S8_UINT, sizeof(__pyx_k_OVR_FORMAT_D24_UNORM_S8_UINT), 0, 0, 1, 1},
  {&__pyx_n_s_OVR_FORMAT_D32_FLOAT, __pyx_k_OVR_FORMAT_D32_FLOAT, sizeof(__pyx_k_OVR_FORMAT_D32_FLOAT), 0, 0, 1, 1},
  {&__pyx_n_s_OVR_FORMAT_D32_FLOAT_S8X24_UINT, __pyx_k_OVR_FORMAT_D32_FLOAT_S8X24_UINT, sizeof(__pyx_k_OVR_FORMAT_D32_FLOAT_S8X24_UINT), 0, 0, 1, 1},
  {&__pyx_n_s_OVR_FORMAT_R11G11B10_FLOAT, __pyx_k_OVR_FORMAT_R11G11B10_FLOAT, sizeof(__pyx_k_OVR_FORMAT_R11G11B10_FLOAT), 0, 0, 1, 1},
  {&__pyx_n_s_OVR_FORMAT_R16G16B16A16_FLOAT, __pyx_k_OVR_FORMAT_R16G16B16A16_FLOAT, sizeof(__pyx_k_OVR_FORMAT_R16G16B16A16_FLOAT), 0, 0, 1, 1},
  {&__pyx_n_s_OVR_FORMAT_R8G8B8A8_UNORM, __pyx_k_OVR_FORMAT_R8G8B8A8_UNORM, sizeof(__pyx_k_OVR_FORMAT_R8G8B8A8_UNORM), 0, 0, 1, 1},
  {&__pyx_n_s_OVR_FORMAT_R8G8B8A8_UNORM_SRGB, __pyx_k_OVR_FORMAT_R8G8B8A8_UNORM_SRGB, sizeof(__pyx_k_OVR_FORMAT_R8G8B8A8_UNORM_SRGB), 0, 0, 1, 1},
  {&__pyx_n_s_Off, __pyx_k_Off, sizeof(__pyx_k_Off), 0, 0, 1, 1},
  {&__pyx_n_s_OpenGL_GL, __pyx_k_OpenGL_GL, sizeof(__pyx_k_OpenGL_GL), 0, 0, 1, 1},
  {&__pyx_n_s_PerfSummary, __pyx_k_PerfSummary, sizeof(__pyx_k_PerfSummary), 0, 0, 1, 1},
  {&__pyx_n_s_Private, __pyx_k_Private, sizeof(__pyx_k_Private), 0, 0, 1, 1},
  {&__pyx_n_s_RIndexPointing, __pyx_k_RIndexPointing, sizeof(__pyx_k_RIndexPointing), 0, 0, 1, 1},
  {&__pyx_n_s_RIndexTrigger, __pyx_k_RIndexTrigger, sizeof(__pyx_k_RIndexTrigger), 0, 0, 1, 1},
  {&__pyx_n_s_RMask, __pyx_k_RMask, sizeof(__pyx_k_RMask), 0, 0, 1, 1},
  {&__pyx_n_s_RShoulder, __pyx_k_RShoulder, sizeof(__pyx_k_RShoulder), 0, 0, 1, 1},
  {&__pyx_n_s_RThumb, __pyx_k_RThumb, sizeof(__pyx_k_RThumb), 0, 0, 1, 1},
  {&__pyx_n_s_RThumbRest, __pyx_k_RThumbRest, sizeof(__pyx_k_RThumbRest), 0, 0, 1, 1},
  {&__pyx_n_s_RThumbUp, __pyx_k_RThumbUp, sizeof(__pyx_k_RThumbUp), 0, 0, 1, 1},
  {&__pyx_n_s_Right, __pyx_k_Right, sizeof(__pyx_k_Right), 0, 0, 1, 1},
  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s_Type, __pyx_k_Type, sizeof(__pyx_k_Type), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_Up, __pyx_k_Up, sizeof(__pyx_k_Up), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_VersionInfo, __pyx_k_VersionInfo, sizeof(__pyx_k_VersionInfo), 0, 0, 1, 1},
  {&__pyx_n_s_VolDown, __pyx_k_VolDown, sizeof(__pyx_k_VolDown), 0, 0, 1, 1},
  {&__pyx_n_s_VolUp, __pyx_k_VolUp, sizeof(__pyx_k_VolUp), 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__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 1},
  {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
  {&__pyx_n_s_abs_time, __pyx_k_abs_time, sizeof(__pyx_k_abs_time), 0, 0, 1, 1},
  {&__pyx_n_s_allocSwapChain, __pyx_k_allocSwapChain, sizeof(__pyx_k_allocSwapChain), 0, 0, 1, 1},
  {&__pyx_n_s_array_size, __pyx_k_array_size, sizeof(__pyx_k_array_size), 0, 0, 1, 1},
  {&__pyx_n_s_available_hud_modes, __pyx_k_available_hud_modes, sizeof(__pyx_k_available_hud_modes), 0, 0, 1, 1},
  {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
  {&__pyx_n_s_buttonNames, __pyx_k_buttonNames, sizeof(__pyx_k_buttonNames), 0, 0, 1, 1},
  {&__pyx_n_s_button_names, __pyx_k_button_names, sizeof(__pyx_k_button_names), 0, 0, 1, 1},
  {&__pyx_n_s_c_data, __pyx_k_c_data, sizeof(__pyx_k_c_data), 0, 0, 1, 1},
  {&__pyx_n_s_check_result, __pyx_k_check_result, sizeof(__pyx_k_check_result), 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_continuous, __pyx_k_continuous, sizeof(__pyx_k_continuous), 0, 0, 1, 1},
  {&__pyx_n_s_controller, __pyx_k_controller, sizeof(__pyx_k_controller), 0, 0, 1, 1},
  {&__pyx_n_s_controller_names, __pyx_k_controller_names, sizeof(__pyx_k_controller_names), 0, 0, 1, 1},
  {&__pyx_n_s_current_idx, __pyx_k_current_idx, sizeof(__pyx_k_current_idx), 0, 0, 1, 1},
  {&__pyx_n_s_deadZone, __pyx_k_deadZone, sizeof(__pyx_k_deadZone), 0, 0, 1, 1},
  {&__pyx_n_s_debug_mode, __pyx_k_debug_mode, sizeof(__pyx_k_debug_mode), 0, 0, 1, 1},
  {&__pyx_n_s_eye, __pyx_k_eye, sizeof(__pyx_k_eye), 0, 0, 1, 1},
  {&__pyx_n_s_eye_type, __pyx_k_eye_type, sizeof(__pyx_k_eye_type), 0, 0, 1, 1},
  {&__pyx_n_s_falling, __pyx_k_falling, sizeof(__pyx_k_falling), 0, 0, 1, 1},
  {&__pyx_n_s_far_clip, __pyx_k_far_clip, sizeof(__pyx_k_far_clip), 0, 0, 1, 1},
  {&__pyx_n_s_floor, __pyx_k_floor, sizeof(__pyx_k_floor), 0, 0, 1, 1},
  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
  {&__pyx_n_s_fov, __pyx_k_fov, sizeof(__pyx_k_fov), 0, 0, 1, 1},
  {&__pyx_n_s_fov_type, __pyx_k_fov_type, sizeof(__pyx_k_fov_type), 0, 0, 1, 1},
  {&__pyx_n_s_frameIndex, __pyx_k_frameIndex, sizeof(__pyx_k_frameIndex), 0, 0, 1, 1},
  {&__pyx_n_s_freeSwapChain, __pyx_k_freeSwapChain, sizeof(__pyx_k_freeSwapChain), 0, 0, 1, 1},
  {&__pyx_n_s_g, __pyx_k_g, sizeof(__pyx_k_g), 0, 0, 1, 1},
  {&__pyx_n_s_getTextureSwapChainBufferGL, __pyx_k_getTextureSwapChainBufferGL, sizeof(__pyx_k_getTextureSwapChainBufferGL), 0, 0, 1, 1},
  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 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_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
  {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
  {&__pyx_n_s_latency_marker, __pyx_k_latency_marker, sizeof(__pyx_k_latency_marker), 0, 0, 1, 1},
  {&__pyx_n_s_left_touch, __pyx_k_left_touch, sizeof(__pyx_k_left_touch), 0, 0, 1, 1},
  {&__pyx_n_s_lookAt, __pyx_k_lookAt, sizeof(__pyx_k_lookAt), 0, 0, 1, 1},
  {&__pyx_n_s_ltouch, __pyx_k_ltouch, sizeof(__pyx_k_ltouch), 0, 0, 1, 1},
  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
  {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
  {&__pyx_n_s_mip_levels, __pyx_k_mip_levels, sizeof(__pyx_k_mip_levels), 0, 0, 1, 1},
  {&__pyx_n_s_mirrorOptions, __pyx_k_mirrorOptions, sizeof(__pyx_k_mirrorOptions), 0, 0, 1, 1},
  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
  {&__pyx_n_s_near_clip, __pyx_k_near_clip, sizeof(__pyx_k_near_clip), 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_origin, __pyx_k_origin, sizeof(__pyx_k_origin), 0, 0, 1, 1},
  {&__pyx_n_s_ovrEye_Count, __pyx_k_ovrEye_Count, sizeof(__pyx_k_ovrEye_Count), 0, 0, 1, 1},
  {&__pyx_n_s_ovrEye_Left, __pyx_k_ovrEye_Left, sizeof(__pyx_k_ovrEye_Left), 0, 0, 1, 1},
  {&__pyx_n_s_ovrEye_Right, __pyx_k_ovrEye_Right, sizeof(__pyx_k_ovrEye_Right), 0, 0, 1, 1},
  {&__pyx_n_s_ovrLayerFlag_HeadLocked, __pyx_k_ovrLayerFlag_HeadLocked, sizeof(__pyx_k_ovrLayerFlag_HeadLocked), 0, 0, 1, 1},
  {&__pyx_n_s_ovrLayerFlag_HighQuality, __pyx_k_ovrLayerFlag_HighQuality, sizeof(__pyx_k_ovrLayerFlag_HighQuality), 0, 0, 1, 1},
  {&__pyx_n_s_ovrLayerFlag_TextureOriginAtBott, __pyx_k_ovrLayerFlag_TextureOriginAtBott, sizeof(__pyx_k_ovrLayerFlag_TextureOriginAtBott), 0, 0, 1, 1},
  {&__pyx_n_s_ovrLayerType_EyeFov, __pyx_k_ovrLayerType_EyeFov, sizeof(__pyx_k_ovrLayerType_EyeFov), 0, 0, 1, 1},
  {&__pyx_n_s_ovrMirrorOption_Default, __pyx_k_ovrMirrorOption_Default, sizeof(__pyx_k_ovrMirrorOption_Default), 0, 0, 1, 1},
  {&__pyx_n_s_ovrMirrorOption_IncludeGuardian, __pyx_k_ovrMirrorOption_IncludeGuardian, sizeof(__pyx_k_ovrMirrorOption_IncludeGuardian), 0, 0, 1, 1},
  {&__pyx_n_s_ovrMirrorOption_IncludeNotificat, __pyx_k_ovrMirrorOption_IncludeNotificat, sizeof(__pyx_k_ovrMirrorOption_IncludeNotificat), 0, 0, 1, 1},
  {&__pyx_n_s_ovrMirrorOption_IncludeSystemGui, __pyx_k_ovrMirrorOption_IncludeSystemGui, sizeof(__pyx_k_ovrMirrorOption_IncludeSystemGui), 0, 0, 1, 1},
  {&__pyx_n_s_ovrMirrorOption_LeftEyeOnly, __pyx_k_ovrMirrorOption_LeftEyeOnly, sizeof(__pyx_k_ovrMirrorOption_LeftEyeOnly), 0, 0, 1, 1},
  {&__pyx_n_s_ovrMirrorOption_PostDistortion, __pyx_k_ovrMirrorOption_PostDistortion, sizeof(__pyx_k_ovrMirrorOption_PostDistortion), 0, 0, 1, 1},
  {&__pyx_n_s_ovrMirrorOption_RightEyeOnly, __pyx_k_ovrMirrorOption_RightEyeOnly, sizeof(__pyx_k_ovrMirrorOption_RightEyeOnly), 0, 0, 1, 1},
  {&__pyx_n_s_ovrStatus_OrientationTracked, __pyx_k_ovrStatus_OrientationTracked, sizeof(__pyx_k_ovrStatus_OrientationTracked), 0, 0, 1, 1},
  {&__pyx_n_s_ovrStatus_PositionTracked, __pyx_k_ovrStatus_PositionTracked, sizeof(__pyx_k_ovrStatus_PositionTracked), 0, 0, 1, 1},
  {&__pyx_n_s_ovrTexture_2D, __pyx_k_ovrTexture_2D, sizeof(__pyx_k_ovrTexture_2D), 0, 0, 1, 1},
  {&__pyx_n_s_ovrTexture_Cube, __pyx_k_ovrTexture_Cube, sizeof(__pyx_k_ovrTexture_Cube), 0, 0, 1, 1},
  {&__pyx_n_s_predicted, __pyx_k_predicted, sizeof(__pyx_k_predicted), 0, 0, 1, 1},
  {&__pyx_n_s_pressed, __pyx_k_pressed, sizeof(__pyx_k_pressed), 0, 0, 1, 1},
  {&__pyx_n_s_psychxr_ovr_capi, __pyx_k_psychxr_ovr_capi, sizeof(__pyx_k_psychxr_ovr_capi), 0, 0, 1, 1},
  {&__pyx_kp_s_psychxr_ovr_capi_pyx, __pyx_k_psychxr_ovr_capi_pyx, sizeof(__pyx_k_psychxr_ovr_capi_pyx), 0, 0, 1, 0},
  {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_recommended, __pyx_k_recommended, sizeof(__pyx_k_recommended), 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_released, __pyx_k_released, sizeof(__pyx_k_released), 0, 0, 1, 1},
  {&__pyx_n_s_remote, __pyx_k_remote, sizeof(__pyx_k_remote), 0, 0, 1, 1},
  {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
  {&__pyx_n_s_right_touch, __pyx_k_right_touch, sizeof(__pyx_k_right_touch), 0, 0, 1, 1},
  {&__pyx_n_s_rising, __pyx_k_rising, sizeof(__pyx_k_rising), 0, 0, 1, 1},
  {&__pyx_n_s_rtouch, __pyx_k_rtouch, sizeof(__pyx_k_rtouch), 0, 0, 1, 1},
  {&__pyx_n_s_sample_count, __pyx_k_sample_count, sizeof(__pyx_k_sample_count), 0, 0, 1, 1},
  {&__pyx_n_s_sc, __pyx_k_sc, sizeof(__pyx_k_sc), 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_n_s_show, __pyx_k_show, sizeof(__pyx_k_show), 0, 0, 1, 1},
  {&__pyx_n_s_stateOut, __pyx_k_stateOut, sizeof(__pyx_k_stateOut), 0, 0, 1, 1},
  {&__pyx_n_s_static_image, __pyx_k_static_image, sizeof(__pyx_k_static_image), 0, 0, 1, 1},
  {&__pyx_n_s_swap_chain, __pyx_k_swap_chain, sizeof(__pyx_k_swap_chain), 0, 0, 1, 1},
  {&__pyx_n_s_swap_desc, __pyx_k_swap_desc, sizeof(__pyx_k_swap_desc), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_tex_id, __pyx_k_tex_id, sizeof(__pyx_k_tex_id), 0, 0, 1, 1},
  {&__pyx_n_s_texel_per_pixel, __pyx_k_texel_per_pixel, sizeof(__pyx_k_texel_per_pixel), 0, 0, 1, 1},
  {&__pyx_n_s_texels_per_pixel, __pyx_k_texels_per_pixel, sizeof(__pyx_k_texels_per_pixel), 0, 0, 1, 1},
  {&__pyx_n_s_timeout_milliseconds, __pyx_k_timeout_milliseconds, sizeof(__pyx_k_timeout_milliseconds), 0, 0, 1, 1},
  {&__pyx_n_s_touch, __pyx_k_touch, sizeof(__pyx_k_touch), 0, 0, 1, 1},
  {&__pyx_n_s_touchNames, __pyx_k_touchNames, sizeof(__pyx_k_touchNames), 0, 0, 1, 1},
  {&__pyx_n_s_touch_names, __pyx_k_touch_names, sizeof(__pyx_k_touch_names), 0, 0, 1, 1},
  {&__pyx_n_s_transform, __pyx_k_transform, sizeof(__pyx_k_transform), 0, 0, 1, 1},
  {&__pyx_n_s_trigger, __pyx_k_trigger, sizeof(__pyx_k_trigger), 0, 0, 1, 1},
  {&__pyx_n_s_type, __pyx_k_type, sizeof(__pyx_k_type), 0, 0, 1, 1},
  {&__pyx_n_s_viewPortRect, __pyx_k_viewPortRect, sizeof(__pyx_k_viewPortRect), 0, 0, 1, 1},
  {&__pyx_n_s_w, __pyx_k_w, sizeof(__pyx_k_w), 0, 0, 1, 1},
  {&__pyx_n_s_width, __pyx_k_width, sizeof(__pyx_k_width), 0, 0, 1, 1},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_n_s_xbox, __pyx_k_xbox, sizeof(__pyx_k_xbox), 0, 0, 1, 1},
  {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 91, __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_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 249, __pyx_L1_error)
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 254, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 1713, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 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_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "(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__3 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "psychxr/ovr/capi.pyx":254
 *             break
 *     else:
 *         raise IndexError("Maximum number of swap chains initialized!")             # <<<<<<<<<<<<<<
 * 
 *     # create the swap chain
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_Maximum_number_of_swap_chains_in); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 254, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "(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__5 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); 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("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__6 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); 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("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__9 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); 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("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__10 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "psychxr/ovr/capi.pyx":633
 *             break
 *     else:
 *         raise IndexError("Maximum number of swap chains initialized!")             # <<<<<<<<<<<<<<
 * 
 *     # create the swap chain
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_Maximum_number_of_swap_chains_in); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 633, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "(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__12 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "(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__13 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "(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__14 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "(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__15 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "psychxr/ovr/capi.pyx":1041
 * 
 *     cdef ovrVector3f final_up = \
 *         (<ovrVector3f>rot).transform(ovrVector3f(0, 1, 0))             # <<<<<<<<<<<<<<
 *     cdef ovrVector3f final_forward = \
 *         (<ovrVector3f>rot).transform(ovrVector3f(0, 0, -1))
 */
  __pyx_tuple__16 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_1, __pyx_int_0); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 1041, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "psychxr/ovr/capi.pyx":1043
 *         (<ovrVector3f>rot).transform(ovrVector3f(0, 1, 0))
 *     cdef ovrVector3f final_forward = \
 *         (<ovrVector3f>rot).transform(ovrVector3f(0, 0, -1))             # <<<<<<<<<<<<<<
 *     cdef ovrMatrix4f viewMatrix = \
 *         ovrMatrix4f.lookAt(pos, pos + final_forward, final_up)
 */
  __pyx_tuple__17 = PyTuple_Pack(3, __pyx_int_0, __pyx_int_0, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 1043, __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__20 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "(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__21 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "(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__22 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "(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__23 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "(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__24 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "(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__25 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "psychxr/ovr/capi.pyx":1713
 *             (ptr_ctrl_prev.Buttons & button_bits) == button_bits
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")             # <<<<<<<<<<<<<<
 * 
 *     return pressed
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Invalid_trigger_mode_specified); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1713, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "psychxr/ovr/capi.pyx":1778
 *             (ptr_ctrl_prev.Touches & touch_bits) == touch_bits
 *     else:
 *         raise ValueError("Invalid trigger mode specified.")             # <<<<<<<<<<<<<<
 * 
 *     return touched
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_Invalid_trigger_mode_specified); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 1778, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "(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__28 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "(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__29 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "(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__30 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); 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("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__31 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(1, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "psychxr/ovr/capi.pyx":88
 * #
 * cdef ovr_errorcode.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):             # <<<<<<<<<<<<<<
 *     if ovr_errorcode.OVR_FAILURE(result):
 *         ovr_capi.ovr_GetLastErrorInfo(&_last_error_info_)
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_n_s_result); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);
  __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_ovr_capi_pyx, __pyx_n_s_check_result, 88, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 88, __pyx_L1_error)

  /* "psychxr/ovr/capi.pyx":236
 * # --------------------
 * #
 * def allocSwapChain(ovrTextureSwapChainDesc swap_desc):             # <<<<<<<<<<<<<<
 *     """Allocate a new swap chain object with the specified parameters. If
 *     successful, an integer is returned which is used to reference the swap
 */
  __pyx_tuple__35 = PyTuple_Pack(4, __pyx_n_s_swap_desc, __pyx_n_s_i, __pyx_n_s_sc, __pyx_n_s_result); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);
  __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_ovr_capi_pyx, __pyx_n_s_allocSwapChain, 236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 236, __pyx_L1_error)

  /* "psychxr/ovr/capi.pyx":269
 * # call.
 * #
 * def freeSwapChain(int sc):             # <<<<<<<<<<<<<<
 *     """Free or destroy a swap chain. The handle will be made available after
 *     this call.
 */
  __pyx_tuple__37 = PyTuple_Pack(2, __pyx_n_s_sc, __pyx_n_s_sc); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);
  __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_ovr_capi_pyx, __pyx_n_s_freeSwapChain, 269, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 269, __pyx_L1_error)

  /* "psychxr/ovr/capi.pyx":284
 * # value as a frame buffer texture.
 * #
 * def getTextureSwapChainBufferGL(int sc):             # <<<<<<<<<<<<<<
 *     cdef int current_idx = 0
 *     cdef unsigned int tex_id = 0
 */
  __pyx_tuple__39 = PyTuple_Pack(5, __pyx_n_s_sc, __pyx_n_s_sc, __pyx_n_s_current_idx, __pyx_n_s_tex_id, __pyx_n_s_result); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);
  __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_psychxr_ovr_capi_pyx, __pyx_n_s_getTextureSwapChainBufferGL, 284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  __pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type;
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __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_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __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;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initcapi(void); /*proto*/
PyMODINIT_FUNC initcapi(void)
#else
PyMODINIT_FUNC PyInit_capi(void); /*proto*/
PyMODINIT_FUNC PyInit_capi(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        result = PyDict_SetItemString(moddict, to_name, value);
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    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__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static int __pyx_pymod_exec_capi(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
  #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("PyMODINIT_FUNC PyInit_capi(void)", 0);
  if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __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(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #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("capi", __pyx_methods, __pyx_k_This_file_exposes_LibOVR_functio, 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)
  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  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_psychxr__ovr__capi) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __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, "psychxr.ovr.capi")) {
      if (unlikely(PyDict_SetItemString(modules, "psychxr.ovr.capi", __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 init code ---*/
  __pyx_v_7psychxr_3ovr_4capi_ctrl_index_lut = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut = ((PyObject*)Py_None); Py_INCREF(Py_None);
  __pyx_v_7psychxr_3ovr_4capi_ctrl_touch_lut = ((PyObject*)Py_None); Py_INCREF(Py_None);
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  if (PyType_Ready(&__pyx_type_7psychxr_3ovr_4capi_ovrColorf) < 0) __PYX_ERR(0, 179, __pyx_L1_error)
  __pyx_type_7psychxr_3ovr_4capi_ovrColorf.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ovrColorf", (PyObject *)&__pyx_type_7psychxr_3ovr_4capi_ovrColorf) < 0) __PYX_ERR(0, 179, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_3ovr_4capi_ovrColorf) < 0) __PYX_ERR(0, 179, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4capi_ovrColorf = &__pyx_type_7psychxr_3ovr_4capi_ovrColorf;
  if (PyType_Ready(&__pyx_type_7psychxr_3ovr_4capi_ovrHmdDesc) < 0) __PYX_ERR(0, 389, __pyx_L1_error)
  __pyx_type_7psychxr_3ovr_4capi_ovrHmdDesc.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ovrHmdDesc", (PyObject *)&__pyx_type_7psychxr_3ovr_4capi_ovrHmdDesc) < 0) __PYX_ERR(0, 389, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_3ovr_4capi_ovrHmdDesc) < 0) __PYX_ERR(0, 389, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4capi_ovrHmdDesc = &__pyx_type_7psychxr_3ovr_4capi_ovrHmdDesc;
  if (PyType_Ready(&__pyx_type_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc) < 0) __PYX_ERR(0, 517, __pyx_L1_error)
  __pyx_type_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ovrTextureSwapChainDesc", (PyObject *)&__pyx_type_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc) < 0) __PYX_ERR(0, 517, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc) < 0) __PYX_ERR(0, 517, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc = &__pyx_type_7psychxr_3ovr_4capi_ovrTextureSwapChainDesc;
  if (PyType_Ready(&__pyx_type_7psychxr_3ovr_4capi_ovrPoseStatef) < 0) __PYX_ERR(0, 827, __pyx_L1_error)
  __pyx_type_7psychxr_3ovr_4capi_ovrPoseStatef.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ovrPoseStatef", (PyObject *)&__pyx_type_7psychxr_3ovr_4capi_ovrPoseStatef) < 0) __PYX_ERR(0, 827, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_3ovr_4capi_ovrPoseStatef) < 0) __PYX_ERR(0, 827, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4capi_ovrPoseStatef = &__pyx_type_7psychxr_3ovr_4capi_ovrPoseStatef;
  if (PyType_Ready(&__pyx_type_7psychxr_3ovr_4capi_TrackingStateData) < 0) __PYX_ERR(0, 891, __pyx_L1_error)
  __pyx_type_7psychxr_3ovr_4capi_TrackingStateData.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "TrackingStateData", (PyObject *)&__pyx_type_7psychxr_3ovr_4capi_TrackingStateData) < 0) __PYX_ERR(0, 891, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_3ovr_4capi_TrackingStateData) < 0) __PYX_ERR(0, 891, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4capi_TrackingStateData = &__pyx_type_7psychxr_3ovr_4capi_TrackingStateData;
  if (PyType_Ready(&__pyx_type_7psychxr_3ovr_4capi_ovrMirrorTextureDesc) < 0) __PYX_ERR(0, 1145, __pyx_L1_error)
  __pyx_type_7psychxr_3ovr_4capi_ovrMirrorTextureDesc.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ovrMirrorTextureDesc", (PyObject *)&__pyx_type_7psychxr_3ovr_4capi_ovrMirrorTextureDesc) < 0) __PYX_ERR(0, 1145, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_3ovr_4capi_ovrMirrorTextureDesc) < 0) __PYX_ERR(0, 1145, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4capi_ovrMirrorTextureDesc = &__pyx_type_7psychxr_3ovr_4capi_ovrMirrorTextureDesc;
  if (PyType_Ready(&__pyx_type_7psychxr_3ovr_4capi_ovrSessionStatus) < 0) __PYX_ERR(0, 1238, __pyx_L1_error)
  __pyx_type_7psychxr_3ovr_4capi_ovrSessionStatus.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ovrSessionStatus", (PyObject *)&__pyx_type_7psychxr_3ovr_4capi_ovrSessionStatus) < 0) __PYX_ERR(0, 1238, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_3ovr_4capi_ovrSessionStatus) < 0) __PYX_ERR(0, 1238, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4capi_ovrSessionStatus = &__pyx_type_7psychxr_3ovr_4capi_ovrSessionStatus;
  if (PyType_Ready(&__pyx_type_7psychxr_3ovr_4capi_ovrInputState) < 0) __PYX_ERR(0, 1290, __pyx_L1_error)
  __pyx_type_7psychxr_3ovr_4capi_ovrInputState.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ovrInputState", (PyObject *)&__pyx_type_7psychxr_3ovr_4capi_ovrInputState) < 0) __PYX_ERR(0, 1290, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_3ovr_4capi_ovrInputState) < 0) __PYX_ERR(0, 1290, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4capi_ovrInputState = &__pyx_type_7psychxr_3ovr_4capi_ovrInputState;
  if (PyType_Ready(&__pyx_type_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame) < 0) __PYX_ERR(0, 1822, __pyx_L1_error)
  __pyx_type_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ovrPerfStatsPerCompositorFrame", (PyObject *)&__pyx_type_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame) < 0) __PYX_ERR(0, 1822, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame) < 0) __PYX_ERR(0, 1822, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame = &__pyx_type_7psychxr_3ovr_4capi_ovrPerfStatsPerCompositorFrame;
  if (PyType_Ready(&__pyx_type_7psychxr_3ovr_4capi_ovrPerfStats) < 0) __PYX_ERR(0, 1878, __pyx_L1_error)
  __pyx_type_7psychxr_3ovr_4capi_ovrPerfStats.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "ovrPerfStats", (PyObject *)&__pyx_type_7psychxr_3ovr_4capi_ovrPerfStats) < 0) __PYX_ERR(0, 1878, __pyx_L1_error)
  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_7psychxr_3ovr_4capi_ovrPerfStats) < 0) __PYX_ERR(0, 1878, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4capi_ovrPerfStats = &__pyx_type_7psychxr_3ovr_4capi_ovrPerfStats;
  /*--- Type import code ---*/
  __pyx_ptype_7psychxr_3ovr_4math_ovrVector2i = __Pyx_ImportType("psychxr.ovr.math", "ovrVector2i", sizeof(struct __pyx_obj_7psychxr_3ovr_4math_ovrVector2i), 1); if (unlikely(!__pyx_ptype_7psychxr_3ovr_4math_ovrVector2i)) __PYX_ERR(2, 4, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4math_ovrSizei = __Pyx_ImportType("psychxr.ovr.math", "ovrSizei", sizeof(struct __pyx_obj_7psychxr_3ovr_4math_ovrSizei), 1); if (unlikely(!__pyx_ptype_7psychxr_3ovr_4math_ovrSizei)) __PYX_ERR(2, 8, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4math_ovrRecti = __Pyx_ImportType("psychxr.ovr.math", "ovrRecti", sizeof(struct __pyx_obj_7psychxr_3ovr_4math_ovrRecti), 1); if (unlikely(!__pyx_ptype_7psychxr_3ovr_4math_ovrRecti)) __PYX_ERR(2, 12, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4math_ovrVector3f = __Pyx_ImportType("psychxr.ovr.math", "ovrVector3f", sizeof(struct __pyx_obj_7psychxr_3ovr_4math_ovrVector3f), 1); if (unlikely(!__pyx_ptype_7psychxr_3ovr_4math_ovrVector3f)) __PYX_ERR(2, 16, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4math_ovrFovPort = __Pyx_ImportType("psychxr.ovr.math", "ovrFovPort", sizeof(struct __pyx_obj_7psychxr_3ovr_4math_ovrFovPort), 1); if (unlikely(!__pyx_ptype_7psychxr_3ovr_4math_ovrFovPort)) __PYX_ERR(2, 20, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4math_ovrQuatf = __Pyx_ImportType("psychxr.ovr.math", "ovrQuatf", sizeof(struct __pyx_obj_7psychxr_3ovr_4math_ovrQuatf), 1); if (unlikely(!__pyx_ptype_7psychxr_3ovr_4math_ovrQuatf)) __PYX_ERR(2, 24, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4math_ovrPosef = __Pyx_ImportType("psychxr.ovr.math", "ovrPosef", sizeof(struct __pyx_obj_7psychxr_3ovr_4math_ovrPosef), 1); if (unlikely(!__pyx_ptype_7psychxr_3ovr_4math_ovrPosef)) __PYX_ERR(2, 28, __pyx_L1_error)
  __pyx_ptype_7psychxr_3ovr_4math_ovrMatrix4f = __Pyx_ImportType("psychxr.ovr.math", "ovrMatrix4f", sizeof(struct __pyx_obj_7psychxr_3ovr_4math_ovrMatrix4f), 1); if (unlikely(!__pyx_ptype_7psychxr_3ovr_4math_ovrMatrix4f)) __PYX_ERR(2, 32, __pyx_L1_error)
  /*--- Variable import code ---*/
  /*--- 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

  /* "psychxr/ovr/capi.pyx":41
 * cimport libc.math as cmath
 * from libc.stdint cimport int32_t
 * import OpenGL.GL as GL             # <<<<<<<<<<<<<<
 * 
 * # -----------------
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_n_s__32);
  __Pyx_GIVEREF(__pyx_n_s__32);
  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__32);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_OpenGL_GL, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_GL, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":60
 * # Frame index
 * #
 * cdef long long _frame_index_ = 0             # <<<<<<<<<<<<<<
 * 
 * # create an array of texture swap chains
 */
  __pyx_v_7psychxr_3ovr_4capi__frame_index_ = 0;

  /* "psychxr/ovr/capi.pyx":68
 * # mirror texture swap chain, we only create one here
 * #
 * cdef ovr_capi.ovrMirrorTexture _mirror_texture_ = NULL             # <<<<<<<<<<<<<<
 * 
 * # Persistent VR related structures to store head pose and other data used across
 */
  __pyx_v_7psychxr_3ovr_4capi__mirror_texture_ = NULL;

  /* "psychxr/ovr/capi.pyx":88
 * #
 * cdef ovr_errorcode.ovrErrorInfo _last_error_info_  # store our last error here
 * def check_result(result):             # <<<<<<<<<<<<<<
 *     if ovr_errorcode.OVR_FAILURE(result):
 *         ovr_capi.ovr_GetLastErrorInfo(&_last_error_info_)
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_3ovr_4capi_1check_result, NULL, __pyx_n_s_psychxr_ovr_capi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_check_result, __pyx_t_2) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":99
 * # associated message passed from LibOVR.
 * #
 * debug_mode = False             # <<<<<<<<<<<<<<
 * 
 * # Controller indices in controller state array.
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_debug_mode, Py_False) < 0) __PYX_ERR(0, 99, __pyx_L1_error)

  /* "psychxr/ovr/capi.pyx":119
 * #
 * cdef dict ctrl_index_lut = {
 *     "xbox": LibOVRControllers.xbox,             # <<<<<<<<<<<<<<
 *     "remote": LibOVRControllers.remote,
 *     "touch": LibOVRControllers.touch,
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From___pyx_t_7psychxr_3ovr_4capi_LibOVRControllers(__pyx_e_7psychxr_3ovr_4capi_xbox); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xbox, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":120
 * cdef dict ctrl_index_lut = {
 *     "xbox": LibOVRControllers.xbox,
 *     "remote": LibOVRControllers.remote,             # <<<<<<<<<<<<<<
 *     "touch": LibOVRControllers.touch,
 *     "left_touch": LibOVRControllers.left_touch,
 */
  __pyx_t_1 = __Pyx_PyInt_From___pyx_t_7psychxr_3ovr_4capi_LibOVRControllers(__pyx_e_7psychxr_3ovr_4capi_remote); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_remote, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":121
 *     "xbox": LibOVRControllers.xbox,
 *     "remote": LibOVRControllers.remote,
 *     "touch": LibOVRControllers.touch,             # <<<<<<<<<<<<<<
 *     "left_touch": LibOVRControllers.left_touch,
 *     "right_touch": LibOVRControllers.right_touch
 */
  __pyx_t_1 = __Pyx_PyInt_From___pyx_t_7psychxr_3ovr_4capi_LibOVRControllers(__pyx_e_7psychxr_3ovr_4capi_touch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_touch, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":122
 *     "remote": LibOVRControllers.remote,
 *     "touch": LibOVRControllers.touch,
 *     "left_touch": LibOVRControllers.left_touch,             # <<<<<<<<<<<<<<
 *     "right_touch": LibOVRControllers.right_touch
 * }
 */
  __pyx_t_1 = __Pyx_PyInt_From___pyx_t_7psychxr_3ovr_4capi_LibOVRControllers(__pyx_e_7psychxr_3ovr_4capi_left_touch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_left_touch, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":123
 *     "touch": LibOVRControllers.touch,
 *     "left_touch": LibOVRControllers.left_touch,
 *     "right_touch": LibOVRControllers.right_touch             # <<<<<<<<<<<<<<
 * }
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From___pyx_t_7psychxr_3ovr_4capi_LibOVRControllers(__pyx_e_7psychxr_3ovr_4capi_right_touch); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_right_touch, __pyx_t_1) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_XGOTREF(__pyx_v_7psychxr_3ovr_4capi_ctrl_index_lut);
  __Pyx_DECREF_SET(__pyx_v_7psychxr_3ovr_4capi_ctrl_index_lut, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":129
 * #
 * cdef dict ctrl_button_lut = {
 *     "A": ovr_capi.ovrButton_A,             # <<<<<<<<<<<<<<
 *     "B": ovr_capi.ovrButton_B,
 *     "RThumb" : ovr_capi.ovrButton_RThumb,
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(20); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_A); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_A, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":130
 * cdef dict ctrl_button_lut = {
 *     "A": ovr_capi.ovrButton_A,
 *     "B": ovr_capi.ovrButton_B,             # <<<<<<<<<<<<<<
 *     "RThumb" : ovr_capi.ovrButton_RThumb,
 *     "RShoulder": ovr_capi.ovrButton_RShoulder,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_B); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_B, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":131
 *     "A": ovr_capi.ovrButton_A,
 *     "B": ovr_capi.ovrButton_B,
 *     "RThumb" : ovr_capi.ovrButton_RThumb,             # <<<<<<<<<<<<<<
 *     "RShoulder": ovr_capi.ovrButton_RShoulder,
 *     "X": ovr_capi.ovrButton_X,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_RThumb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_RThumb, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":132
 *     "B": ovr_capi.ovrButton_B,
 *     "RThumb" : ovr_capi.ovrButton_RThumb,
 *     "RShoulder": ovr_capi.ovrButton_RShoulder,             # <<<<<<<<<<<<<<
 *     "X": ovr_capi.ovrButton_X,
 *     "Y": ovr_capi.ovrButton_Y,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_RShoulder); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_RShoulder, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":133
 *     "RThumb" : ovr_capi.ovrButton_RThumb,
 *     "RShoulder": ovr_capi.ovrButton_RShoulder,
 *     "X": ovr_capi.ovrButton_X,             # <<<<<<<<<<<<<<
 *     "Y": ovr_capi.ovrButton_Y,
 *     "LThumb": ovr_capi.ovrButton_LThumb,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_X); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_X, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":134
 *     "RShoulder": ovr_capi.ovrButton_RShoulder,
 *     "X": ovr_capi.ovrButton_X,
 *     "Y": ovr_capi.ovrButton_Y,             # <<<<<<<<<<<<<<
 *     "LThumb": ovr_capi.ovrButton_LThumb,
 *     "LShoulder": ovr_capi.ovrButton_LThumb,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_Y); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Y, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":135
 *     "X": ovr_capi.ovrButton_X,
 *     "Y": ovr_capi.ovrButton_Y,
 *     "LThumb": ovr_capi.ovrButton_LThumb,             # <<<<<<<<<<<<<<
 *     "LShoulder": ovr_capi.ovrButton_LThumb,
 *     "Up": ovr_capi.ovrButton_Up,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_LThumb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_LThumb, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":136
 *     "Y": ovr_capi.ovrButton_Y,
 *     "LThumb": ovr_capi.ovrButton_LThumb,
 *     "LShoulder": ovr_capi.ovrButton_LThumb,             # <<<<<<<<<<<<<<
 *     "Up": ovr_capi.ovrButton_Up,
 *     "Down": ovr_capi.ovrButton_Down,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_LThumb); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_LShoulder, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":137
 *     "LThumb": ovr_capi.ovrButton_LThumb,
 *     "LShoulder": ovr_capi.ovrButton_LThumb,
 *     "Up": ovr_capi.ovrButton_Up,             # <<<<<<<<<<<<<<
 *     "Down": ovr_capi.ovrButton_Down,
 *     "Left": ovr_capi.ovrButton_Left,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_Up); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Up, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":138
 *     "LShoulder": ovr_capi.ovrButton_LThumb,
 *     "Up": ovr_capi.ovrButton_Up,
 *     "Down": ovr_capi.ovrButton_Down,             # <<<<<<<<<<<<<<
 *     "Left": ovr_capi.ovrButton_Left,
 *     "Right": ovr_capi.ovrButton_Right,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_Down); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Down, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":139
 *     "Up": ovr_capi.ovrButton_Up,
 *     "Down": ovr_capi.ovrButton_Down,
 *     "Left": ovr_capi.ovrButton_Left,             # <<<<<<<<<<<<<<
 *     "Right": ovr_capi.ovrButton_Right,
 *     "Enter": ovr_capi.ovrButton_Enter,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_Left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Left, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":140
 *     "Down": ovr_capi.ovrButton_Down,
 *     "Left": ovr_capi.ovrButton_Left,
 *     "Right": ovr_capi.ovrButton_Right,             # <<<<<<<<<<<<<<
 *     "Enter": ovr_capi.ovrButton_Enter,
 *     "Back": ovr_capi.ovrButton_Back,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_Right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Right, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":141
 *     "Left": ovr_capi.ovrButton_Left,
 *     "Right": ovr_capi.ovrButton_Right,
 *     "Enter": ovr_capi.ovrButton_Enter,             # <<<<<<<<<<<<<<
 *     "Back": ovr_capi.ovrButton_Back,
 *     "VolUp": ovr_capi.ovrButton_VolUp,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_Enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Enter, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":142
 *     "Right": ovr_capi.ovrButton_Right,
 *     "Enter": ovr_capi.ovrButton_Enter,
 *     "Back": ovr_capi.ovrButton_Back,             # <<<<<<<<<<<<<<
 *     "VolUp": ovr_capi.ovrButton_VolUp,
 *     "VolDown": ovr_capi.ovrButton_VolDown,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_Back); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Back, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":143
 *     "Enter": ovr_capi.ovrButton_Enter,
 *     "Back": ovr_capi.ovrButton_Back,
 *     "VolUp": ovr_capi.ovrButton_VolUp,             # <<<<<<<<<<<<<<
 *     "VolDown": ovr_capi.ovrButton_VolDown,
 *     "Home": ovr_capi.ovrButton_Home,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_VolUp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_VolUp, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":144
 *     "Back": ovr_capi.ovrButton_Back,
 *     "VolUp": ovr_capi.ovrButton_VolUp,
 *     "VolDown": ovr_capi.ovrButton_VolDown,             # <<<<<<<<<<<<<<
 *     "Home": ovr_capi.ovrButton_Home,
 *     "Private": ovr_capi.ovrButton_Private,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_VolDown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 144, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_VolDown, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":145
 *     "VolUp": ovr_capi.ovrButton_VolUp,
 *     "VolDown": ovr_capi.ovrButton_VolDown,
 *     "Home": ovr_capi.ovrButton_Home,             # <<<<<<<<<<<<<<
 *     "Private": ovr_capi.ovrButton_Private,
 *     "RMask": ovr_capi.ovrButton_RMask,
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_Home); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Home, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":146
 *     "VolDown": ovr_capi.ovrButton_VolDown,
 *     "Home": ovr_capi.ovrButton_Home,
 *     "Private": ovr_capi.ovrButton_Private,             # <<<<<<<<<<<<<<
 *     "RMask": ovr_capi.ovrButton_RMask,
 *     "LMask": ovr_capi.ovrButton_LMask}
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_Private); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_Private, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":147
 *     "Home": ovr_capi.ovrButton_Home,
 *     "Private": ovr_capi.ovrButton_Private,
 *     "RMask": ovr_capi.ovrButton_RMask,             # <<<<<<<<<<<<<<
 *     "LMask": ovr_capi.ovrButton_LMask}
 * 
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_RMask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_RMask, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":148
 *     "Private": ovr_capi.ovrButton_Private,
 *     "RMask": ovr_capi.ovrButton_RMask,
 *     "LMask": ovr_capi.ovrButton_LMask}             # <<<<<<<<<<<<<<
 * 
 * # Python accessible list of valid button names.
 */
  __pyx_t_1 = __Pyx_PyInt_From_ovrButton(ovrButton_LMask); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_LMask, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_XGOTREF(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut);
  __Pyx_DECREF_SET(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut, ((PyObject*)__pyx_t_2));
  __Pyx_GIVEREF(__pyx_t_2);
  __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":151
 * 
 * # Python accessible list of valid button names.
 * button_names = list(ctrl_button_lut.keys())             # <<<<<<<<<<<<<<
 * 
 * # Look-up table of controller touches.
 */
  if (unlikely(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
    __PYX_ERR(0, 151, __pyx_L1_error)
  }
  __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_7psychxr_3ovr_4capi_ctrl_button_lut); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_button_names, __pyx_t_1) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":156
 * #
 * cdef dict ctrl_touch_lut = {
 *     "A": ovr_capi.ovrTouch_A,             # <<<<<<<<<<<<<<
 *     "B": ovr_capi.ovrTouch_B,
 *     "RThumb" : ovr_capi.ovrTouch_RThumb,
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_A); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_A, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":157
 * cdef dict ctrl_touch_lut = {
 *     "A": ovr_capi.ovrTouch_A,
 *     "B": ovr_capi.ovrTouch_B,             # <<<<<<<<<<<<<<
 *     "RThumb" : ovr_capi.ovrTouch_RThumb,
 *     "RThumbRest": ovr_capi.ovrTouch_RThumbRest,
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_B); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_B, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":158
 *     "A": ovr_capi.ovrTouch_A,
 *     "B": ovr_capi.ovrTouch_B,
 *     "RThumb" : ovr_capi.ovrTouch_RThumb,             # <<<<<<<<<<<<<<
 *     "RThumbRest": ovr_capi.ovrTouch_RThumbRest,
 *     "RIndexTrigger" : ovr_capi.ovrTouch_RThumb,
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_RThumb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_RThumb, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":159
 *     "B": ovr_capi.ovrTouch_B,
 *     "RThumb" : ovr_capi.ovrTouch_RThumb,
 *     "RThumbRest": ovr_capi.ovrTouch_RThumbRest,             # <<<<<<<<<<<<<<
 *     "RIndexTrigger" : ovr_capi.ovrTouch_RThumb,
 *     "X": ovr_capi.ovrTouch_X,
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_RThumbRest); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_RThumbRest, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":160
 *     "RThumb" : ovr_capi.ovrTouch_RThumb,
 *     "RThumbRest": ovr_capi.ovrTouch_RThumbRest,
 *     "RIndexTrigger" : ovr_capi.ovrTouch_RThumb,             # <<<<<<<<<<<<<<
 *     "X": ovr_capi.ovrTouch_X,
 *     "Y": ovr_capi.ovrTouch_Y,
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_RThumb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_RIndexTrigger, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":161
 *     "RThumbRest": ovr_capi.ovrTouch_RThumbRest,
 *     "RIndexTrigger" : ovr_capi.ovrTouch_RThumb,
 *     "X": ovr_capi.ovrTouch_X,             # <<<<<<<<<<<<<<
 *     "Y": ovr_capi.ovrTouch_Y,
 *     "LThumb": ovr_capi.ovrTouch_LThumb,
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_X); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_X, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":162
 *     "RIndexTrigger" : ovr_capi.ovrTouch_RThumb,
 *     "X": ovr_capi.ovrTouch_X,
 *     "Y": ovr_capi.ovrTouch_Y,             # <<<<<<<<<<<<<<
 *     "LThumb": ovr_capi.ovrTouch_LThumb,
 *     "LThumbRest": ovr_capi.ovrTouch_LThumbRest,
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_Y); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 162, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_Y, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":163
 *     "X": ovr_capi.ovrTouch_X,
 *     "Y": ovr_capi.ovrTouch_Y,
 *     "LThumb": ovr_capi.ovrTouch_LThumb,             # <<<<<<<<<<<<<<
 *     "LThumbRest": ovr_capi.ovrTouch_LThumbRest,
 *     "LIndexTrigger" : ovr_capi.ovrTouch_LIndexTrigger,
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_LThumb); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_LThumb, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":164
 *     "Y": ovr_capi.ovrTouch_Y,
 *     "LThumb": ovr_capi.ovrTouch_LThumb,
 *     "LThumbRest": ovr_capi.ovrTouch_LThumbRest,             # <<<<<<<<<<<<<<
 *     "LIndexTrigger" : ovr_capi.ovrTouch_LIndexTrigger,
 *     "RIndexPointing": ovr_capi.ovrTouch_RIndexPointing,
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_LThumbRest); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_LThumbRest, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":165
 *     "LThumb": ovr_capi.ovrTouch_LThumb,
 *     "LThumbRest": ovr_capi.ovrTouch_LThumbRest,
 *     "LIndexTrigger" : ovr_capi.ovrTouch_LIndexTrigger,             # <<<<<<<<<<<<<<
 *     "RIndexPointing": ovr_capi.ovrTouch_RIndexPointing,
 *     "RThumbUp": ovr_capi.ovrTouch_RThumbUp,
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_LIndexTrigger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_LIndexTrigger, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":166
 *     "LThumbRest": ovr_capi.ovrTouch_LThumbRest,
 *     "LIndexTrigger" : ovr_capi.ovrTouch_LIndexTrigger,
 *     "RIndexPointing": ovr_capi.ovrTouch_RIndexPointing,             # <<<<<<<<<<<<<<
 *     "RThumbUp": ovr_capi.ovrTouch_RThumbUp,
 *     "LIndexPointing": ovr_capi.ovrTouch_LIndexPointing,
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_RIndexPointing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_RIndexPointing, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":167
 *     "LIndexTrigger" : ovr_capi.ovrTouch_LIndexTrigger,
 *     "RIndexPointing": ovr_capi.ovrTouch_RIndexPointing,
 *     "RThumbUp": ovr_capi.ovrTouch_RThumbUp,             # <<<<<<<<<<<<<<
 *     "LIndexPointing": ovr_capi.ovrTouch_LIndexPointing,
 *     "LThumbUp": ovr_capi.ovrTouch_LThumbUp}
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_RThumbUp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_RThumbUp, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":168
 *     "RIndexPointing": ovr_capi.ovrTouch_RIndexPointing,
 *     "RThumbUp": ovr_capi.ovrTouch_RThumbUp,
 *     "LIndexPointing": ovr_capi.ovrTouch_LIndexPointing,             # <<<<<<<<<<<<<<
 *     "LThumbUp": ovr_capi.ovrTouch_LThumbUp}
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_LIndexPointing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_LIndexPointing, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":169
 *     "RThumbUp": ovr_capi.ovrTouch_RThumbUp,
 *     "LIndexPointing": ovr_capi.ovrTouch_LIndexPointing,
 *     "LThumbUp": ovr_capi.ovrTouch_LThumbUp}             # <<<<<<<<<<<<<<
 * 
 * # Python accessible list of valid touch names.
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTouch(ovrTouch_LThumbUp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_LThumbUp, __pyx_t_2) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_XGOTREF(__pyx_v_7psychxr_3ovr_4capi_ctrl_touch_lut);
  __Pyx_DECREF_SET(__pyx_v_7psychxr_3ovr_4capi_ctrl_touch_lut, ((PyObject*)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "psychxr/ovr/capi.pyx":172
 * 
 * # Python accessible list of valid touch names.
 * touch_names = list(ctrl_touch_lut.keys())             # <<<<<<<<<<<<<<
 * 
 * # Performance information for profiling.
 */
  if (unlikely(__pyx_v_7psychxr_3ovr_4capi_ctrl_touch_lut == Py_None)) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys");
    __PYX_ERR(0, 172, __pyx_L1_error)
  }
  __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_v_7psychxr_3ovr_4capi_ctrl_touch_lut); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_touch_names, __pyx_t_2) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":236
 * # --------------------
 * #
 * def allocSwapChain(ovrTextureSwapChainDesc swap_desc):             # <<<<<<<<<<<<<<
 *     """Allocate a new swap chain object with the specified parameters. If
 *     successful, an integer is returned which is used to reference the swap
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_3ovr_4capi_3allocSwapChain, NULL, __pyx_n_s_psychxr_ovr_capi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_allocSwapChain, __pyx_t_2) < 0) __PYX_ERR(0, 236, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":269
 * # call.
 * #
 * def freeSwapChain(int sc):             # <<<<<<<<<<<<<<
 *     """Free or destroy a swap chain. The handle will be made available after
 *     this call.
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_3ovr_4capi_5freeSwapChain, NULL, __pyx_n_s_psychxr_ovr_capi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_freeSwapChain, __pyx_t_2) < 0) __PYX_ERR(0, 269, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":284
 * # value as a frame buffer texture.
 * #
 * def getTextureSwapChainBufferGL(int sc):             # <<<<<<<<<<<<<<
 *     cdef int current_idx = 0
 *     cdef unsigned int tex_id = 0
 */
  __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_7psychxr_3ovr_4capi_7getTextureSwapChainBufferGL, NULL, __pyx_n_s_psychxr_ovr_capi); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_getTextureSwapChainBufferGL, __pyx_t_2) < 0) __PYX_ERR(0, 284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":495
 * #
 * # layer header flags
 * ovrLayerFlag_HighQuality = 0x01             # <<<<<<<<<<<<<<
 * ovrLayerFlag_TextureOriginAtBottomLeft = 0x02
 * ovrLayerFlag_HeadLocked = 0x04
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerFlag_HighQuality, __pyx_int_1) < 0) __PYX_ERR(0, 495, __pyx_L1_error)

  /* "psychxr/ovr/capi.pyx":496
 * # layer header flags
 * ovrLayerFlag_HighQuality = 0x01
 * ovrLayerFlag_TextureOriginAtBottomLeft = 0x02             # <<<<<<<<<<<<<<
 * ovrLayerFlag_HeadLocked = 0x04
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerFlag_TextureOriginAtBott, __pyx_int_2) < 0) __PYX_ERR(0, 496, __pyx_L1_error)

  /* "psychxr/ovr/capi.pyx":497
 * ovrLayerFlag_HighQuality = 0x01
 * ovrLayerFlag_TextureOriginAtBottomLeft = 0x02
 * ovrLayerFlag_HeadLocked = 0x04             # <<<<<<<<<<<<<<
 * 
 * # Texture types supported by the PC version of LibOVR
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerFlag_HeadLocked, __pyx_int_4) < 0) __PYX_ERR(0, 497, __pyx_L1_error)

  /* "psychxr/ovr/capi.pyx":501
 * # Texture types supported by the PC version of LibOVR
 * #
 * ovrTexture_2D = ovr_capi.ovrTexture_2D             # <<<<<<<<<<<<<<
 * ovrTexture_Cube = ovr_capi.ovrTexture_Cube
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureType(ovrTexture_2D); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrTexture_2D, __pyx_t_2) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":502
 * #
 * ovrTexture_2D = ovr_capi.ovrTexture_2D
 * ovrTexture_Cube = ovr_capi.ovrTexture_Cube             # <<<<<<<<<<<<<<
 * 
 * # Texture formats supported by OpenGL
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureType(ovrTexture_Cube); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrTexture_Cube, __pyx_t_2) < 0) __PYX_ERR(0, 502, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":506
 * # Texture formats supported by OpenGL
 * #
 * OVR_FORMAT_R8G8B8A8_UNORM = ovr_capi.OVR_FORMAT_R8G8B8A8_UNORM             # <<<<<<<<<<<<<<
 * OVR_FORMAT_R8G8B8A8_UNORM_SRGB = ovr_capi.OVR_FORMAT_R8G8B8A8_UNORM_SRGB
 * OVR_FORMAT_B8G8R8A8_UNORM = ovr_capi.OVR_FORMAT_B8G8R8A8_UNORM
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_R8G8B8A8_UNORM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OVR_FORMAT_R8G8B8A8_UNORM, __pyx_t_2) < 0) __PYX_ERR(0, 506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":507
 * #
 * OVR_FORMAT_R8G8B8A8_UNORM = ovr_capi.OVR_FORMAT_R8G8B8A8_UNORM
 * OVR_FORMAT_R8G8B8A8_UNORM_SRGB = ovr_capi.OVR_FORMAT_R8G8B8A8_UNORM_SRGB             # <<<<<<<<<<<<<<
 * OVR_FORMAT_B8G8R8A8_UNORM = ovr_capi.OVR_FORMAT_B8G8R8A8_UNORM
 * OVR_FORMAT_B8G8R8_UNORM = ovr_capi.OVR_FORMAT_B8G8R8_UNORM
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_R8G8B8A8_UNORM_SRGB); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OVR_FORMAT_R8G8B8A8_UNORM_SRGB, __pyx_t_2) < 0) __PYX_ERR(0, 507, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":508
 * OVR_FORMAT_R8G8B8A8_UNORM = ovr_capi.OVR_FORMAT_R8G8B8A8_UNORM
 * OVR_FORMAT_R8G8B8A8_UNORM_SRGB = ovr_capi.OVR_FORMAT_R8G8B8A8_UNORM_SRGB
 * OVR_FORMAT_B8G8R8A8_UNORM = ovr_capi.OVR_FORMAT_B8G8R8A8_UNORM             # <<<<<<<<<<<<<<
 * OVR_FORMAT_B8G8R8_UNORM = ovr_capi.OVR_FORMAT_B8G8R8_UNORM
 * OVR_FORMAT_R16G16B16A16_FLOAT = ovr_capi.OVR_FORMAT_R16G16B16A16_FLOAT
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_B8G8R8A8_UNORM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OVR_FORMAT_B8G8R8A8_UNORM, __pyx_t_2) < 0) __PYX_ERR(0, 508, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":509
 * OVR_FORMAT_R8G8B8A8_UNORM_SRGB = ovr_capi.OVR_FORMAT_R8G8B8A8_UNORM_SRGB
 * OVR_FORMAT_B8G8R8A8_UNORM = ovr_capi.OVR_FORMAT_B8G8R8A8_UNORM
 * OVR_FORMAT_B8G8R8_UNORM = ovr_capi.OVR_FORMAT_B8G8R8_UNORM             # <<<<<<<<<<<<<<
 * OVR_FORMAT_R16G16B16A16_FLOAT = ovr_capi.OVR_FORMAT_R16G16B16A16_FLOAT
 * OVR_FORMAT_R11G11B10_FLOAT = ovr_capi.OVR_FORMAT_R11G11B10_FLOAT
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_B8G8R8_UNORM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OVR_FORMAT_B8G8R8_UNORM, __pyx_t_2) < 0) __PYX_ERR(0, 509, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":510
 * OVR_FORMAT_B8G8R8A8_UNORM = ovr_capi.OVR_FORMAT_B8G8R8A8_UNORM
 * OVR_FORMAT_B8G8R8_UNORM = ovr_capi.OVR_FORMAT_B8G8R8_UNORM
 * OVR_FORMAT_R16G16B16A16_FLOAT = ovr_capi.OVR_FORMAT_R16G16B16A16_FLOAT             # <<<<<<<<<<<<<<
 * OVR_FORMAT_R11G11B10_FLOAT = ovr_capi.OVR_FORMAT_R11G11B10_FLOAT
 * OVR_FORMAT_D16_UNORM = ovr_capi.OVR_FORMAT_D16_UNORM
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_R16G16B16A16_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OVR_FORMAT_R16G16B16A16_FLOAT, __pyx_t_2) < 0) __PYX_ERR(0, 510, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":511
 * OVR_FORMAT_B8G8R8_UNORM = ovr_capi.OVR_FORMAT_B8G8R8_UNORM
 * OVR_FORMAT_R16G16B16A16_FLOAT = ovr_capi.OVR_FORMAT_R16G16B16A16_FLOAT
 * OVR_FORMAT_R11G11B10_FLOAT = ovr_capi.OVR_FORMAT_R11G11B10_FLOAT             # <<<<<<<<<<<<<<
 * OVR_FORMAT_D16_UNORM = ovr_capi.OVR_FORMAT_D16_UNORM
 * OVR_FORMAT_D24_UNORM_S8_UINT = ovr_capi.OVR_FORMAT_D24_UNORM_S8_UINT
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_R11G11B10_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OVR_FORMAT_R11G11B10_FLOAT, __pyx_t_2) < 0) __PYX_ERR(0, 511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":512
 * OVR_FORMAT_R16G16B16A16_FLOAT = ovr_capi.OVR_FORMAT_R16G16B16A16_FLOAT
 * OVR_FORMAT_R11G11B10_FLOAT = ovr_capi.OVR_FORMAT_R11G11B10_FLOAT
 * OVR_FORMAT_D16_UNORM = ovr_capi.OVR_FORMAT_D16_UNORM             # <<<<<<<<<<<<<<
 * OVR_FORMAT_D24_UNORM_S8_UINT = ovr_capi.OVR_FORMAT_D24_UNORM_S8_UINT
 * OVR_FORMAT_D32_FLOAT = ovr_capi.OVR_FORMAT_D32_FLOAT
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_D16_UNORM); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OVR_FORMAT_D16_UNORM, __pyx_t_2) < 0) __PYX_ERR(0, 512, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":513
 * OVR_FORMAT_R11G11B10_FLOAT = ovr_capi.OVR_FORMAT_R11G11B10_FLOAT
 * OVR_FORMAT_D16_UNORM = ovr_capi.OVR_FORMAT_D16_UNORM
 * OVR_FORMAT_D24_UNORM_S8_UINT = ovr_capi.OVR_FORMAT_D24_UNORM_S8_UINT             # <<<<<<<<<<<<<<
 * OVR_FORMAT_D32_FLOAT = ovr_capi.OVR_FORMAT_D32_FLOAT
 * OVR_FORMAT_D32_FLOAT_S8X24_UINT = ovr_capi.OVR_FORMAT_D32_FLOAT_S8X24_UINT
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_D24_UNORM_S8_UINT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OVR_FORMAT_D24_UNORM_S8_UINT, __pyx_t_2) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":514
 * OVR_FORMAT_D16_UNORM = ovr_capi.OVR_FORMAT_D16_UNORM
 * OVR_FORMAT_D24_UNORM_S8_UINT = ovr_capi.OVR_FORMAT_D24_UNORM_S8_UINT
 * OVR_FORMAT_D32_FLOAT = ovr_capi.OVR_FORMAT_D32_FLOAT             # <<<<<<<<<<<<<<
 * OVR_FORMAT_D32_FLOAT_S8X24_UINT = ovr_capi.OVR_FORMAT_D32_FLOAT_S8X24_UINT
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_D32_FLOAT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OVR_FORMAT_D32_FLOAT, __pyx_t_2) < 0) __PYX_ERR(0, 514, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":515
 * OVR_FORMAT_D24_UNORM_S8_UINT = ovr_capi.OVR_FORMAT_D24_UNORM_S8_UINT
 * OVR_FORMAT_D32_FLOAT = ovr_capi.OVR_FORMAT_D32_FLOAT
 * OVR_FORMAT_D32_FLOAT_S8X24_UINT = ovr_capi.OVR_FORMAT_D32_FLOAT_S8X24_UINT             # <<<<<<<<<<<<<<
 * 
 * cdef class ovrTextureSwapChainDesc:
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrTextureFormat(OVR_FORMAT_D32_FLOAT_S8X24_UINT); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_OVR_FORMAT_D32_FLOAT_S8X24_UINT, __pyx_t_2) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":526
 *     def __cinit__(
 *             self,
 *             int type=ovrTexture_2D,             # <<<<<<<<<<<<<<
 *             int _format=OVR_FORMAT_R8G8B8A8_UNORM_SRGB,
 *             int width=800,
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ovrTexture_2D); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 526, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k__7 = __pyx_t_3;

  /* "psychxr/ovr/capi.pyx":527
 *             self,
 *             int type=ovrTexture_2D,
 *             int _format=OVR_FORMAT_R8G8B8A8_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *             int width=800,
 *             int height=600,
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OVR_FORMAT_R8G8B8A8_UNORM_SRGB); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 527, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k__8 = __pyx_t_3;

  /* "psychxr/ovr/capi.pyx":646
 * 
 * # types
 * ovrLayerType_EyeFov = ovr_capi.ovrLayerType_EyeFov             # <<<<<<<<<<<<<<
 * 
 * # layer header flags
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrLayerType(ovrLayerType_EyeFov); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerType_EyeFov, __pyx_t_2) < 0) __PYX_ERR(0, 646, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":649
 * 
 * # layer header flags
 * ovrLayerFlag_HighQuality = ovr_capi.ovrLayerFlag_HighQuality             # <<<<<<<<<<<<<<
 * ovrLayerFlag_TextureOriginAtBottomLeft = ovr_capi.ovrLayerFlag_TextureOriginAtBottomLeft
 * ovrLayerFlag_HeadLocked = ovr_capi.ovrLayerFlag_HeadLocked
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlag_HighQuality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerFlag_HighQuality, __pyx_t_2) < 0) __PYX_ERR(0, 649, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":650
 * # layer header flags
 * ovrLayerFlag_HighQuality = ovr_capi.ovrLayerFlag_HighQuality
 * ovrLayerFlag_TextureOriginAtBottomLeft = ovr_capi.ovrLayerFlag_TextureOriginAtBottomLeft             # <<<<<<<<<<<<<<
 * ovrLayerFlag_HeadLocked = ovr_capi.ovrLayerFlag_HeadLocked
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlag_TextureOriginAtBottomLeft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerFlag_TextureOriginAtBott, __pyx_t_2) < 0) __PYX_ERR(0, 650, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":651
 * ovrLayerFlag_HighQuality = ovr_capi.ovrLayerFlag_HighQuality
 * ovrLayerFlag_TextureOriginAtBottomLeft = ovr_capi.ovrLayerFlag_TextureOriginAtBottomLeft
 * ovrLayerFlag_HeadLocked = ovr_capi.ovrLayerFlag_HeadLocked             # <<<<<<<<<<<<<<
 * 
 * ovrEye_Left = ovr_capi.ovrEye_Left
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlag_HeadLocked); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerFlag_HeadLocked, __pyx_t_2) < 0) __PYX_ERR(0, 651, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":653
 * ovrLayerFlag_HeadLocked = ovr_capi.ovrLayerFlag_HeadLocked
 * 
 * ovrEye_Left = ovr_capi.ovrEye_Left             # <<<<<<<<<<<<<<
 * ovrEye_Right = ovr_capi.ovrEye_Right
 * ovrEye_Count = ovr_capi.ovrEye_Count
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrEyeType(ovrEye_Left); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrEye_Left, __pyx_t_2) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":654
 * 
 * ovrEye_Left = ovr_capi.ovrEye_Left
 * ovrEye_Right = ovr_capi.ovrEye_Right             # <<<<<<<<<<<<<<
 * ovrEye_Count = ovr_capi.ovrEye_Count
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrEyeType(ovrEye_Right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrEye_Right, __pyx_t_2) < 0) __PYX_ERR(0, 654, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":655
 * ovrEye_Left = ovr_capi.ovrEye_Left
 * ovrEye_Right = ovr_capi.ovrEye_Right
 * ovrEye_Count = ovr_capi.ovrEye_Count             # <<<<<<<<<<<<<<
 * 
 * cpdef ovrSizei getFovTextureSize(
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrEyeType(ovrEye_Count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrEye_Count, __pyx_t_2) < 0) __PYX_ERR(0, 655, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":888
 * 
 * 
 * ovrStatus_OrientationTracked = ovr_capi.ovrStatus_OrientationTracked             # <<<<<<<<<<<<<<
 * ovrStatus_PositionTracked = ovr_capi.ovrStatus_PositionTracked
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrStatusBits(ovrStatus_OrientationTracked); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrStatus_OrientationTracked, __pyx_t_2) < 0) __PYX_ERR(0, 888, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":889
 * 
 * ovrStatus_OrientationTracked = ovr_capi.ovrStatus_OrientationTracked
 * ovrStatus_PositionTracked = ovr_capi.ovrStatus_PositionTracked             # <<<<<<<<<<<<<<
 * 
 * cdef class TrackingStateData(object):
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrStatusBits(ovrStatus_PositionTracked); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrStatus_PositionTracked, __pyx_t_2) < 0) __PYX_ERR(0, 889, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1137
 * # ------------------------
 * #
 * ovrMirrorOption_Default = ovr_capi.ovrMirrorOption_Default             # <<<<<<<<<<<<<<
 * ovrMirrorOption_PostDistortion = ovr_capi.ovrMirrorOption_PostDistortion
 * ovrMirrorOption_LeftEyeOnly = ovr_capi.ovrMirrorOption_LeftEyeOnly
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_Default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrMirrorOption_Default, __pyx_t_2) < 0) __PYX_ERR(0, 1137, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1138
 * #
 * ovrMirrorOption_Default = ovr_capi.ovrMirrorOption_Default
 * ovrMirrorOption_PostDistortion = ovr_capi.ovrMirrorOption_PostDistortion             # <<<<<<<<<<<<<<
 * ovrMirrorOption_LeftEyeOnly = ovr_capi.ovrMirrorOption_LeftEyeOnly
 * ovrMirrorOption_RightEyeOnly = ovr_capi.ovrMirrorOption_RightEyeOnly
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_PostDistortion); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrMirrorOption_PostDistortion, __pyx_t_2) < 0) __PYX_ERR(0, 1138, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1139
 * ovrMirrorOption_Default = ovr_capi.ovrMirrorOption_Default
 * ovrMirrorOption_PostDistortion = ovr_capi.ovrMirrorOption_PostDistortion
 * ovrMirrorOption_LeftEyeOnly = ovr_capi.ovrMirrorOption_LeftEyeOnly             # <<<<<<<<<<<<<<
 * ovrMirrorOption_RightEyeOnly = ovr_capi.ovrMirrorOption_RightEyeOnly
 * ovrMirrorOption_IncludeGuardian = ovr_capi.ovrMirrorOption_IncludeGuardian
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_LeftEyeOnly); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrMirrorOption_LeftEyeOnly, __pyx_t_2) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1140
 * ovrMirrorOption_PostDistortion = ovr_capi.ovrMirrorOption_PostDistortion
 * ovrMirrorOption_LeftEyeOnly = ovr_capi.ovrMirrorOption_LeftEyeOnly
 * ovrMirrorOption_RightEyeOnly = ovr_capi.ovrMirrorOption_RightEyeOnly             # <<<<<<<<<<<<<<
 * ovrMirrorOption_IncludeGuardian = ovr_capi.ovrMirrorOption_IncludeGuardian
 * ovrMirrorOption_IncludeNotifications = ovr_capi.ovrMirrorOption_IncludeNotifications
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_RightEyeOnly); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrMirrorOption_RightEyeOnly, __pyx_t_2) < 0) __PYX_ERR(0, 1140, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1141
 * ovrMirrorOption_LeftEyeOnly = ovr_capi.ovrMirrorOption_LeftEyeOnly
 * ovrMirrorOption_RightEyeOnly = ovr_capi.ovrMirrorOption_RightEyeOnly
 * ovrMirrorOption_IncludeGuardian = ovr_capi.ovrMirrorOption_IncludeGuardian             # <<<<<<<<<<<<<<
 * ovrMirrorOption_IncludeNotifications = ovr_capi.ovrMirrorOption_IncludeNotifications
 * ovrMirrorOption_IncludeSystemGui = ovr_capi.ovrMirrorOption_IncludeSystemGui
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_IncludeGuardian); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrMirrorOption_IncludeGuardian, __pyx_t_2) < 0) __PYX_ERR(0, 1141, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1142
 * ovrMirrorOption_RightEyeOnly = ovr_capi.ovrMirrorOption_RightEyeOnly
 * ovrMirrorOption_IncludeGuardian = ovr_capi.ovrMirrorOption_IncludeGuardian
 * ovrMirrorOption_IncludeNotifications = ovr_capi.ovrMirrorOption_IncludeNotifications             # <<<<<<<<<<<<<<
 * ovrMirrorOption_IncludeSystemGui = ovr_capi.ovrMirrorOption_IncludeSystemGui
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_IncludeNotifications); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrMirrorOption_IncludeNotificat, __pyx_t_2) < 0) __PYX_ERR(0, 1142, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1143
 * ovrMirrorOption_IncludeGuardian = ovr_capi.ovrMirrorOption_IncludeGuardian
 * ovrMirrorOption_IncludeNotifications = ovr_capi.ovrMirrorOption_IncludeNotifications
 * ovrMirrorOption_IncludeSystemGui = ovr_capi.ovrMirrorOption_IncludeSystemGui             # <<<<<<<<<<<<<<
 * 
 * cdef class ovrMirrorTextureDesc:
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOption_IncludeSystemGui); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrMirrorOption_IncludeSystemGui, __pyx_t_2) < 0) __PYX_ERR(0, 1143, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1153
 *     def __cinit__(
 *             self,
 *             int _format=OVR_FORMAT_R8G8B8A8_UNORM_SRGB,             # <<<<<<<<<<<<<<
 *             int width=800,
 *             int height=600,
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_OVR_FORMAT_R8G8B8A8_UNORM_SRGB); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k__18 = __pyx_t_3;

  /* "psychxr/ovr/capi.pyx":1156
 *             int width=800,
 *             int height=600,
 *             int mirrorOptions=ovrMirrorOption_Default):             # <<<<<<<<<<<<<<
 * 
 *         self.c_ovrMirrorTextureDesc.Format = <ovr_capi.ovrTextureFormat>_format
 */
  __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ovrMirrorOption_Default); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1156, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_k__19 = __pyx_t_3;

  /* "psychxr/ovr/capi.pyx":1227
 * 
 * # types
 * ovrLayerType_EyeFov = ovr_capi.ovrLayerType_EyeFov             # <<<<<<<<<<<<<<
 * 
 * # layer header flags
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrLayerType(ovrLayerType_EyeFov); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerType_EyeFov, __pyx_t_2) < 0) __PYX_ERR(0, 1227, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1230
 * 
 * # layer header flags
 * ovrLayerFlag_HighQuality = ovr_capi.ovrLayerFlag_HighQuality             # <<<<<<<<<<<<<<
 * ovrLayerFlag_TextureOriginAtBottomLeft = ovr_capi.ovrLayerFlag_TextureOriginAtBottomLeft
 * ovrLayerFlag_HeadLocked = ovr_capi.ovrLayerFlag_HeadLocked
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlag_HighQuality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerFlag_HighQuality, __pyx_t_2) < 0) __PYX_ERR(0, 1230, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1231
 * # layer header flags
 * ovrLayerFlag_HighQuality = ovr_capi.ovrLayerFlag_HighQuality
 * ovrLayerFlag_TextureOriginAtBottomLeft = ovr_capi.ovrLayerFlag_TextureOriginAtBottomLeft             # <<<<<<<<<<<<<<
 * ovrLayerFlag_HeadLocked = ovr_capi.ovrLayerFlag_HeadLocked
 * 
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlag_TextureOriginAtBottomLeft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerFlag_TextureOriginAtBott, __pyx_t_2) < 0) __PYX_ERR(0, 1231, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1232
 * ovrLayerFlag_HighQuality = ovr_capi.ovrLayerFlag_HighQuality
 * ovrLayerFlag_TextureOriginAtBottomLeft = ovr_capi.ovrLayerFlag_TextureOriginAtBottomLeft
 * ovrLayerFlag_HeadLocked = ovr_capi.ovrLayerFlag_HeadLocked             # <<<<<<<<<<<<<<
 * 
 * # ------------------------
 */
  __pyx_t_2 = __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlag_HeadLocked); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ovrLayerFlag_HeadLocked, __pyx_t_2) < 0) __PYX_ERR(0, 1232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1786
 * # other method.
 * #
 * controller_names = ['xbox', 'remote', 'touch', 'left_touch', 'right_touch']             # <<<<<<<<<<<<<<
 * 
 * cpdef list getConnectedControllerTypes():
 */
  __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_xbox);
  __Pyx_GIVEREF(__pyx_n_s_xbox);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_xbox);
  __Pyx_INCREF(__pyx_n_s_remote);
  __Pyx_GIVEREF(__pyx_n_s_remote);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_remote);
  __Pyx_INCREF(__pyx_n_s_touch);
  __Pyx_GIVEREF(__pyx_n_s_touch);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_touch);
  __Pyx_INCREF(__pyx_n_s_left_touch);
  __Pyx_GIVEREF(__pyx_n_s_left_touch);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_left_touch);
  __Pyx_INCREF(__pyx_n_s_right_touch);
  __Pyx_GIVEREF(__pyx_n_s_right_touch);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_right_touch);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_controller_names, __pyx_t_2) < 0) __PYX_ERR(0, 1786, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1956
 * # List of available performance HUD modes.
 * #
 * available_hud_modes = [             # <<<<<<<<<<<<<<
 *     'Off',
 *     'PerfSummary',
 */
  __pyx_t_2 = PyList_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_Off);
  __Pyx_GIVEREF(__pyx_n_s_Off);
  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Off);
  __Pyx_INCREF(__pyx_n_s_PerfSummary);
  __Pyx_GIVEREF(__pyx_n_s_PerfSummary);
  PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_PerfSummary);
  __Pyx_INCREF(__pyx_n_s_LatencyTiming);
  __Pyx_GIVEREF(__pyx_n_s_LatencyTiming);
  PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_LatencyTiming);
  __Pyx_INCREF(__pyx_n_s_AppRenderTiming);
  __Pyx_GIVEREF(__pyx_n_s_AppRenderTiming);
  PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_AppRenderTiming);
  __Pyx_INCREF(__pyx_n_s_CompRenderTiming);
  __Pyx_GIVEREF(__pyx_n_s_CompRenderTiming);
  PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_CompRenderTiming);
  __Pyx_INCREF(__pyx_n_s_AswStats);
  __Pyx_GIVEREF(__pyx_n_s_AswStats);
  PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_AswStats);
  __Pyx_INCREF(__pyx_n_s_VersionInfo);
  __Pyx_GIVEREF(__pyx_n_s_VersionInfo);
  PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_VersionInfo);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_available_hud_modes, __pyx_t_2) < 0) __PYX_ERR(0, 1956, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "psychxr/ovr/capi.pyx":1
 * #  =============================================================================             # <<<<<<<<<<<<<<
 * #  Oculus(TM) Rift SDK Python Interface Module
 * #  =============================================================================
 */
  __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;

  /* "ovr_errorcode.pxd":126
 *     return result == ovrSuccessType.ovrSuccess
 * 
 * cdef inline int OVR_FAILURE(ovrResult result):             # <<<<<<<<<<<<<<
 *     return not OVR_SUCCESS(result)
 */

  /*--- 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 psychxr.ovr.capi", 0, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init psychxr.ovr.capi");
  }
  __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((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#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;
}

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->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

/* 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;
    }
    length = stop - start;
    if (unlikely(length <= 0))
        return PyUnicode_FromUnicode(NULL, 0);
    cstring += start;
    if (decode_func) {
        return decode_func(cstring, length, errors);
    } else {
        return PyUnicode_Decode(cstring, length, encoding, errors);
    }
}

/* 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_COMPILING_IN_PYPY
        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);
#else
        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);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* 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_CheckExact(key)) || 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
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(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
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(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;
}

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

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

/* GetModuleGlobalName */
static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
    result = PyDict_GetItem(__pyx_d, name);
    if (likely(result)) {
        Py_INCREF(result);
    } else {
#else
    result = PyObject_GetItem(__pyx_d, name);
    if (!result) {
        PyErr_Clear();
#endif
        result = __Pyx_GetBuiltinName(name);
    }
    return result;
}

/* 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)));
    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)meth)) (self, args, nargs, NULL);
    } else {
        return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
    }
}
#endif

/* PyFunctionFastCall */
  #if CYTHON_FAST_PYCALL
#include "frameobject.h"
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 = f->f_localsplus;
    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, int 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, nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif
#endif

/* 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 (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
            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

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

/* 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((0 <= wrapped_i) & (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((0 <= wrapped_i) & (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((n >= 0) & (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((n >= 0) & (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));
}

/* 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();
#ifdef _MSC_VER
    else state = (PyGILState_STATE)-1;
#endif
#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
}

/* 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_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_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
}

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

/* 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);
  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_reduce_ex = NULL;
    PyObject *reduce = NULL;
    PyObject *reduce_ex = NULL;
    PyObject *reduce_cython = NULL;
    PyObject *setstate = NULL;
    PyObject *setstate_cython = NULL;
#if CYTHON_USE_PYTYPE_LOOKUP
    if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
#else
    if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
#endif
#if CYTHON_USE_PYTYPE_LOOKUP
    object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#else
    object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
#endif
    reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto 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 BAD;
#else
        object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
#endif
        reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
        if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
            reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
            ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
            ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto 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_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
                ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
                ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
            }
            PyType_Modified((PyTypeObject*)type_obj);
        }
    }
    goto GOOD;
BAD:
    if (!PyErr_Occurred())
        PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
    ret = -1;
GOOD:
#if !CYTHON_USE_PYTYPE_LOOKUP
    Py_XDECREF(object_reduce);
    Py_XDECREF(object_reduce_ex);
#endif
    Py_XDECREF(reduce);
    Py_XDECREF(reduce_ex);
    Py_XDECREF(reduce_cython);
    Py_XDECREF(setstate);
    Py_XDECREF(setstate_cython);
    return ret;
}

/* 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 (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, 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;
}

/* 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);
    }
#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;
}

/* py_dict_keys */
  static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_keys, d);
    else
        return PyDict_Keys(d);
}

/* 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
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
      use_cline = PyDict_GetItem(*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;
        PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (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"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    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);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    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;
    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) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __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);
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From___pyx_t_7psychxr_3ovr_4capi_LibOVRControllers(__pyx_t_7psychxr_3ovr_4capi_LibOVRControllers value) {
    const __pyx_t_7psychxr_3ovr_4capi_LibOVRControllers neg_one = (__pyx_t_7psychxr_3ovr_4capi_LibOVRControllers) -1, const_zero = (__pyx_t_7psychxr_3ovr_4capi_LibOVRControllers) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(__pyx_t_7psychxr_3ovr_4capi_LibOVRControllers) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(__pyx_t_7psychxr_3ovr_4capi_LibOVRControllers) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(__pyx_t_7psychxr_3ovr_4capi_LibOVRControllers) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(__pyx_t_7psychxr_3ovr_4capi_LibOVRControllers) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(__pyx_t_7psychxr_3ovr_4capi_LibOVRControllers) <= 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(__pyx_t_7psychxr_3ovr_4capi_LibOVRControllers),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrButton(ovrButton value) {
    const ovrButton neg_one = (ovrButton) -1, const_zero = (ovrButton) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrButton) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrButton) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrButton) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrButton) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrButton) <= 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(ovrButton),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTouch(ovrTouch value) {
    const ovrTouch neg_one = (ovrTouch) -1, const_zero = (ovrTouch) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrTouch) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrTouch) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTouch) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrTouch) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTouch) <= 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(ovrTouch),
                                     little, !is_unsigned);
    }
}

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

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTextureType(ovrTextureType value) {
    const ovrTextureType neg_one = (ovrTextureType) -1, const_zero = (ovrTextureType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrTextureType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrTextureType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTextureType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrTextureType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTextureType) <= 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(ovrTextureType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrTextureFormat(ovrTextureFormat value) {
    const ovrTextureFormat neg_one = (ovrTextureFormat) -1, const_zero = (ovrTextureFormat) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrTextureFormat) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrTextureFormat) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTextureFormat) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrTextureFormat) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrTextureFormat) <= 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(ovrTextureFormat),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrLayerType(ovrLayerType value) {
    const ovrLayerType neg_one = (ovrLayerType) -1, const_zero = (ovrLayerType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrLayerType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrLayerType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrLayerType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrLayerType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrLayerType) <= 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(ovrLayerType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrLayerFlags(ovrLayerFlags value) {
    const ovrLayerFlags neg_one = (ovrLayerFlags) -1, const_zero = (ovrLayerFlags) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrLayerFlags) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrLayerFlags) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrLayerFlags) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrLayerFlags) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrLayerFlags) <= 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(ovrLayerFlags),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrEyeType(ovrEyeType value) {
    const ovrEyeType neg_one = (ovrEyeType) -1, const_zero = (ovrEyeType) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrEyeType) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrEyeType) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrEyeType) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrEyeType) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrEyeType) <= 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(ovrEyeType),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrStatusBits(ovrStatusBits value) {
    const ovrStatusBits neg_one = (ovrStatusBits) -1, const_zero = (ovrStatusBits) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrStatusBits) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrStatusBits) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrStatusBits) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrStatusBits) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrStatusBits) <= 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(ovrStatusBits),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_ovrMirrorOptions(ovrMirrorOptions value) {
    const ovrMirrorOptions neg_one = (ovrMirrorOptions) -1, const_zero = (ovrMirrorOptions) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(ovrMirrorOptions) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(ovrMirrorOptions) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrMirrorOptions) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(ovrMirrorOptions) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(ovrMirrorOptions) <= 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(ovrMirrorOptions),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(int32_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(int32_t),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    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);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) {
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(unsigned int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(unsigned int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(unsigned int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(unsigned 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(unsigned int),
                                     little, !is_unsigned);
    }
}

/* CIntToPy */
  static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    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);
    }
}

static PyObject* __pyx_convert__to_py_ovrSizei(ovrSizei s) {
    PyObject* res;
    PyObject* member;
    res = __Pyx_PyDict_NewPresized(2); if (unlikely(!res)) return NULL;
    member = __Pyx_PyInt_From_int(s.w); if (unlikely(!member)) goto bad;
    if (unlikely(PyDict_SetItem(res, __pyx_n_s_w, member) < 0)) goto bad;
    Py_DECREF(member);
    member = __Pyx_PyInt_From_int(s.h); if (unlikely(!member)) goto bad;
    if (unlikely(PyDict_SetItem(res, __pyx_n_s_h, member) < 0)) goto bad;
    Py_DECREF(member);
    return res;
    bad:
    Py_XDECREF(member);
    Py_DECREF(res);
    return NULL;
  }
  /* CIntFromPy */
  static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    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 unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) {
    const unsigned int neg_one = (unsigned int) -1, const_zero = (unsigned int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(unsigned int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (unsigned 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 (unsigned int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(unsigned int, digit, digits[0])
                case 2:
                    if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 2 * PyLong_SHIFT) {
                            return (unsigned int) (((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) >= 3 * PyLong_SHIFT) {
                            return (unsigned int) (((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) >= 4 * PyLong_SHIFT) {
                            return (unsigned int) (((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned 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 (unsigned int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(unsigned int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned 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 (unsigned int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(unsigned int, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(unsigned int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(unsigned int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(unsigned int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                            return (unsigned int) ((((((unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(unsigned int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(unsigned int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                            return (unsigned int) ((((((((unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(unsigned int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned int) (((unsigned int)-1)*(((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(unsigned int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(unsigned 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(unsigned int) - 1 > 4 * PyLong_SHIFT) {
                            return (unsigned int) ((((((((((unsigned int)digits[3]) << PyLong_SHIFT) | (unsigned int)digits[2]) << PyLong_SHIFT) | (unsigned int)digits[1]) << PyLong_SHIFT) | (unsigned int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(unsigned int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(unsigned int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(unsigned 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
            unsigned 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 (unsigned int) -1;
        }
    } else {
        unsigned int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (unsigned int) -1;
        val = __Pyx_PyInt_As_unsigned_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to unsigned int");
    return (unsigned int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to unsigned int");
    return (unsigned int) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int32_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 (int32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 2 * PyLong_SHIFT) {
                            return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 3 * PyLong_SHIFT) {
                            return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_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(int32_t) >= 4 * PyLong_SHIFT) {
                            return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_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 (int32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_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 (int32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int32_t, sdigit, (sdigit) (-(sdigit)digits[0]))
                case  1: __PYX_VERIFY_RETURN_INT(int32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_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(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_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(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
            } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_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
            int32_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 (int32_t) -1;
        }
    } else {
        int32_t val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int32_t) -1;
        val = __Pyx_PyInt_As_int32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int32_t");
    return (int32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int32_t");
    return (int32_t) -1;
}

/* CIntFromPy */
  static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    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;
}

/* 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 CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *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[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        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;
}

/* ModuleImport */
  #ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

/* TypeImport */
  #ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (!strict && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    else if ((size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd",
            module_name, class_name, basicsize, size);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

/* 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)
            PyErr_Clear();
        ++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 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(x);
  }
#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 PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
