Olive.c Demos

Olive.c is a simple graphics library that does not have any dependencies and renders everything into the given memory pixel by pixel.

Below is a bunch of demos written in C using this library compiled to WebAssembly. Every frame of the animations is generated pixel by pixel on CPU without using any special GPU APIs like OpenGL, Metal, etc.

The source code of the library and the demos is available on GitHub: https://github.com/tsoding/olive.c

Triangle

Rainbow triangle together with a transparent circle. Source: demos/triangle.c

Dots 3D

A bunch of 3D dots projected onto your 2D screen plus a text with a builtin monospaced font. Source: demos/dots3d.c

Squish

Resizing images on the fly. Source: demos/squish.c

Triangle 3D

Rotating rainbow triangle in 3D. Unlike 3D dots above this is a solid shape. Source: demos/triangle3d.c

Rotating 2D Textures

Source: demos/triangleTex.c

Rotating 3D Textures

Textures by MELLE. Source: demos/triangle3dTex.c

Cup 3D

Design by rexim. 3D model by kolumb. Source: demos/cup3d.c

Utah Teapot

Famous Utah Teapot. Model by Standford University. Source: demos/cup3d.c

(I have no idea why it runs with a reasonable FPS)