/// <summary> /// Read DX10-DXGI header from full DDS header block. /// </summary> /// <param name="fullHeaderBlock">Entire DDS header block.</param> /// <param name="offset">Offset at which this header starts in full block.</param> public DDS_DXGI_DX10_Additional(byte[] fullHeaderBlock, int offset = 128) { dxgiFormat = (DXGI_FORMAT)BitConverter.ToInt32(fullHeaderBlock, offset); resourceDimension = (D3D10_RESOURCE_DIMENSION)BitConverter.ToInt32(fullHeaderBlock, offset + 4); miscFlag = (D3D10_RESOURCE_MISC_FLAGS)BitConverter.ToUInt32(fullHeaderBlock, offset + 8); arraySize = BitConverter.ToUInt32(fullHeaderBlock, offset + 12); miscFlags2 = (DXGI_MiscFlags)BitConverter.ToUInt32(fullHeaderBlock, offset + 16); }
/// <summary> /// Read DX10-DXGI header from full DDS header block. /// </summary> /// <param name="fullHeaderBlock">Entire DDS header block.</param> /// <param name="offset">Offset at which this header starts in full block.</param> public DDS_DXGI_DX10_Additional(byte[] fullHeaderBlock, int offset = 128) { dxgiFormat = (DXGI_FORMAT)BitConverter.ToInt32(fullHeaderBlock, offset); resourceDimension = (D3D10_RESOURCE_DIMENSION)BitConverter.ToInt64(fullHeaderBlock, offset + 4); miscFlag = (D3D10_RESOURCE_MISC_FLAGS)BitConverter.ToUInt32(fullHeaderBlock, offset + 12); arraySize = BitConverter.ToUInt32(fullHeaderBlock, offset + 16); miscFlags2 = (DXGI_MiscFlags)BitConverter.ToUInt32(fullHeaderBlock, offset + 20); }