TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Simple software rasterizer in a single C++11 header file

50 点作者 StylifyYourBlog超过 10 年前

6 条评论

ykl超过 10 年前
I TA'd a rendering course once and wound up assigning a homework where the students implemented their own software rasterizers in CUDA. Before that homework, a lot of students didn't really understand what a rasterizer did. Afterwards, everyone got it.
评论 #9091617 未加载
ricket超过 10 年前
I'm not a C++11 developer, I've done a little C++ in the past. What is the pride in putting all the code in the header file? Shouldn't the declarations be there, and the definitions be pulled out into a .cpp file? Is it somehow smaller, faster, more convenient to have it all in a header file?
评论 #9090246 未加载
评论 #9091276 未加载
评论 #9090275 未加载
rian超过 10 年前
Why aren't you using nullptr instead of casting NULL to your pointer type?
madsravn超过 10 年前
What exactly is the difference between this and for example a simple ray tracer? Seems like it takes a lot of the same steps.
评论 #9089935 未加载
pjc50大约 10 年前
I recently unearthed the code I wrote at school in 1996 which implemented a 3D Gouraud-shaded renderer that managed ~1000 triangles&#x2F;sec on a 33MHz 486. It&#x27;s a great learning experience doing this from scratch.<p>Mine did Bresenham&#x27;s algorithm for pixel fill rather than the winding approach used here.
AshleysBrain超过 10 年前
Very cool - any perf stats though? Would be interesting to see how this compares to other software renderers.