Click or drag to resize
AB4D logo

WpfMaterialLoadTexture2D Method

Overload List
 NameDescription
Public methodStatic memberLoadTexture2D(DXDevice, String) LoadTexture2D loads a 2D Texture from the specified fileName and returns a ShaderResourceView for the texture. User must dispose the returned ShaderResourceView when it is not used any more to prevent memory leak. This method uses WPF's image loader - to load the image directly into DirectX use the LoadShaderResourceView(Device, String, TextureInfo) or LoadShaderResourceView(Device, String, Boolean, Boolean, Boolean, TextureInfo) methods instead.
Public methodStatic memberLoadTexture2D(DXDevice, String, TextureInfo) LoadTexture2D loads a 2D Texture from the specified fileName and returns a ShaderResourceView for the texture. User must dispose the returned ShaderResourceView when it is not used any more to prevent memory leak. This method uses WPF's image loader - to load the image directly into DirectX use the LoadShaderResourceView(Device, String, TextureInfo) or LoadShaderResourceView(Device, String, Boolean, Boolean, Boolean, TextureInfo) methods instead.
Top
See Also