Closed JackWitherell closed 2 years ago
the issue is we added auto pointerization to pyray, so if the C function takes a pointer the python argument gets automatically turned into a pointer. in this case it's already a pointer, so we shouldn't do pointerization.
i guess i will have to add a special case for when it's already a pointer. Ideally python programmers wouldn't have to use ffi.new and would just supply a python float, but I don't know how that could be done automatically.
Good call, but changing that float pointer to a float causes it to fail as well.
This is specific to pyray. raylib as rl
works as intended with code like what's above (but of course with the non-pythonic API)
Yeah, problem is we can't pointerize a python float, it's not the same thing as a C float.
You can mix raylib/pyray code in same program to get round this until it's fixed.
Please update to raylib-4.0.0.4 and test. Both of your examples, the one with the float* and the one with 0.0 should now work.
Setting the uniform of a shader doesn't work in pyray as early as 4.0.0.2, still fails in 4.0.0.3 Platform - Windows (this issue is likely platform independent)
Issue - Following the example causes an error
TypeError: expected a cdata struct/union/array object
Example: