Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
SuperSimpleGraphics
An SVG generating single header file C library appropriate for "intro to programming" classes in C/C++.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
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:
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
Years ago, i made something similar as a coursework (Computer Graphics)
There are many single-file C "libraries" that work perfectly fine as both "header" and "implementation", and that do not require unity builds (building everything as a single translation unit, e.g., a single .c file). Here is but one famous collection of them: https://github.com/nothings/stb
Also look at the source for original Quake (https://github.com/id-Software/Quake), one of the last pure software-rasterizing AAA 3D PC games. Michael Abrash's Graphics Programming Black Book (https://github.com/jagregory/abrash-black-book) explains many of the critical parts of the rendering pipeline.
By the way, quake.exe for DOS was 404,480 bytes.
Also look at the source for original Quake (https://github.com/id-Software/Quake), one of the last pure software-rasterizing AAA 3D PC games. Michael Abrash's Graphics Programming Black Book (https://github.com/jagregory/abrash-black-book) explains many of the critical parts of the rendering pipeline.
By the way, quake.exe for DOS was 404,480 bytes.
won't work, since the preprocessor won't interpret directives inside string literals of course.
In many assemblers, there is a directive called "incbin" which pastes in unstructured binary data at the point of usage. I just found a very clever C and C++ wrapper [1] for that, which gives you an INCBIN() macro. Nice!
Cool use of Webassemly. See also the 500 line https://github.com/ssloy/tinyrenderer or the 100 line Python/numpy version https://github.com/rougier/tiny-renderer
Both cpu renderers with texture mapping and Wavefront obj import without further dependencies.
Cool use of Webassemly. See also the 500 line https://github.com/ssloy/tinyrenderer or the 100 line Python/numpy version https://github.com/rougier/tiny-renderer
Both cpu renderers with texture mapping and Wavefront obj import without further dependencies.
Related posts
- CGL Release v0.5 ( CGL (C Game Library) is a multipurpose single file library mainly for recreational coding / demo scenes / prototyping / small games / experimentation)
- CGL (C Game Library) v0.4 Major Release (added Ray Caster, Node Editor, Collisions, Square Marcher, new Math Library, Curve Renderer, etc)
- PortableGL: An implementation of OpenGL 3.x-ish in clean C
- The Ultimate Cross-Platform Rendering Engine?
- cgl-rs: Rust OpenGL base library + creative coding + gamedev utilities