-
Notifications
You must be signed in to change notification settings - Fork 3
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
OOP Library #4
base: main
Are you sure you want to change the base?
OOP Library #4
Conversation
… to it for testing purposes.
…ed out some Raylib functions with RaylibOOP equivalents
Hey! This looks awesome and I agree going down the library path is best, main thing that prevented me from working on a VAPI for it was; as you said, how massive it would end up! Let me know when you think everything 2D wise is sorted and I have no issues with merging this across :-) |
… into your source code. For use with .from_memory loading
…s on the source file size.
Vala seems to produce quite of a bit of warnings on GCC 13. So I added some -Wno args to disable them to stop clogging the output.
Shapes.Rectangle needs to be made before I can continue.
Aw yeah, back in action! Gonna start re-creating the examples from Raylib upstream as that'll be a good way to indicate what needs to be implemented. As a sidenote, I love that Raylib is API stable, so I don't feel rushed at all to accomplish this =D Like, 6.0 could come out tomorrow, and i'd probably have to do minimal effort to get it working with it. |
Also moved the 2D Draw functions out of Window and into 2DCamera
…aw_line() I didn't know this, but depending on the function used, raylib uses a different technique to draw it. This can cause unexpected behavior.
This is so I don't have to override get and set methods. Makes the code simpler.
Found out if I want to make all the examples, I gotta add raymath to the vapi file, and then OOP it 😅 |
Ah yes! I was working on a raymath VAPI a while ago but couldn't work out an easy way to make it 'portable' and usable without the raylib VAPI itself |
Interestingly, a lot of the float math functions are already methods in vala's float object (Such as Now as for adding those functions to the vapi, i'm gonna err on the side of simplicity and just add it into it's own namespace |
Hi, I was wondering what your specific issue here was? |
If I remember correctly, I was getting type errors at compilation. However, I think it was only an issue on 0.48, the one that comes with RHEL 8 |
ah I see. If the errors are still there it might be fixable with attributes. |
Add Enums to Gamepad Class
Just a heads up I will be updating the base VAPI to raylib 5.5 in the coming days, will try not to touch anything else to avoid further conflicts! 😄 |
Raysan is pretty good about backwards compatibility, so it shouldn't break anything... I hope lol |
This isn't currently done, and i'm more opening this as a way to go "Hey, this exists."
This pull request basically adds a library that abstracts Raylib into a more Vala-like experience. The reason I went down the library route instead of doing it directly through the vapi was because I quickly realized it would make the raylib vapi a massive 10,000+ line unmaintainable monstrosity. This also allows the ability to keep the more c-like API alongside the OOP API.
This also has an unattended consequence of making it work on any language that supports GObject Introspection.
Another thing I did was add Raylib as a subproject, so people could use this binding as a subproject for their own projects and have the full stack.
The Util namespace just contains functions that I made to help me out, and thought it'd be useful in general.
The code is also documented, so using
valadoc
will create pretty good documentation.Now, I don't think i'll be able to get around to doing the 3D stuff, as I don't really do anything with 3D.
With a bunnymark score of around 62,000 before it dips below 60fps. I'd say it performs pretty well, as well!