Skip to content
This repository was archived by the owner on Sep 13, 2025. It is now read-only.

tjlawal/manic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

101 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Manic Renderer

Demo GIF

What is it?

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.

Why make a software rasterizer when we have GPUs?

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.

How can I run this on my own computer?

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.

How do I build it?

Note

ONly x64 Windows 10 and above is supported.

  1. 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

  2. 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... ]
  1. Building Within the x64 Native Tool Command Prompt, cd to the root directory of the codebase and run the build script 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

References