SoftwareRenderer is a CPU-based software rendering engine written in C. It demonstrates fundamental graphics techniques by implementing a basic rendering pipeline entirely in software, without relying on GPU APIs such as OpenGL, Vulkan, or DirectX. The project is designed for learning, experimentation, and understanding how real rendering pipelines work internally.
Current capabilities of the renderer:
- CPU-based software rasterization
- Wireframe rendering
- Point rendering
- Indexed mesh rendering
- Custom framebuffer
- Primitive rendering API
- First-person camera movement
- Local-space camera translation
- Yaw / pitch camera rotation
- On-screen text rendering
- FPS counter
- Simple interactive menu
- Toggleable rendering modes
- Platform abstraction for windowing and input
- Framebuffer presentation
- Event handling
| Key | Action |
|---|---|
| W | Move forward |
| S | Move backward |
| A | Move left |
| D | Move right |
| Q | Move up |
| E | Move down |
| Arrow Keys | Rotate camera |
| 1 | Toggle help |
| 2 | Toggle FPS counter |
| 3 | Toggle wireframe |
| 4 | Pause movement |
Basic renderer usage:
renderer_context_t *ctx = renderer_create(640, 400);
while (!platform_should_close())
{
renderer_begin_frame(ctx);
renderer_clean(ctx, 0xFF000000);
renderer_begin(ctx, R_PRIMITIVE_LINE);
float v1[3] = {0,0,0};
float v2[3] = {1,0,0};
renderer_vertex(ctx, v1, 3);
renderer_vertex(ctx, v2, 3);
renderer_end_frame(ctx);
}
renderer_destroy(ctx);The project uses CMake workflows.
cmake --workflow nativecmake --workflow mingwrenderer/
renderer.h Public renderer API
renderer.c Core renderer implementation
renderer/platform/
platform layer (window, input, presentation)
resources/
teapot.h Demo mesh data
docs/images/
Screenshots for README
- Create a branch from
development - Open a pull request
- Assign T1ag0Card0s0 as reviewer
- No failing builds
- The demo must run on all platforms in
platform/ - Code must be formatted before submitting
cmake --workflow native
cmake --build build --target formatThis project is licensed under the MIT License.
See the LICENSE file for details.
