Live data from Hacker News

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

github.com

91–100 of 100 posts

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

#91
post #88

Earlier quoted context omitted.

I know. I hold myself to a rule that I never comment if I didn't read the article. I made an exception with this, because the "article" is simply a 5kloc header file. I only read some of it. I don't have a problem with the submission but I don't know why you would expect someone to read enough of the header to realize that the opening line in the header saying "OpenGL 1.1-style" is underselling it and it's actually a…

That's great, but structurally, the recency bias of HN tends to bury comments by people who follow rules like yours.

I don't think making sarcastic remarks about someone failing to read enough of this header to work out that it's a pretty complete opengl implementation contrary to the implication at the start of the header is really doing much to fight the problem of people not reading articles before commenting.

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

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

Someone always points out how Doom wasn't "real 3D" like it's some sort of gotcha. Games are smoke and mirrors, it's all a 2D grid of pixels at the end.

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

#93
post #92
post #55

Earlier quoted context omitted.

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.

Someone always points out how Doom wasn't "real 3D" like it's some sort of gotcha. Games are smoke and mirrors, it's all a 2D grid of pixels at the end.

Well yeah, a 2d grid of pixels also describes the result of rendering a 2d game. It matters how you arrive at that 2d grid of pixels, that's why you can't render Crysis on just a CPU. At least not in real time.

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

#94
post #88

Earlier quoted context omitted.

That's great, but structurally, the recency bias of HN tends to bury comments by people who follow rules like yours.

I don't think making sarcastic remarks about someone failing to read enough of this header to work out that it's a pretty complete opengl implementation contrary to the implication at the start of the header is really doing much to fight the problem of people not reading articles before commenting.

Your comment makes ne wonder who you think is making sarcastic remarks. I'm not. Probably "Congrats for only reading the header"?

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

#95
post #67
post #58

Earlier quoted context omitted.

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

Just run it on an EPYC 9965 and you have a not insignificant amount of cores for parallel computing.

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

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

Whoah! That's so cool!

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

#97
post #94

Earlier quoted context omitted.

I don't think making sarcastic remarks about someone failing to read enough of this header to work out that it's a pretty complete opengl implementation contrary to the implication at the start of the header is really doing much to fight the problem of people not reading articles before commenting.

Your comment makes ne wonder who you think is making sarcastic remarks. I'm not. Probably "Congrats for only reading the header"?

Yes, that is the comment at the top of this chain - which I criticized as a very snarky reply given the specifics of this post.

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

#98
post #46

Earlier quoted context omitted.

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 ki…

Straight facts, thank you:) but one small nitpick: mesh/task shading only replaces the vertex pipeline (VS/TS/GS), the pixel shader is still a thing afterwards...

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

#99
post #94

Earlier quoted context omitted.

Your comment makes ne wonder who you think is making sarcastic remarks. I'm not. Probably "Congrats for only reading the header"?

Yes, that is the comment at the top of this chain - which I criticized as a very snarky reply given the specifics of this post.

Yes, sorry to be dense.

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

#100
post #27

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

Not sure what the line count is, but PortableGL is a software renderer for 3.x(ish): https://github.com/rswinkle/PortableGL Cool project, and fun to play with.

It currently clocks it at 12.5K but that includes stuff that could easily be stripped out. I suspect, even if I had it "finished" with everything I would ever want in it, it wouldn't be more than 15-20k. PGL saves a lot by not bothering with GLSL at all.

Glad you found it fun to play with, that's what it's for. Hoping to have a new release in the next week or so, and there have been some serious/breaking changes since the last so hopefully it goes well.

And on the topic of this thread, PGL is overkill for raylib's software rendering backend since they don't need arbitrary shader support, but I would still love to try making PGL a raylib backend someday because it would be cool and running the entire set of Raylib examples would be a great stress test. Plus then I could use raylib to make a game with PGL, win-win.

Post reply on HN