Direct2D

Total 12 Posts
This tag aggregates all tutorials on various Direct2D topics.

Resolution Independent Rendering

To support multiple resolutions, a technique called "Resolution Independent Rendering", pioneered by Donald Knuth, is implemented using Direct2D and some linear algebra.

Chasing the Mouse

This brief tutorial shows how to handle input from mouse devices. Native Windows functions are used to track the mouse position as well as the state of the mouse buttons.

Animated Sprites and Sprite Sheets

This tutorial builds upon the last tutorial and introduces animated sprites based on the flip book technique. To efficiently use that method, sprite sheets are used.

Sprites

In this tutorial a new class, the Sprite class, is designed to facilitate the use of bitmap images. The Painter's Algorithm is explained and implemented to draw sprites in the correct order.

Direct2D Bitmaps

In this tutorial we learn about bitmaps and pixmaps. We study the BMP format and learn how to use the Windows Imaging Component to load image files from the harddisk into our games.

Transformations

This tutorial covers the important concept of affine linear transformations in Direct2D, namely Translations, Scaling, Rotations and Shearing. We will learn how to apply those transformations to entire render targets, brushes and geometries.

Direct2D Geometries

This tutorial is an introduction to Direct2D Geometries, especially Path Geometries, which are one or multiple figures consisting of lines, arcs and Bézier segments.