Manic is a prototype 3D software rasterizer. It can load a 3D model (Wavefront Obj files), display it on the screen, and at 60 FPS. It can also load accompanying textures for the 3D model, all on the CPU.
This is an exploratory project to understand at a much deeper level how GPUs do what they do, and simulate it on the CPU. In the days before GPUs even existed, video games and other graphics related stuff where done completely on the CPU. Although they werent as fast given the limited processing power of the time period, but in 2025, CPUs are able to do billions of computations per seconds. It'd be tragic not to harness these alien like powers to see how capable rendering on the CPU can be in the modern age of computing.
This project is created in a way that isolates the core rendering code from the platform, meaning it is not platform dependent. Although only Windows 10 and above is supported, writing the platform layer for other platforms shouldn't be much of a hassle. There's a downloadable version of the application in the release section on github that would work on Windows 10 and above.
Note
ONly x64 Windows 10 and above is supported.
-
Install Required Tools (Windows SDK & MSVC) You need the Microsoft C/C++ Build Tools for both the Windows SDK and the MSVC Compiler. Alternativly, Clang can also be used to build the executable, but you would still need the Windows SDK. Clang
-
Build Environment The renderer can be using MSVC or Clang in the command line. This is done by calling vcvarsall.bat x64 (included with the Microsoft C/C++ Build Tools). This can be done automatically by the
x64 Native Tools Command Prompt for VS <year>cmd variant installed by the Microsoft C/C++ Build Tools. If you have installed the build tools, the command prompt can be located by searching for native from the Windows Start Menu.
To confirm that you have access to the MSVC Compiler after opening the cmd variant, run:
cl
If everything is set up right, you should see output similar to this:
Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34435 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
- Building
Within the
x64 Native Tool Command Prompt,cdto the root directory of the codebase and run thebuildscript like so:
## For MSVC
build manic msvc debug
## For Clang
build manic clang debug
You should see the following:
[release mode]
[compiling with msvc]
main.cc
