Click or drag to resize
AB4D logo

TextureLoaderCreateShaderResourceView(Device, Byte, Int32, Int32, Int32, Format, Boolean, 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,
	out bool hasTransparency
)

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
when true (by default) mipmaps will be generated
hasTransparency  Boolean
out boolean parameters that is set to true when the loaded image contains transparent pixels (where alpha is less the 1); for fully opaque image false is returned

Return Value

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