This repository has been archived on 2025-06-21. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
raylib-python-cffi/raylib/dynamic_binding/__init__.py
2019-05-21 17:51:54 +01:00

15 lines
414 B
Python

"""
This is an attempt at a CFFI dynamic (ABI) binding. However, it fails to work in the exactly same place the ctypes binding fails, accessing
materials of a model.
"""
import pathlib
MODULE = pathlib.Path(__file__).parent.parent
from cffi import FFI
ffi = FFI()
ffi.cdef(open(MODULE / "raylib_modified.h").read().replace('RLAPI ', ''))
raylib = ffi.dlopen(str(MODULE)+"/dynamic_binding/libraylib.2.dylib")