Croll Croll - 1 year ago 82
C++ Question

How do I load, render and transform 2D images using Direct3D 11 API?

In my small game project using DirectX 11 API, I create Direct3D device, and drawing 3D meshes, using tutorials on web and a book. But I cannot found how to load, transform (rotate, scale, resize) and draw 2D sprites (loaded from PNG files, for example).

Is there any tutorials, articles or books about using 2D graphics with Direct3D API?

UPDATE: transform and render images without third-party libraries.

Answer Source

DirectX Tool Kit's SpriteBatch is ideal for exactly what you are describing, and is hosted on both CodePlex and GitHub.

Start with the Sprites and textures tutorial.

DirectX Tool Kit is all open source C++, so you can use it as a tutorial if you don't want to use it directly in your app for some reason--it's a static library with no runtime dependencies beyond Direct3D 11 itself. Just step right into the code.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download