249 points · by fschuett · 1y ago · 95 comments
The default Windows installer bundles the compiler and a text editor to make poking at C to get graphics on the screen (accelerated or not) a 1 step process. Raylib is also extremely cross platform, has bindings in about every language, and has extra (also header only, 0 dependency) optional libraries for many adjacent things like audio or text rendering.
When I first started to learn C/C++ in the 2000s I spent more time fighting the IDE/Windows/GCC or getting SDL/SFML to compile than I did actually playing with code - and then it all fell apart when I tried to get it working on both Linux and Windows so I said fuck it and ignored that kind of programming for many years. Raylib is about going the opposite direction - start poking at C code (or whatever binding) and having it break and worry about the environment later when you're ready for something else.
Although I may imagine newbies may face some challenges dealing with compiler flags.
What should be minimized is the accidental complication of compiling libraries and programs, for example convoluted build systems and C++ modules.
And sure you can do 3d rendering on modern CPUs. It's just better on GPUs. Like thousands of times better.
(Mar 5 2022) TinyGL 0.4.1 is out (Changelog)
(Mar 17 2002) TinyGL 0.4 is out (Changelog)
"our plans are measured in centuries"
Funny how history turns out.
It seems to have more features and limited support for multithreading, with more recent updates compared to the original project. Sadly it was archived in late 2023.
[1] https://news.ycombinator.com/item?id=45270981
[2] https://totenarctanz.itch.io/a-scavenging-trip
Really cool news about raylib. I will seriously consider using this.
Ha! That’s what I’m stuck with for Metropolis 1998. I have to use the ancient OpenGL fixed function pipeline (thankfully I discovered an AB extension function in the gl.h file that allows addition fields to be passed to the GPU).
I’m using SFML for the graphics framework which I think is OpenGL 1.x
Game to show what’s possible: https://store.steampowered.com/app/2287430/Metropolis_1998/
Any way I can buy you a beer?
It is possible to "pay what you'd like" on itch though :) [1]
The demo up there is in pre-alpha, but I push out a big update every 4-6 months.
Why do you have to and do you also use parts of the old immediate-mode API?
https://home.otoy.com/render/octane-render
Other is making use of mesh shaders, which you need a recent graphics card for it, still making its way across the ecosystem.
https://developer.nvidia.com/blog/introduction-turing-mesh-s...
Basically the idea is to throw away yet again the current set of execution pipelines, and have only two kinds of shaders, mesh shaders which are general purpose compute units that can be combined together, and task shaders which have the role to orchestrate the execution of mesh shaders.
So basically you can write graphics algorithms like in the software rendering days, with whatever approach one decides to do, without having to try to fit them into the traditional GPU pipeline, yet running on the graphics card instead of the GPU.
This is how approaches like Nanite came to be as well.
https://dev.epicgames.com/documentation/en-us/unreal-engine/...
How many lines to implement OpenGL 2.0 (non ES) ?
You also need to implement multitexturing (probably the easy part) but also all the texture combiner stuff too. This one is not hard but also a good chunk of code...
All in all, at least 40K if you ask me, but that's a very lowball estimate.
Of course if you don't care about implementing the full spec, you can get away with a lot less.
https://github.com/rswinkle/PortableGL
Cool project, and fun to play with.
Glad you found it fun to play with, that's what it's for. Hoping to have a new release in the next week or so, and there have been some serious/breaking changes since the last so hopefully it goes well.
And on the topic of this thread, PGL is overkill for raylib's software rendering backend since they don't need arbitrary shader support, but I would still love to try making PGL a raylib backend someday because it would be cool and running the entire set of Raylib examples would be a great stress test. Plus then I could use raylib to make a game with PGL, win-win.
In a similar way, this implements just enough so Raylib's OpenGL backend can run! It was done so you can use the library without external graphics dependencies if you really want to.