DirectXTK DirectX工具集

DirectXTK 全称是 DirectX Tool Kit ,包含一组在 C++ 中编写 DirectX 11.x 代码的助手类。

示例代码:

std::unique_ptr<SpriteBatch> spriteBatch(new SpriteBatch(deviceContext));
std::unique_ptr<SpriteFont> spriteFont(new SpriteFont(device, L\"myfile.spritefont\"));

spriteBatch->Begin();
spriteFont->DrawString(spriteBatch.get(), L\"Hello, world!\", XMFLOAT2(x, y));
spriteBatch->End();

© 版权声明
THE END
喜欢就支持一下吧
点赞344 分享
The God only arranges a happy ending. If it is not happy, it means that it is not the final result.
上天只会安排的快乐的结局。如果不快乐,说明还不是最后结局