Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
U

uraster

> 编程语言
Open source

Micro simple Rasterizer in a single C++11 header file.

345 stars0 likes2 views
WebsiteGitHub

About

Micro simple Rasterizer in a single C++11 header file.

uraster

Micro simple software rasterizer in a single C++11 header file. Does not use OpenGL. Pure C++11.

Mostly useful as a way of teaching how the rendering pipeline in hardware works.

A day ago, I saw this post Asking how to create a software renderer.

I started writing my response, and it looked something like this:

One should not create a software rasterizer unless they are giant masochists. However, if you were to do it, and first you need to ....

After a while I stopped. After writing my tutorial on how to make a C++ rasterizer in english, I realized it was nearly unreadable.

New idea: I'll just write the tutorial in pseudocode. Then, I looked at the pseudocode. It was unreadable because it wasn't quite a language

New idea: I'll write the skeleton of the header with comments explaining what to put in the code! I did this.

Surely you can see where this is going.

I ended up actually filling in the code, and implementing a simple rasterization pipeline all in one C++11 header standalone header file. The interface is similar to a dramatically simplified version of OpenGL2.0 with shader support, that is only capable of drawing interleaved arrays of vertices from index buffers.

There are a couple examples showing how you use it, and I'll add comments or a tutorial to explain the code at a later date.

Dependencies

It needs Eigen3 for the main header, cmake to build the examples, and CImg (to display) the animation and texturing example.

You can build and run the examples on ubuntu with

bash
sudo apt install eigen3-dev cimg-dev
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j6
cd ..
./build/examples/bunnyanim

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言