Class DdsFrameDecode
[Guid("3d4c0c61-18a4-41e4-bd80-481a4fc9f464")]
public class DdsFrameDecode : ComObject
- Inheritance
-
DdsFrameDecode
Constructors
DdsFrameDecode(nint)
public DdsFrameDecode(nint nativePtr)
Parameters
nativePtr
nint
Properties
FormatInfo
Gets information about the format in which the DDS image is stored.
public DdsFormatInfo FormatInfo { get; }
Property Value
Remarks
This information can be used for allocating memory or constructing Direct3D or Direct2D resources, for example by using ID3D11Device::CreateTexture2D or ID2D1DeviceContext::CreateBitmap.
SizeInBlocks
public Size2 SizeInBlocks { get; }
Property Value
- Size2
Methods
CopyBlocks(RawBox?, int, DataStream)
[This documentation is preliminary and is subject to change.]
Requests pixel data as it is natively stored within the DDS file.
public void CopyBlocks(RawBox? boundsInBlocks, int stride, DataStream destination)
Parameters
boundsInBlocks
RawBox?The rectangle to copy from the source. A
null
value specifies the entire texture.If the texture uses a block-compressed SharpDX.DXGI.Format, all values of the rectangle are expressed in number of blocks, not pixels.
stride
intThe stride, in bytes, of the destination buffer. This represents the number of bytes from the buffer reference to the next row of data. If the texture uses a block-compressed SharpDX.DXGI.Format, a "row of data" is defined as a row of blocks which contains multiple pixel scanlines.
destination
DataStreamA reference to the destination buffer.
Remarks
If the texture does not use a block-compressed SharpDX.DXGI.Format, this method behaves similarly to CopyPixels(RawBox, int, DataPointer). However, it does not perform any pixel format conversion, and instead produces the raw data from the DDS file.
If the texture uses a block-compressed SharpDX.DXGI.Format, this method copies the block data directly into the provided buffer. In this case, the prcBoundsInBlocks parameter is defined in blocks, not pixels. To determine if this is the case, call GetFormatInfo and read the DxgiFormat member of the returned DdsFormatInfo structure.
Operators
explicit operator DdsFrameDecode(nint)
public static explicit operator DdsFrameDecode(nint nativePtr)
Parameters
nativePtr
nint