Rlsw – Raylib Software Opengl Renderer in Less Than 5k Loc
Posted2 months agoActive2 months ago
github.comTechstoryHigh profile
excitedpositive
Debate
20/100
Software RenderingOpenglGame Development
Key topics
Software Rendering
Opengl
Game Development
The 'rlsw' software OpenGL renderer has been open-sourced with less than 5k LOC, sparking discussion about its potential applications and comparisons to other similar projects.
Snapshot generated from the HN discussion
Discussion Activity
Very active discussionFirst comment
40m
Peak period
57
0-12h
Avg / period
31
Comment distribution93 data points
Loading chart...
Based on 93 loaded comments
Key moments
- 01Story posted
Oct 21, 2025 at 5:00 PM EDT
2 months ago
Step 01 - 02First comment
Oct 21, 2025 at 5:40 PM EDT
40m after posting
Step 02 - 03Peak activity
57 comments in 0-12h
Hottest window of the conversation
Step 03 - 04Latest activity
Oct 26, 2025 at 9:26 PM EDT
2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45661638Type: storyLast synced: 11/20/2025, 7:40:50 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
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.
edit: I stand corrected by the downmods!
I would argue that people posting comments in these threads consisting of only their pre-existing general knowledge of Stevenson and Argon2 are still failing to make substantial contributions to the conversation, because they will tend to repeat pre-existing errors whose correction is the largest contribution of the linked writings, or simply repost the predictable opinions they share with many other people. It's the opposite of the spirit of curious inquiry the site ostensibly seeks to foster.
And the majority of frontpage posts are about things that are in fact brand new:
(news reporting from two days ago) (new software project last month) (news reporting from today on performance evaluations using an ASUS sample motherboard not available to the general public) ("Hello HN, I just released this music theory and ear training mobile app" a few weeks ago, with a trademarked name that will certainly have to be changed after a cease & desist) (a new release process change in this project from four days ago) (a new software renderer committed on September 29) (a new paper published one week ago)There is nothing substantial that anyone could say about any of these things without reading the article or bug thread or trying the software.
I made an exception with this, because the "article" is simply a 5kloc header file. I only read some of it.
I don't have a problem with the submission but I don't know why you would expect someone to read enough of the header to realize that the opening line in the header saying "OpenGL 1.1-style" is underselling it and it's actually a "pretty decent OpenGL 1.1 software implementation".
What should be minimized is the accidental complication of compiling libraries and programs, for example convoluted build systems and C++ modules.
I think the real answer to educating people about making games without the complications of low level programming would be using a framework like Godot or languages like Python or Lua.
What if you cannot adopt some library that would do something very useful because you lack the skill integrate or replace CMake or Bazel or Autoconf? Unnecessary technical constraints impact game quality.
What if due to insufficient automation the time between tests after making a very small change is 10 minutes rather than 10 seconds? Reduced productivity impacts game quality.
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.
The problems already start with getting the precompiled libraries from a trusted source. As far as I'm aware the SDL project doesn't host binaries for instance.
1 - Open https://www.libsdl.org/
2 - Download section on bottom left => SDL Releases
It has been there at least since SDL 2.0 early days, not feeling like tracking changes on Wayback Machine.
Or, more simply, it makes the process "easy as a scripting language" rather than "pretty easy".
But I also just use the precompiled libs :)
And sure you can do 3d rendering on modern CPUs. It's just better on GPUs. Like thousands of times better.
How many lines to implement OpenGL 2.0 (non ES) ?
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.
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.
(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://kingscrook.itch.io/kings-crook
This is an implementation of the OpenGL API interface. It is not OpenGL. It does not support GPU acceleration. It does math with floating point on the CPU. It then draws points and lines on a 2D surface provided by raylib.
Could this be adapted to use SIMD, or a GPU? Sure. That is not what this is today.
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/
Why do you have to and do you also use parts of the old immediate-mode API?
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.
[0] https://linktr.ee/yesboxstudios
[1] https://yesbox.itch.io/metropolis1998
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/...
https://youtu.be/MGZQAH5J1OQ
[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.
2 more comments available on Hacker News