简体   繁体   中英

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM