TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

50 pointsby StylifyYourBlogabout 10 years ago

6 comments

yklabout 10 years ago
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 未加载
ricketabout 10 years ago
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 未加载
rianabout 10 years ago
Why aren't you using nullptr instead of casting NULL to your pointer type?
madsravnabout 10 years ago
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 未加载
pjc50about 10 years ago
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.
AshleysBrainabout 10 years ago
Very cool - any perf stats though? Would be interesting to see how this compares to other software renderers.