|
WpfMaterialCreateTexture2D(DXDevice, BitmapSource, TextureInfo) Method |
CreateTexture2D creates a 2D Texture from the specified WPF BitmapSource and returns a ShaderResourceView for the texture.
User must dispose the returned ShaderResourceView when it is not used any more to prevent memory leak.
Namespace: Ab3d.DirectX.MaterialsAssembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.1.9105.2048
Syntax public static ShaderResourceView CreateTexture2D(
DXDevice dxDevice,
BitmapSource wpfBitmapSource,
out TextureInfo textureInfo
)
Parameters
- dxDevice DXDevice
- DXDevice used to create the texture
- wpfBitmapSource BitmapSource
- BitmapSource
- textureInfo TextureInfo
- TextureInfo class that provides information about the loaded bitmap
Return Value
ShaderResourceViewShaderResourceView created from the specified WPF BitmapSource or null if the texture cannot be created.
See Also