mastodon.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
The original server operated by the Mastodon gGmbH non-profit

Administered by:

Server stats:

354K
active users

#vala

1 post1 participant0 posts today

Muahahaha! Working on the #sdl3 #vala Vapis

So, after changing a bunch of things in the vapis, pulling my hair understanding the SDL3 GPU (is this one of the easy ones? by the gods!), and ensuring things are actually working in the vapi.

But I finally did it. I got the SDL TTF GPU test program work on vala! It needs a ton of cleanup and put in comments, but it works!!! 🎉.

It took me a while because Graphics are hard to grasp, and also real life. I'll upload it as soon as I can. #gamedev #sdl

Can I get a @vala_lang FLOSS hacker interested in this fine newcomers-difficulty-level UX issue to solve in ?

I tried starting to fix it myself a year ago and couldn't figure out how to get past my initial attempt to check the horizontal vs vertical orientation of the layout. I could try again (if I'm desperate enough), but would need a pair programming session with a enthusiast… or such an enthusiast could probably solve it by themselves in half an hour: gitlab.gnome.org/GNOME/gitg/-/

GitLabAbility to turn off unneeded columns in the history view (or automatically turn off non-essential ones when width is constrained) to reduce visual overload and horizontal scrolling (#424) · Issues · GNOME / gitg · GitLabDue to commit 6593323c, version 45.alpha from flatpak...

Woot! Managed to compile and run the first GPU sample in #sdl3 and #vala

It took me a while to fix some structs and stuff in the binding and understand better ownership of everything in vala, especially when pasing things like structs to arrays and whatnot.

But at least it works now! Not sure about leaks but oh well, I'll check later.

I'm going to rest now and later clean it all up and upload to the repo, but feel accomplished in making it work. 😀

I'm getting clobbered trying to implement the #sdl3 #vala bindings GPU samples. I'm adapting/stealing them from TheSpyDog's SDL GPU samples github.

Not a graphics programmer and relatively new to vala, so its been interesting.

Was getting a crash and I forgot that I can debug the executables with GDB on terminal, which is nice.

Ran GDB, one look at the stack and the line of code and the solution was obvious lol. This happens because I'm a caveman and I rarely use a debugger.

A bunch of more news! From the #sdl3 #vala bindings workshop!

SDL_ttf has been implemented! 🎉

I even added a simple example that shows fallback emoji fonts!

This needs more examples though to really show how to use SDL_ttf on Vala with better feature like test engines, GPU and more.

Check it out here: github.com/edwood-grant/sdl3-v

Vala bindings for SDL3. Contribute to edwood-grant/sdl3-vapi development by creating an account on GitHub.
GitHubGitHub - edwood-grant/sdl3-vapi: Vala bindings for SDL3Vala bindings for SDL3. Contribute to edwood-grant/sdl3-vapi development by creating an account on GitHub.

Ok! Three things about the #SDL3 #vala vapi bindings.

1. I updated it with some fixes and decisions made around some enums that have some aliases and "break" the to_string () method.

2. SDL_Image was released a while ago!

3. It was actually easy to implement in the vapi! This means that SDL3_Image is now implemented as a new vapi file!!

You can use SDL Image by adding the sdl3-image package and use the SDL3.Image namespace.

You can check that out now!

github.com/edwood-grant/sdl3-v

Vala bindings for SDL3. Contribute to edwood-grant/sdl3-vapi development by creating an account on GitHub.
GitHubGitHub - edwood-grant/sdl3-vapi: Vala bindings for SDL3Vala bindings for SDL3. Contribute to edwood-grant/sdl3-vapi development by creating an account on GitHub.

Folks! Finally! I have published the #sdl3 #vala bindings! I'm a bit scared, I have never released bindings to the public. github.com/edwood-grant/sdl3-v

There are samples, some tests have been made, and some paltry docs can be generated.

Is this perfect? Not at all, is likely having tons of problems somewhere within many calls I haven't tested at all.

But it's usable, at least for the basic SDL3 samples. Any contributions, issues, PR, whatever your mind can think of are very welcome.

Vala bindings for SDL3. Contribute to edwood-grant/sdl3-vapi development by creating an account on GitHub.
GitHubGitHub - edwood-grant/sdl3-vapi: Vala bindings for SDL3Vala bindings for SDL3. Contribute to edwood-grant/sdl3-vapi development by creating an account on GitHub.

Last week I found this talk, and now I understand what I am actually doing. In #Vala, but also elsewhere: "Glue work"

youtu.be/KClAPipnKqw

And this type of work is probably what I can do best. I don't think I am a great coder, documentation writer, or designer. I don't even enjoy these activities that much, most of the time I do them because nobody else is, and I procrastinate them away a lot.

On the other side I enjoy and do a lot of onboarding, user support, discussing new features etc..

You already contributed to ?
- Code
- Bindings
- Documentation
- User Support
- Issue triaging
- Reviewing merge requests
- Testing nightly version
- Social Media and advocacy

Any of the above? (Or something else we forgot) If yes and its more than one time, consider applying for a Foundation membership! It is not difficult!

The writing of the whole #sdl3 Vapi for #vala is done!

Now, is it working? Well I started to port the SDL3 examples browser to find out.

There were some snags about truly learning about CCode attributes (oh, so that's why SimpleType and Compact exist! Or my favorite: I forgot to put has_type_id=false everywhere!)

But the goods news is that the render examples are all complete! I need to check more stuff and finish the current samples but it's very close to release!

Got news! The #sdl3 #vala VAPI is going well!

Only two files left to translate: SDL_audio.h and SDL_gpu.h admittedly the newer stuff. I feel this is getting close to finally release it somewhere.

Is it perfect? No way, it's highly likely borked in places. But it's a start to begin fixing things and receive help from more capable people 😀.

Not sure where to put this... I know Gnome has a GitLab… or maybe just on GitHub? Not sure about it.

Anyway, feeling good about this one.

In my work creating the #SDL3 bindings for #vala, I noticed for example stdinc.h. It's huge! And some of it makes little sense to adapt to #vala.
I understand the goal, and it's to provide a full translation of the standard c library so you can compile SDL even in places where there is no std. Thus to bring truly full portability.
But it makes little sense in vala. It already has glibc behind. But then what would be a really necessary addition? It can be complex to do it right. 1/2
#sdl #gamedev

So I managed to use callbacks on #sdl3 and #Vala, but it's weird.

You basically have to manually add CCode on your own if you want to use SDL_MAIN_USE_CALLBACKS.

It makes more sense to use SDL_MAIN_HANDLED and then invoke SDL_EnterAppMainCallbacks (enter_app_main_callbacks in vala) yourself to add your custom callbacks. Feels easier and looks less awkward.

When I release this vapi on the open, this would probably a part where help on how to make this nice would be very useful.