-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access to Mesh fields. #17
Comments
Yes, definitely! I should find some time this weekend to add them |
I added the getters and setters to the module and added the mesh_generation example, see here. |
I'll do a new release to opam soon so other people can use it. Until then, you can build from source. If you run into any troubles, feel free to comment here again, then I will repon the ticket |
Hello again. I am not ctypes expert so I have a question. When in this code Thanks. |
What are the issues you've encountered? I notice that when I force gc in the example with
I suspect that raylib tries to free the memory even though that's handled by the OCaml GC in this case? I didn't have any problems at runtime though and get no errors if I just don't call |
I was generating a number of meshes (with ~1k vertices) and noticed visual glitches when drawing them. Some refined pseudocode:
Then I observed |
Hello. As currently implemented mesh manipulations are fragile:
I've managed to come up with the following workarounds:
But I presume since Raylib itself is positioned as a tool for those who tries to avoid meddling with low-level stuff this workarounds are not obvious. Probably it should be done in the library itself. Or at least the issues should be noted in documentation. |
Thanks for keeping up on this. I agree that those interactions are not obvious and are best handled in the bindings (somehow). For the second issue I'm not so sure though |
Is it possible to add bindings to access
Mesh
fields which is useful for mesh generation like here?I've seen such bindings in old version of raylib-ocaml (0.2.0 I think), but it seems to be gone now for some reason.
The text was updated successfully, but these errors were encountered: