DXGI Structures

This section describes the structures used by the DirectX Graphics Infrastructure (DXGI).

DXGI_ADAPTER_DESC

Describes an adapter (GPU).

typedef struct DXGI_ADAPTER_DESC {
  [out]  LPCWSTR Description;
  [out]  UINT VendorId;
  [out]  UINT DeviceId;
  [out]  UINT SubsystemId;
  [out]  UINT Revision;
  [out]  SIZE_T DedicatedVideoMemory;
  [out]  SIZE_T DedicatedSystemMemory;
  [out]  SIZE_T SharedSystemMemory;
  [out]  LUID AdapterLuid;
} DXGI_ADAPTER_DESC;
                    

Members:

  • Description: A string that contains the adapter description.
  • VendorId: The PCI vendor ID.
  • DeviceId: The PCI device ID.
  • SubsystemId: The PCI subsystem ID.
  • Revision: The PCI revision.
  • DedicatedVideoMemory: The amount of dedicated video memory.
  • DedicatedSystemMemory: The amount of dedicated system memory.
  • SharedSystemMemory: The amount of shared system memory.
  • AdapterLuid: A locally unique identifier for the adapter.

DXGI_OUTPUT_DESC

Describes an output (monitor).

typedef struct DXGI_OUTPUT_DESC {
  [out]  WCHAR DesktopCoordinates[DXGI_MAX_PATH];
  [out]  POINT Position;
  [out]  struct DXGI_MODE_FULLSCREEN_RUN नियंत्रक Monitor;
  [out]  BOOL  Connected;
  [out]  DXGI_MODE_ROTATION Rotation;
  [out]  float BlendState;
} DXGI_OUTPUT_DESC;
                    

Members:

  • DesktopCoordinates: The desktop coordinates of the output.
  • Position: The position of the output on the desktop.
  • Monitor: Information about the monitor.
  • Connected: Indicates if the output is connected.
  • Rotation: The rotation of the output.
  • BlendState: The blend state of the output.

DXGI_SWAP_CHAIN_DESC

Describes a swap chain.

typedef struct DXGI_SWAP_CHAIN_DESC {
  DXGI_MODE_DESC       BufferDesc;
  DXGI_SAMPLE_DESC     SampleDesc;
  DXGI_USAGE           BufferUsage;
  UINT                 BufferCount;
  DXGI_SWAP_EFFECT     SwapEffect;
  DXGI_SWAP_CHAIN_FLAG SwapChainFlags;
} DXGI_SWAP_CHAIN_DESC;
                    

Members:

  • BufferDesc: Describes the back buffer.
  • SampleDesc: Describes the multi-sampling parameters.
  • BufferUsage: Describes the usage of the back buffer.
  • BufferCount: The number of buffers in the swap chain.
  • SwapEffect: The swap effect to use.
  • SwapChainFlags: Flags for the swap chain.

DXGI_MODE_DESC

Describes a display mode.

typedef struct DXGI_MODE_DESC {
  UINT Width;
  UINT Height;
  DXGI_RATIONAL RefreshRate;
  DXGI_FORMAT Format;
  DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
  DXGI_MODE_SCALING Scaling;
} DXGI_MODE_DESC;
                    

Members:

  • Width: The width of the display mode.
  • Height: The height of the display mode.
  • RefreshRate: The refresh rate of the display mode.
  • Format: The format of the display mode.
  • ScanlineOrdering: The scanline ordering of the display mode.
  • Scaling: The scaling of the display mode.

DXGI_RATIONAL

Represents a rational number.

typedef struct DXGI_RATIONAL {
  UINT Numerator;
  UINT Denominator;
} DXGI_RATIONAL;
                    

Members:

  • Numerator: The numerator of the rational number.
  • Denominator: The denominator of the rational number.