summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-03-30 01:47:48 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-03-30 01:47:48 +0000
commitf3a224a1f19e9d67cb683a965d1fb88636eabf6c (patch)
treed534df76090785f2ef70eb9634d07aa0be0f52dc /Graphics/GraphicsEngine
parentAdded shader name output when shader compilation fails (diff)
downloadDiligentCore-f3a224a1f19e9d67cb683a965d1fb88636eabf6c.tar.gz
DiligentCore-f3a224a1f19e9d67cb683a965d1fb88636eabf6c.zip
Implemented hardware adapter and display mode enumeration
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/GraphicsTypes.h87
1 files changed, 87 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
index c8ee913a..2a223e43 100644
--- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h
+++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
@@ -909,6 +909,93 @@ namespace Diligent
{}
};
+ /// Hardware adapter attributes
+ struct HardwareAdapterAttribs
+ {
+ /// A string that contains the adapter description
+ char Description[128];
+
+ /// Dedicated video memory, in bytes
+ size_t DedicatedVideoMemory;
+
+ /// Dedicated system memory, in bytes
+ size_t DedicatedSystemMemory;
+
+ /// Dedicated shared memory, in bytes
+ size_t SharedSystemMemory;
+
+ /// The PCI ID of the hardware vendor
+ Uint32 VendorId;
+
+ /// The PCI ID of the hardware device
+ Uint32 DeviceId;
+
+ /// Number of outputs this device has
+ Uint32 NumOutputs;
+ };
+
+
+ /// Display mode attributes
+ struct DisplayModeAttribs
+ {
+ /// Flags indicating how an image is stretched to fit a given monitor's resolution.
+ /// \sa <a href = "https://msdn.microsoft.com/en-us/library/windows/desktop/bb173066(v=vs.85).aspx">DXGI_MODE_SCALING enumeration on MSDN</a>,
+ enum SCALING
+ {
+ /// Unspecified scaling.
+ /// D3D Counterpart: DXGI_MODE_SCALING_UNSPECIFIED.
+ SCALING_UNSPECIFIED = 0,
+
+ /// Specifies no scaling. The image is centered on the display.
+ /// This flag is typically used for a fixed-dot-pitch display (such as an LED display).
+ /// D3D Counterpart: DXGI_MODE_SCALING_CENTERED.
+ SCALING_CENTERED = 1,
+
+ /// Specifies stretched scaling.
+ /// D3D Counterpart: DXGI_MODE_SCALING_STRETCHED.
+ SCALING_STRETCHED = 2
+ };
+
+ /// Flags indicating the method the raster uses to create an image on a surface.
+ /// \sa <a href = "https://msdn.microsoft.com/en-us/library/windows/desktop/bb173067">DXGI_MODE_SCANLINE_ORDER enumeration on MSDN</a>,
+ enum SCANLINE_ORDER
+ {
+ /// Scanline order is unspecified
+ /// D3D Counterpart: DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED.
+ SCANLINE_ORDER_UNSPECIFIED = 0,
+
+ /// The image is created from the first scanline to the last without skipping any
+ /// D3D Counterpart: DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE.
+ SCANLINE_ORDER_PROGRESSIVE = 1,
+
+ /// The image is created beginning with the upper field
+ /// D3D Counterpart: DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST.
+ SCANLINE_ORDER_UPPER_FIELD_FIRST = 2,
+
+ /// The image is created beginning with the lower field
+ /// D3D Counterpart: DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST.
+ SCANLINE_ORDER_LOWER_FIELD_FIRST = 3
+ };
+
+ /// Display resolution width
+ Uint32 Width = 0;
+
+ /// Display resolution height
+ Uint32 Height = 0;
+
+ /// Display format
+ TEXTURE_FORMAT Format = TEX_FORMAT_UNKNOWN;
+
+ /// Display refresh rate
+ double RefreshRate = 0.0;
+
+ /// The scanline drawing mode.
+ SCALING Scaling = SCALING_UNSPECIFIED;
+
+ /// The scaling mode.
+ SCANLINE_ORDER ScanlineOrder = SCANLINE_ORDER_UNSPECIFIED;
+ };
+
/// Swap chain description
struct SwapChainDesc
{