Live data from Hacker News

Olive.c: a simple graphics library that does not have any dependencies

tsoding.org

91–96 of 96 posts

Re: Olive.c: a simple graphics library that does not have any dependencies

#91
post #90

Earlier quoted context omitted.

Depends on how you define castrated. It's not like using C or C++ is really limiting and using a C++ math library (like my own rsw_math or more complete glm) lets you basically write it in GLSL. It's not like there's anything you can't do. And the only math from Bellard's TinyGL that I use is his clipping code, maybe 80 lines of code give or take. Not to diminish Bellard at all, if anything I'm saying any problems wi…

My bad, I used "castrated", it is not what I really wanted to say. I should have said a subset of opengl features. Namely, it is not a software GL implementation you can run an opengl4 3D game on (only those horrible c++ diarehas which are llvm with things like llvmpipe or the other one from intel are supposed to be able to do so).

Yeah PortableGL will never be completely fully featured, not even for OpenGL 3.3 since I'll definitely never do the geometry shader and probably not the transform feedback. But specifically it'll never have the earlier immediate mode stuff, or some of the big 4.0 stuff like the tessellation shaders. I have been meaning to add the DSA functions where they make sense. They'd be really simple to implement.

Actually a few days ago someone sent me a pull request adding an interesting project to my README

https://github.com/rswinkle/PortableGL/commit/e0652b4dff266d...

So now if I were to try to sum up all the OpenGL software implementations I can think of,

TinyGL (and modern improved forks) = OpenGL 1.1-1.3 ish

osmesa = OpenGL 2.1 using Mesa 7.0.4's swrast

PortableGL = OpenGL 3.x-ish

Mesa = 2 software renderers still included, gallium based softpipe and llvmpipe and I think one or both support the latest OpenGL 4.6 but I could be wrong. swrast and Intel's gallium/llvm based OpenSWR have both been removed from mainline Mesa, and the latter only supports 3.3 core-ish (https://www.openswr.org/)

I'm sure there are others out there. I've actually never tried to use "Stand alone" Mesa. I really should to see how it performs if nothing else, but I still say nothing beats the single header library for ease of use.

Re: Olive.c: a simple graphics library that does not have any dependencies

#92
Looks great but the API itself doesn't seem very innovative (which is probably not the goal anyway).

I'd personally be interested in a graphics API that do not try to render the whole buffer every frame, but update it given a list of changes (e.g. sprite moving/rotating). I believe that such approach could work very well for a 2D software renderer given the likeliness of spatial redundancy, and possibly for video encoding without going through a clueless encoder querying pixels (and having the ability to exploit hardware efficiency to decode/render the stream).

Re: Olive.c: a simple graphics library that does not have any dependencies

#93
post #86
post #23

Earlier quoted context omitted.

It's a simple software rasterizer. If you're interested in writing your own, I've written a tutorial explaining the basics. https://magcius.github.io/xplain/article/rast1.html

Nice website. Looking forward to the next rasterization article!

Unfortunately, repository https://github.com/magcius/xplain is archived and the latest update is from 5 years ago.

Re: Olive.c: a simple graphics library that does not have any dependencies

#94
post #86
post #23

Earlier quoted context omitted.

It's a simple software rasterizer. If you're interested in writing your own, I've written a tutorial explaining the basics. https://magcius.github.io/xplain/article/rast1.html

Nice website. Looking forward to the next rasterization article!

Actually, there is already rast2 article: https://magcius.github.io/xplain/article/rast2.html. Also there is the menu article: https://magcius.github.io/xplain/article/menu.html.

Re: Olive.c: a simple graphics library that does not have any dependencies

#95
post #94
post #86

Earlier quoted context omitted.

Nice website. Looking forward to the next rasterization article!

Actually, there is already rast2 article: https://magcius.github.io/xplain/article/rast2.html . Also there is the menu article: https://magcius.github.io/xplain/article/menu.html .

FYI, these are unfinished, and I have no plans to work on this series again.
Post reply on HN