is possible dimensions of image represented id3d11shaderresourceview
? create 2d texture using
id3d11shaderresourceview* m_texture; d3dx11createshaderresourceviewfromfile(d3ddevice, filename, null, null, &m_texture, null);
now want dimensions of image represented m_texture
. how?
if call getresource(&resource) on id3d11shaderresourceview it'll return underlying id3d11texture2d (after cast). can call getdesc(&desc) , inspect width , height members of d3d11_texture2d_desc.
Comments
Post a Comment