Click or drag to resize
AB4D logo

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.Materials
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.0.8865.1045
Syntax
C#
public static ShaderResourceView CreateTexture2D(
	DXDevice dxDevice,
	BitmapSource wpfBitmapSource
)

Parameters

dxDevice  DXDevice
DXDevice used to create the texture
wpfBitmapSource  BitmapSource
BitmapSource

Return Value

ShaderResourceView
ShaderResourceView created from the specified WPF BitmapSource or null if the texture cannot be created.
See Also