Getting started with OpenGL in Elixir
wtfleming.github.io
wtfleming.github.io
What other reason do we need? Regarding practical reasons: To stay inside of one language while doing something that would benefit by having a GUI and/or 3d graphics support. Perhaps erlang/elixir aren't the most performant for things like video games, that doesn't mean interesting work can't be done pairing them with OpenGL (or other graphics libraries).
Also nothing keeping the performance critical stuff being delegated out to a NIF.
I recently subscribed to the excellent Elixir Sips screencast series [0] and there're a bunch of OpenGL episodes there too.
Most modern engines are fighting the fight of how to deal with multiple cores--how to create microtasks that can be scheduled across worker cores, how to handle task stealing, how to implement lots of independent actors without bugs, how to do hot-upgrading of code, how to handle networking, and how to do all of this with a user staring at any frame-to-frame inconsistency.
Erlang/OTP and Elixir have those problems decently well solved. It makes sense to cordon off the graphics into just enough C/Rust to get OpenGL up with a scene graph or whatever, and then leave the rest of the game logic in a better language.
The idea of being able to just use thirty years of language research on a pragmatic and simple platform (the Erlang/Elxiir BEAM) is very intriguing.
My next big project in Elixir is probably going to be a proof-of-concept for a physics engine. With that done, everything else is pretty obvious.
If anything can realistically break the death-grip of C/C++ on the industry, this might be it.
The saving grace that I'm betting on is the scheduler.
The fact that the language loudly claims that "Incorrectness is simply not allowed. It's pointless to try to get stuff done if you can't guarantee the result is correct." and then talks about FFI to native C code kinda strikes me as hubris.
Erlang/Elixir is more "Hey, fuck it, here's NIFs, but they have clear drawbacks which sometimes are outweighed by benefits" and "Here's ports, which Do The Right Thing if you want to call out to a native application that can explode and not hurt anything else."
The other useful bits, networking and whatnot, seem way better developed in the other ecosystem as well.
That said, if you get it working on erlang, so much the better, and good luck whichever way you go, sounds awesome!
Like I said, not quite my use case, but I may find a use for it yet. :)