Live data from Hacker News

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

github.com

51–60 of 100 posts

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

#51
post #38

Earlier quoted context omitted.

I never ever bothered to compile SDL/SFML from source, what is so hard dumping the binaries into a folder, set the include paths for the compiler and linker? Although I may imagine newbies may face some challenges dealing with compiler flags.

> what is so hard dumping the binaries into a folder, set the include paths for the compiler and linker? 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.

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

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

#52
post #29
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.

Edit: I missed this was software rendered. I’m one gen-iteration ahead. Prob would still be possible to render my game cpu side provided I use the most efficient sprite depth ordering algorithm possible (my game is isometric pixel art like rollercoaster tycoon) 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…

Sidenote: Can't wait for the release!

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

#53

Earlier quoted context omitted.

Because GPU APIs are a nightmare clustertruck.

1000x less performance is a bigger clusterfuck

It's not meant for "let's make the next AAA game". It's for "Hey, I wanna try a fun idea".

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

#54
post #11

Fabrice Bellard also wrote an OpenGL thing: https://bellard.org/TinyGL/

I saw a few of these things in the 90s and they definetly were not cool. They were slow, clunky or produced artifacts. You needed close integration between the game and renderer for perf.

Funny how history turns out.

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

#55
post #16

Earlier quoted context omitted.

but ... why?

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.

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

#56
post #38

Earlier quoted context omitted.

The mantra for the library is "raylib is a simple and easy-to-use library to enjoy videogames programming." It's for hobbyist, learners, tinkerers, or just those that want to enjoy minimalistic graphics programming without having to deal with interfacing with modern machines yourself. The default Windows installer bundles the compiler and a text editor to make poking at C to get graphics on the screen (accelerated or…

I never ever bothered to compile SDL/SFML from source, what is so hard dumping the binaries into a folder, set the include paths for the compiler and linker? Although I may imagine newbies may face some challenges dealing with compiler flags.

Raylib is a pedagogical tool among other things and as such I think a kind of first principles approach has it’s merits.

But I also just use the precompiled libs :)

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

#57
post #11

Fabrice Bellard also wrote an OpenGL thing: https://bellard.org/TinyGL/

See also the fork by C-Chads: https://github.com/C-Chads/tinygl

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.

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

#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

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

#59
post #51

Earlier quoted context omitted.

> what is so hard dumping the binaries into a folder, set the include paths for the compiler and linker? 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.

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.

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

#60

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

Oh that sounds really interesting. I was searching for something like that to render something on a fun-hacky-ledscreen with an embedded processor. All things I found weren't satisfying. But if I understand that correctly, I should be able to just compile this and then software render stuff? For my tiny 192x128 pixels this should be fast enough on any kinda system. Time for fun animations
Post reply on HN