Earlier quoted context omitted.
No, this is CPU rendering only! Not even SIMD, just straightforward integer (and float) code.
Now make it fixed point
rlsw – Raylib software OpenGL renderer in less than 5k LOC
31–40 of 100 posts
Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC
#32Earlier quoted context omitted.
OpenGL is an API. Software renderers for it—like the one that originally came with Windows NT, or even early versions of Mesa—have been out for a long time.
I haven't messed with it for a while, but last I checked it really wasn't that much code to make it run on the GPU. Maybe an extra 100 lines or so. Although you couldn't use windowed mode, had to be fullscreen.
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.
Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC
#33Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC
#34Raylib'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?
Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC
#35Curious to hear the take Tsoding has on that news.
Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC
#36Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC
#37Fabrice Bellard also wrote an OpenGL thing: https://bellard.org/TinyGL/
(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"
Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC
#38Earlier quoted context omitted.
but ... why?
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…
Although I may imagine newbies may face some challenges dealing with compiler flags.
Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC
#39Earlier quoted context omitted.
If you want to do that, skip C++ entirely and just use Javascript or Python. You can get shiny things really quickly.
I think there's still value in learning the C++ language and making a game or a demo is quite rewarding although raylib does have bindings for basically every conceivable language.
Re: rlsw – Raylib software OpenGL renderer in less than 5k LOC
#40What'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.