This is a basic 3D rendering engine built using the C programming language and SDL3 library. It is single-threaded and purely CPU-bound, intended as an exploration and learning project rather than a production-ready product.
I started this project for two main reasons:
- To improve my understanding and proficiency in writing C code.
- To challenge and apply my mathematics education in a practical context.
The project began with a very simple implementation and has gradually been optimized over time. However, there is still room for improvement, and I welcome suggestions and contributions from the community.
- Basic 3D rendering using C and SDL3
- Single-threaded, CPU-bound rendering
- Gradual optimizations for improved performance
To run this project on your local machine, follow these steps:
- Clone the repository:
git clone https://github.com/AlfieRan/BareBones-3D-Renderer.git
- Install the SDL3 library, which is the only non-standard dependency.
- Compile the code using the provided Makefile. Please note that the Makefile is currently set up for a Macbook M3 Max (ARM chip), so it may need editing to compile on other systems.
- Run the executable file generated after compilation.
The screen width and height can be changed in the include/types.h
file, which also contains additional configuration settings.
If you have any suggestions or would like to contribute to this project, feel free to create a pull request (PR). I appreciate any feedback and contributions that can help improve the rendering engine.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions, suggestions, or feedback, please feel free to reach out to me:
- Email: hi@alfieranstead.com
- Twitter: @alfieranstead
- GitHub: AlfieRan
Heavily Inspired by JDH.
Useful Resources: