百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
U

uraster

> 编程语言
开源

单个 C++11 标题文件中的微简 Rasterizer.

345 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

单个 C++11 标题文件中的微简 Rasterizer.

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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

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