 |
WpfMaterialCreateTexture2D(DXDevice, BitmapSource) 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
Syntaxpublic static ShaderResourceView CreateTexture2D(
DXDevice dxDevice,
BitmapSource wpfBitmapSource
)
Parameters
- dxDevice DXDevice
- DXDevice used to create the texture
- wpfBitmapSource BitmapSource
- BitmapSource
Return Value
ShaderResourceViewShaderResourceView created from the specified WPF BitmapSource or null if the texture cannot be created.
See Also