-3

I am implementing an image viewer for oculus rift with DirectX 12, but I am not able to load an image from a file in visual studio. Can someone tell me how to upload an image in DirectX 12?

Vertexwahn
  • 7,709
  • 6
  • 64
  • 90

1 Answers1

1

The DirectX 12 official samples can be found on GitHub. See this thread for a code snippet of creating and uploading a texture.

You can also make use of the DDSTextureLoader and WICTextureLoader modules in the DirectX Tool Kit for DX12. Note it is a C++ library and that pure C coding for DirectX is not a well-supported scenario.

See this post for more resources.

If you are new to DirectX, I strongly advice you start with DirectX 11. DirectX 12 is an expert API that builds upon a foundation of all the concepts and techniques of DirectX 11 including HLSL programmable shaders. See DirectX Tool Kit for DX11.

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81