Live data from Hacker News

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

github.com

41–50 of 100 posts

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

#42
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…

> I have to use the ancient OpenGL fixed function pipeline

Why do you have to and do you also use parts of the old immediate-mode API?

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

#43
post #11

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

Amazing: (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"

And first written in 1997.

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

#44
post #40
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.

Software rendering is the future anyway, with the caveat that it is actually hardware accelerated, by making use of compute (GPGPU).

I'm out of the loop -- how so?

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

#46
post #40

Earlier quoted context omitted.

Software rendering is the future anyway, with the caveat that it is actually hardware accelerated, by making use of compute (GPGPU).

I'm out of the loop -- how so?

One approach is using CUDA and SYCL, for example OTOY uses CUDA based rendering.

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

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

#49
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.

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

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

#50
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.

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