Git Product home page Git Product logo

uraster's Introduction

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.

Image from uraster

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.

uraster's People

Contributors

steve132 avatar

Watchers

James Cloos avatar 汪志成 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.