jackwthake/shader-works ? reverse-engineered prompt

Reverse engineered prompt

Build me a portable 3D software renderer in pure C with no external runtime dependencies in the core library.

I want it to work on desktop machines and also be able to run on a small ARM microcontroller with a framebuffer and a simple display driver. It should let me draw basic 3D models like cubes, spheres, planes, and textured scenes, with depth buffering, perspective correct texture mapping, lighting, transparency, and a wireframe mode. I also want a simple way to plug in custom vertex and fragment shader style functions.

Please include a clean CMake build, a small example app for desktop, and a few demos that show off a textured scene and some more interesting world style scenes. If threading is useful, make it optional so the renderer can run single threaded too. Keep the library easy to embed, with clear functions for setting up the renderer, updating a camera, rendering a model, and cleaning up. If you need to check current docs for anything, look them up online.