Does this use WebGL2? It doesn't run on my phone (which does support WebGL 1). Edit: According to the JS source file it appears to be a plain 2D canvas. Now I am even more confused, those should definitely load! https://github.com/tsoding/olive.c/blob/master/js/vc.js
Olive.c: a simple graphics library that does not have any dependencies
61–70 of 96 posts
Re: Olive.c: a simple graphics library that does not have any dependencies
#62Cool project! What’s the motivation? Since it eschews any graphics API, is it safe to assume this only does CPU-based rendering?
From demos/triangle.c ( https://github.com/tsoding/olive.c/blob/master/demos/triangl... ) // This idea is that you can take this code and compile it to different platforms with different rendering machanisms: // native with SDL, WebAssembly with HTML5 canvas, etc. The goal seems to be to maximize portability.
Re: Olive.c: a simple graphics library that does not have any dependencies
#63Earlier quoted context omitted.
Sorry, why does it make the project feel like a toy? I'm not trying to argue, I just don't understand. Is it because you're including a source file instead of a header file?
single-file libraries almost always feel like toys because most serious projects i'd want them integrated into a real build system. vcpkg is a good one these days for c/cpp. nothing wrong with a toy library ofc.
If you actually use a header-only library and it fails to link properly or be used in a project with multiple compilation units, then that would be a bug in the header-only library worth discussing and fixing. That would be a good-effort and interesting comment.
Re: Olive.c: a simple graphics library that does not have any dependencies
#64Re: Olive.c: a simple graphics library that does not have any dependencies
#65Re: Olive.c: a simple graphics library that does not have any dependencies
#66Both cpu renderers with texture mapping and Wavefront obj import without further dependencies.
Re: Olive.c: a simple graphics library that does not have any dependencies
#67Earlier quoted context omitted.
Unfortunately only portable to systems with fast CPUs though. Although I guess rendering simple 3d shapes probably runs just fine on low end hardware.
It depends how fast “fast” is. PCs in the 90s could run games like quake in lower quality mode with lower framerates, but they ran. CPUs that we have now are many orders of magnitude more powerful, so imagine what you can do with that. Though most games don't bother so we don't really have actual evidence.
I would expect multi+GHz CPUs hardware to be able to overcome that, though, especially if you’re happy with the tiny (for today) screen resolution of Quake.
Quake also did a few hacks to stay performant (https://en.wikipedia.org/wiki/Quake_engine#Engine_design_and...).
If necessary you would have to do the same for something that uses this library.
Re: Olive.c: a simple graphics library that does not have any dependencies
#68Nice! PortableGL is also great, OpenGL api that is defined in entirely in C and writes the “framebuffer” into an SDL window https://github.com/rswinkle/PortableGL
It's an implementation, not an API.
Re: Olive.c: a simple graphics library that does not have any dependencies
#69The combination of mapping pixels to memory and rendering individually and then that appearing on webgl and looking great on a not too expensive phone, where I am pinch zooming while it flawlessly animates, sort of blows my mind in how much technology has come in 25 years. Connects the old with the new in a way I haven’t seen for a while (and yeah seen loads of C64 emulators and such)
Re: Olive.c: a simple graphics library that does not have any dependencies
#70It's cool that you can get away with software rendering these days, but it's a shame to not make use of the power of the GPU.