Click or drag to resize
AB4D logo

TextureLoaderCreateShaderResourceView(Device, Byte, Int32, Int32, Int32, Format, Boolean) Method

CreateShaderResourceView returns a ShaderResourceView from the specified byte array. The method can also generate mipmaps when generateMipMaps is set to true (by default).

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public static ShaderResourceView CreateShaderResourceView(
	Device device,
	byte[] textureBytes,
	int textureWidth,
	int textureHeight,
	int sourceStride,
	Format dxgiFormat,
	bool generateMipMaps = true
)

Parameters

device  Device
DirectX 11 device
textureBytes  Byte
array of bytes with texture data
textureWidth  Int32
texture width
textureHeight  Int32
texture height
sourceStride  Int32
length of one data row in bytes
dxgiFormat  Format
texture format
generateMipMaps  Boolean  (Optional)
when true (by default) mipmaps will be generated

Return Value

ShaderResourceView
ShaderResourceView that can be used as DirectX shader resource.
See Also