electronstudio / raylib-python-cffi

Python CFFI bindings for Raylib
http://electronstudio.github.io/raylib-python-cffi
Eclipse Public License 2.0
142 stars 29 forks source link

pyray example is broken #27

Closed makew0rld closed 3 years ago

makew0rld commented 3 years ago

Using the code and README as of 39b52c5, the pyray example doesn't work on my Linux machine. The static example does however.

Error log:

RAYLIB STATIC LOADED
INFO: Initializing raylib 3.5
INFO: DISPLAY: Device initialized successfully
INFO:     > Display size: 1920 x 1080
INFO:     > Render size:  800 x 450
INFO:     > Screen size:  800 x 450
INFO:     > Viewport offsets: 0, 0
INFO: GLAD: OpenGL extensions loaded successfully
INFO: GL: OpenGL 3.3 Core profile supported
INFO: GL: OpenGL device information:
INFO:     > Vendor:   Intel
INFO:     > Renderer: Mesa Intel(R) UHD Graphics 620 (KBL GT2)
INFO:     > Version:  4.6 (Core Profile) Mesa 20.3.4
INFO:     > GLSL:     4.60
INFO: GL: Supported extensions count: 223
INFO: GL: DXT compressed textures supported
INFO: GL: ETC2/EAC compressed textures supported
INFO: GL: Anisotropic textures filtering supported (max: 16X)
INFO: TEXTURE: [ID 1] Texture created successfully (1x1 - 1 mipmaps)
INFO: TEXTURE: [ID 1] Default texture loaded successfully
INFO: SHADER: [ID 1] Compiled successfully
INFO: SHADER: [ID 2] Compiled successfully
INFO: SHADER: [ID 3] Program loaded successfully
INFO: SHADER: [ID 3] Default shader loaded successfully
INFO: RLGL: Internal vertex buffers initialized successfully in RAM (CPU)
INFO: RLGL: Render batch vertex buffers loaded successfully
INFO: RLGL: Default state initialized successfully
INFO: TEXTURE: [ID 2] Texture created successfully (128x128 - 1 mipmaps)
INFO: FONT: Default font loaded successfully
INFO: TIMER: Target time per frame: 16.667 milliseconds
Traceback (most recent call last):
  File "/home/makeworld/Desktop/Coding/Python/raylib-sandbox/main.py", line 13, in <module>
    pyray.update_camera(pyray.pointer(camera))
  File "/home/makeworld/Desktop/Coding/Python/raylib-sandbox/raylib/pyray.py", line 21, in func
    modified_args.append(ffi.addressof(arg))
TypeError: expected a cdata struct/union/array object

The window flashes on the screen for a second then disappears.

electronstudio commented 3 years ago

guess this is fixed?