libtiny3d is a C library designed for 3D software rendering. It aims to provide a lightweight, efficient, and easy-to-integrate solution for rendering 3D graphics in environments where hardware acceleration is unavailable or unnecessary.
- Pure Software Rendering: No GPU or hardware acceleration required.
- Written in C: Ensures portability and ease of integration into C/C++ projects.
- Basic 3D Primitives: Supports rendering of triangles, lines, and points.
- Customizable Pipeline: Modular design allows for extending or modifying the rendering pipeline.
- Minimal Dependencies: Designed to be lightweight and easy to build.
- Clone the Repository:
git clone https://github.com/GayashaSandeepa/libtiny3d.git
- Build the Library:
- Navigate to the project directory.
- Use the provided
Makefile(if available) or compile the source files manually:cd libtiny3d make - Alternatively, compile with:
gcc -o libtiny3d.a *.c
#include "tiny3d.h"
int main() {
// Initialize renderer and context
tiny3d_context ctx;
tiny3d_init(&ctx, width, height);
// Define your 3D objects and transformations here
// Render loop
while (running) {
tiny3d_clear(&ctx);
// Draw your objects
tiny3d_draw_triangle(&ctx, ...);
// Present frame
tiny3d_present(&ctx);
}
tiny3d_destroy(&ctx);
return 0;
}| Folder/File | Description |
|---|---|
src/ |
Library source code |
include/ |
Header files |
examples/ |
Example/demo applications |
tests/ |
Unit tests (if available) |
README.md |
Project documentation |
LICENSE |
License information |