Live data from Hacker News

rlsw – Raylib software OpenGL renderer in less than 5k LOC

github.com

61–70 of 100 posts

Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC

#61

Earlier quoted context omitted.

Why not? The original Doom didn't use a GPU renderer. It should be possible to do simple 3d stuff in today's computers without it.

Even Quake launched with software rendering. Not sure if the first release even had support for any hardware acceleration?

IIRC GLQuake was more like an experiment, only Quake II had proper GL support from the start.

Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC

#62
post #51

Earlier quoted context omitted.

Like these? https://github.com/libsdl-org/SDL/releases/tag/release-3.2.2...

Yeah like these, somehow my google fu didn't bring that link up, only outdated forum posts from people looking for SDL binary releases.

No need for Google fu.

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.

Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC

#63
post #55

Earlier quoted context omitted.

Why not? The original Doom didn't use a GPU renderer. It should be possible to do simple 3d stuff in today's computers without it.

The original doom wasn't even proper 3d. It was a sort of 2,5d. And sure you can do 3d rendering on modern CPUs. It's just better on GPUs. Like thousands of times better.

The main limitation of the engine is you couldn't have room over room. There is definitely three dimensions when playing the game.

Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC

#64
post #17
post #16

Earlier quoted context omitted.

but ... why?

As someone who was once a child trying to figure out how to compile and link things to use SDL, I think there's some educational value in letting people make games without having to dive deep into how to use C++ toolchains.

I'd make the opposite argument about educational value. If you learn to compile libraries and programs you have, so to speak, passed an exam: you are ready to "make games" with confidence because you know what you are doing well enough to have no fear of tool complications.

What should be minimized is the accidental complication of compiling libraries and programs, for example convoluted build systems and C++ modules.

Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC

#66

> OpenGL 1.1-style implementation on software How many lines to implement OpenGL 2.0 (non ES) ?

I implemented the OpenGL API for fixed function hardware once, and chose the cut off at 1.5 with some extensions like framebuffer objects. 1.x has a lot of cruft that nobody should use, but is still easy to implement. 2.x has a lot of stuff like shaders that are a lot more work to implement in software.

Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC

#67
post #58
post #28

What's cool about this is that computers are so fast that you could probably make a decent 2D game using only this software-rendered OpenGL 1.1 library.

We had software rendered unreal tournament decades ago. Full 3d. It runs like a champ in 2023: https://youtu.be/MGZQAH5J1OQ

Imagine what it could do with modern SIMD and many cores. Won't come close to dGPU, but still...

Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC

#68
post #28

What's cool about this is that computers are so fast that you could probably make a decent 2D game using only this software-rendered OpenGL 1.1 library.

If you keep resolution low, manage your scene complexity carefully and commit to the art style, you can make reasonable 3D games that run even on 20 year old hardware. I did so as an experiment on my game [1] [2] and now that I can see that it works, I am working on a second, more "serious" and complete one. Computers are fast.

[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.

Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC

#69
post #16

Raylib's author was very happy to announce that you can compile an entire raylib program with no dependencies other than, say, being a win32 app https://x.com/raysan5/status/1980322289527976202

but ... why?

This site is for hackers, which basically means people who like to do things like this. If you can't understand why someone would be interested in this, probably you should remain silent and try to understand hackers rather than commenting.

Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC

#70

Earlier quoted context omitted.

No, this is CPU rendering only! Not even SIMD, just straightforward integer (and float) code.

Now make it fixed point

Shout out to King's Crook [1], a cool project using a custom C software renderer only using integers

[1] https://kingscrook.itch.io/kings-crook

Post reply on HN