Haha, and here's the commit from Jan 31 that is exactly the same as the hack I just made to the kernel last night. It's pretty fun I can look at the commit history like that. Open source development is awesome! Thanks, Andrzej!
Oi! The FunctionFS system in the Linux Kernel is really cool for creating USB devices in userspace, but it's not quite as configurable as I'd like it to be.
It doesn't seem to support USB 3 speeds at all, and if you try for USB 2 "HighSpeed", FunctionFS limits you to "FullSpeed" instead. Womp womp.
It took a custom hack to the FunctionFS kernel module, but I finally got my USB device working at the speeds I want. =) (for now).
Not sure if that's the right solution long-term, but it'll do for now.
Here's an example of depth buffering from a more complicated application that uses Kludge: molecule rendering.
This is an N-terminal Alanine molecule rendered in a space-filling style.
Those spheres are actually not meshes. They're rendered directly in the fragment shader, so they're pixel-perfect at any resolution. The fragment shader generates the depth information too.
Here's some fully-working sample code if you want to see how to use depth buffers in Kludge:
Even though the blue triangle is drawn after the red one, it has a farther z value, so it gets clipped by depth buffer testing.
Definitely wish more hardware makers would include physical on/off switches.
Have to say, bindgen is pretty great, but it took a while to get it working due to kbuild. Not bindgen's fault.
And the rustc error messages are just super helpful. Crate and rustup are amazing too!
Overall, the Rust ecosystem is really inviting and I hope I don't have to write much more C code in the future. =)
Still learning #Rust because JVM interop with C code just isn't great. Looks like trying to interface with the Linux kernel using Rust was about the un-gentle-est introduction I could have possibly attempted.
Nevertheless, I will persist.
I've been working a lot with low-level system libraries and OS functions lately. I've been finding that my usual dev platform (#Kotlin on JVM) has way too much friction with C interop.
So I'm learning some #Rust now to see if that's better. Looking good so far! Rust has a great onboarding experience! Even for my fancy cross-compiling case.
I've noticed a pattern in my dev work lately. I'll often bang my head against a problem for a few hours one afternoon, unable to mentally crack the issue, only to leave work, enjoy my evening, and come in the next morning to solve the problem in less than 15 minutes. #getsomerest
I'm planning to use the GPU on my little single-board-computer to do some interesting stuff. I'm working on a JVM-based tech-stack though (because #Kotlin is amazing), so there's no better library for GPU support than #LWJGL 3!
I managed to get LWJGL 3 to cross-compile to an aarch64 platform. If you're curious, see how here:
Entrepreneur, Developer, Scientist
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!