First look at basic GDI graphics programming

One of the courses that I’m currently studying is called  Advanced C++ for Games II, where we are currently working with GDI for rendering of simple programs that will eventually develop into a racing game. GDI is a core component of the Windows operating system, where it handles simple rendering onto devices such as monitors.

So far we have only worked with various things related to the very basics of 3D-rendering, drawing triangles. And why is that? The reason is because a triangle is the minimal geometrical figure that is always certain to have a flat surface, and it’s therefor why all 3D-models in the end is a collection of several triangles.

Below is a screenshot of what our program currently looks like. It’s may not seem like it is very much, but now we have the basics of rendering a triangle implemented, which is a huge step in the right direction if making this a proper 3D-game.