0
votes

I'm trying to migrate directx-9 to directx-11.

In my application, I only need to render texture2d (D3D11_USAGE_DYNAMIC/D3D11_USAGE_DEFAULT) with suitable size but I cannot find any tutorial discussing on it. Did anyone know how to do it?

In other words, How do I render the ID3D11Resource* from D3DX11CreateTextureFromFile on the window?

1
A good idea for migrating would be first to learn about directx11, there are numerous tutorials out there on how to properly initialize directx11, and creating shaders for it using HLSL, as well as how to bind textures for the shaders to render them to the window. A quick google search for that will bring up a tutorial from rastertek: rastertek.com/tutdx11.html, which is a decent series. - AresCaelum
thank you Eddge, the tutorial helps me a lot - 方柏棟

1 Answers

0
votes

Rather than continue to use the deprecated D3DX11 library, you should take a look at DirectX Tool Kit and the SpriteBatch class in particular. See the tutorial Sprites and textures

See also Living without D3DX