Live data from Hacker News

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

github.com

1–10 of 100 posts

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

#3
post #2

*OpenGL-style.

Congrats for only reading the header ;) It's actually a pretty decent OpenGL 1.1 software implementation, obviously not complete and spec-correct though. It's more like those MiniGL drivers back in the day, implementing just enough of the spec so the game can run ;)

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.

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

#8
post #2

*OpenGL-style.

Congrats for only reading the header ;) It's actually a pretty decent OpenGL 1.1 software implementation, obviously not complete and spec-correct though. It's more like those MiniGL drivers back in the day, implementing just enough of the spec so the game can run ;) 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 depend…

That's an extremely snarky reply given the post is just a direct link to the header.

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

#9

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

An order of magnitude more ;) You need to implement user-programmable shaders, both ARB assembly and GLSL. That needs a GLSL parser, a shader interpreter (talking about compiling it to machine code would add another magnitude of complexity).

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.

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

#10

Earlier quoted context omitted.

Congrats for only reading the header ;) It's actually a pretty decent OpenGL 1.1 software implementation, obviously not complete and spec-correct though. It's more like those MiniGL drivers back in the day, implementing just enough of the spec so the game can run ;) 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 depend…

That's an extremely snarky reply given the post is just a direct link to the header.

No, the doc-header of the header! Apologies if I wasn't clear. I just thought the GP zoomed in on the word "-style" in the first line without reading more (it's probably since it's not a full 1.1 implementation, just something which can do enough to shim a good chunk of 1.1 functions so the RL GL1.1 backend can run)
Post reply on HN