Saturday, April 2, 2011


This tutorial will demonstrate how to load texture in Direct3D 11

Interfaces used:

std::wstring oTexturePathString = L"c:\\textures\\"; // Replace this file path with the texture that you want to load

ID3D11ShaderResourceView *pD3DShaderResourceView;

CHECK_COM(::D3DX11CreateShaderResourceViewFromFile(g_pD3DDevice,, nullptr, nullptr, &pD3DShaderResourceView, nullptr));

Now bind the created SRV to the shader to see the bound texture

No comments:

Post a Comment