1 /***********************************************************************\ 2 * dxgitype.d * 3 * * 4 * Windows API header module * 5 * * 6 * Placed into public domain * 7 \***********************************************************************/ 8 module win32.directx.dxgitype; 9 version(Windows): 10 11 private import win32.windows; 12 13 const _FACDXGI = 0x87a; 14 15 HRESULT MAKE_DXGI_HRESULT(T)(T code) { 16 return MAKE_HRESULT(1, _FACDXGI, code); 17 } 18 19 HRESULT MAKE_DXGI_STATUS(T)(T code) { 20 return MAKE_HRESULT(0, _FACDXGI, code); 21 } 22 23 const HRESULT DXGI_STATUS_OCCLUDED = MAKE_DXGI_STATUS(1); 24 const HRESULT DXGI_STATUS_CLIPPED = MAKE_DXGI_STATUS(2); 25 const HRESULT DXGI_STATUS_NO_REDIRECTION = MAKE_DXGI_STATUS(4); 26 const HRESULT DXGI_STATUS_NO_DESKTOP_ACCESS = MAKE_DXGI_STATUS(5); 27 const HRESULT DXGI_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE = MAKE_DXGI_STATUS(6); 28 const HRESULT DXGI_STATUS_MODE_CHANGED = MAKE_DXGI_STATUS(7); 29 const HRESULT DXGI_STATUS_MODE_CHANGE_IN_PROGRESS = MAKE_DXGI_STATUS(8); 30 const HRESULT DXGI_ERROR_INVALID_CALL = MAKE_DXGI_HRESULT( 1); 31 const HRESULT DXGI_ERROR_NOT_FOUND = MAKE_DXGI_HRESULT( 2); 32 const HRESULT DXGI_ERROR_MORE_DATA = MAKE_DXGI_HRESULT( 3); 33 const HRESULT DXGI_ERROR_UNSUPPORTED = MAKE_DXGI_HRESULT( 4); 34 const HRESULT DXGI_ERROR_DEVICE_REMOVED = MAKE_DXGI_HRESULT( 5); 35 const HRESULT DXGI_ERROR_DEVICE_HUNG = MAKE_DXGI_HRESULT( 6); 36 const HRESULT DXGI_ERROR_DEVICE_RESET = MAKE_DXGI_HRESULT( 7); 37 const HRESULT DXGI_ERROR_WAS_STILL_DRAWING = MAKE_DXGI_HRESULT(10); 38 const HRESULT DXGI_ERROR_FRAME_STATISTICS_DISJOINT = MAKE_DXGI_HRESULT(11); 39 const HRESULT DXGI_ERROR_GRAPHICS_VIDPN_SOURCE_IN_USE = MAKE_DXGI_HRESULT(12); 40 const HRESULT DXGI_ERROR_DRIVER_INTERNAL_ERROR = MAKE_DXGI_HRESULT(32); 41 const HRESULT DXGI_ERROR_NONEXCLUSIVE = MAKE_DXGI_HRESULT(33); 42 const HRESULT DXGI_ERROR_NOT_CURRENTLY_AVAILABLE = MAKE_DXGI_HRESULT(34); 43 const HRESULT DXGI_FORMAT_DEFINED = 1; 44 45 enum DXGI_FORMAT { 46 DXGI_FORMAT_UNKNOWN = 0, 47 DXGI_FORMAT_R32G32B32A32_TYPELESS, 48 DXGI_FORMAT_R32G32B32A32_FLOAT, 49 DXGI_FORMAT_R32G32B32A32_UINT, 50 DXGI_FORMAT_R32G32B32A32_SINT, 51 DXGI_FORMAT_R32G32B32_TYPELESS, 52 DXGI_FORMAT_R32G32B32_FLOAT, 53 DXGI_FORMAT_R32G32B32_UINT, 54 DXGI_FORMAT_R32G32B32_SINT, 55 DXGI_FORMAT_R16G16B16A16_TYPELESS, 56 DXGI_FORMAT_R16G16B16A16_FLOAT, 57 DXGI_FORMAT_R16G16B16A16_UNORM, 58 DXGI_FORMAT_R16G16B16A16_UINT, 59 DXGI_FORMAT_R16G16B16A16_SNORM, 60 DXGI_FORMAT_R16G16B16A16_SINT, 61 DXGI_FORMAT_R32G32_TYPELESS, 62 DXGI_FORMAT_R32G32_FLOAT, 63 DXGI_FORMAT_R32G32_UINT, 64 DXGI_FORMAT_R32G32_SINT, 65 DXGI_FORMAT_R32G8X24_TYPELESS, 66 DXGI_FORMAT_D32_FLOAT_S8X24_UINT, 67 DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS, 68 DXGI_FORMAT_X32_TYPELESS_G8X24_UINT, 69 DXGI_FORMAT_R10G10B10A2_TYPELESS, 70 DXGI_FORMAT_R10G10B10A2_UNORM, 71 DXGI_FORMAT_R10G10B10A2_UINT, 72 DXGI_FORMAT_R11G11B10_FLOAT, 73 DXGI_FORMAT_R8G8B8A8_TYPELESS, 74 DXGI_FORMAT_R8G8B8A8_UNORM, 75 DXGI_FORMAT_R8G8B8A8_UNORM_SRGB, 76 DXGI_FORMAT_R8G8B8A8_UINT, 77 DXGI_FORMAT_R8G8B8A8_SNORM, 78 DXGI_FORMAT_R8G8B8A8_SINT, 79 DXGI_FORMAT_R16G16_TYPELESS, 80 DXGI_FORMAT_R16G16_FLOAT, 81 DXGI_FORMAT_R16G16_UNORM, 82 DXGI_FORMAT_R16G16_UINT, 83 DXGI_FORMAT_R16G16_SNORM, 84 DXGI_FORMAT_R16G16_SINT, 85 DXGI_FORMAT_R32_TYPELESS, 86 DXGI_FORMAT_D32_FLOAT, 87 DXGI_FORMAT_R32_FLOAT, 88 DXGI_FORMAT_R32_UINT, 89 DXGI_FORMAT_R32_SINT, 90 DXGI_FORMAT_R24G8_TYPELESS, 91 DXGI_FORMAT_D24_UNORM_S8_UINT, 92 DXGI_FORMAT_R24_UNORM_X8_TYPELESS, 93 DXGI_FORMAT_X24_TYPELESS_G8_UINT, 94 DXGI_FORMAT_R8G8_TYPELESS, 95 DXGI_FORMAT_R8G8_UNORM, 96 DXGI_FORMAT_R8G8_UINT, 97 DXGI_FORMAT_R8G8_SNORM, 98 DXGI_FORMAT_R8G8_SINT, 99 DXGI_FORMAT_R16_TYPELESS, 100 DXGI_FORMAT_R16_FLOAT, 101 DXGI_FORMAT_D16_UNORM, 102 DXGI_FORMAT_R16_UNORM, 103 DXGI_FORMAT_R16_UINT, 104 DXGI_FORMAT_R16_SNORM, 105 DXGI_FORMAT_R16_SINT, 106 DXGI_FORMAT_R8_TYPELESS, 107 DXGI_FORMAT_R8_UNORM, 108 DXGI_FORMAT_R8_UINT, 109 DXGI_FORMAT_R8_SNORM, 110 DXGI_FORMAT_R8_SINT, 111 DXGI_FORMAT_A8_UNORM, 112 DXGI_FORMAT_R1_UNORM, 113 DXGI_FORMAT_R9G9B9E5_SHAREDEXP, 114 DXGI_FORMAT_R8G8_B8G8_UNORM, 115 DXGI_FORMAT_G8R8_G8B8_UNORM, 116 DXGI_FORMAT_BC1_TYPELESS, 117 DXGI_FORMAT_BC1_UNORM, 118 DXGI_FORMAT_BC1_UNORM_SRGB, 119 DXGI_FORMAT_BC2_TYPELESS, 120 DXGI_FORMAT_BC2_UNORM, 121 DXGI_FORMAT_BC2_UNORM_SRGB, 122 DXGI_FORMAT_BC3_TYPELESS, 123 DXGI_FORMAT_BC3_UNORM, 124 DXGI_FORMAT_BC3_UNORM_SRGB, 125 DXGI_FORMAT_BC4_TYPELESS, 126 DXGI_FORMAT_BC4_UNORM, 127 DXGI_FORMAT_BC4_SNORM, 128 DXGI_FORMAT_BC5_TYPELESS, 129 DXGI_FORMAT_BC5_UNORM, 130 DXGI_FORMAT_BC5_SNORM, 131 DXGI_FORMAT_B5G6R5_UNORM, 132 DXGI_FORMAT_B5G5R5A1_UNORM, 133 DXGI_FORMAT_B8G8R8A8_UNORM, 134 DXGI_FORMAT_B8G8R8X8_UNORM, 135 DXGI_FORMAT_FORCE_UINT = 0xffffffff 136 } 137 138 struct DXGI_RGB { 139 float Red; 140 float Green; 141 float Blue; 142 } 143 144 struct DXGI_GAMMA_CONTROL { 145 DXGI_RGB Scale; 146 DXGI_RGB Offset; 147 DXGI_RGB[1025] GammaCurve; 148 } 149 150 struct DXGI_GAMMA_CONTROL_CAPABILITIES { 151 BOOL ScaleAndOffsetSupported; 152 float MaxConvertedValue; 153 float MinConvertedValue; 154 UINT NumGammaControlPoints; 155 float[1025] ControlPointPositions; 156 } 157 158 struct DXGI_RATIONAL { 159 UINT Numerator; 160 UINT Denominator; 161 } 162 163 enum DXGI_MODE_SCANLINE_ORDER { 164 DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED = 0, 165 DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE = 1, 166 DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST = 2, 167 DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST = 3 168 } 169 170 enum DXGI_MODE_SCALING { 171 DXGI_MODE_SCALING_UNSPECIFIED = 0, 172 DXGI_MODE_SCALING_CENTERED = 1, 173 DXGI_MODE_SCALING_STRETCHED = 2 174 } 175 176 enum DXGI_MODE_ROTATION { 177 DXGI_MODE_ROTATION_UNSPECIFIED = 0, 178 DXGI_MODE_ROTATION_IDENTITY = 1, 179 DXGI_MODE_ROTATION_ROTATE90 = 2, 180 DXGI_MODE_ROTATION_ROTATE180 = 3, 181 DXGI_MODE_ROTATION_ROTATE270 = 4 182 } 183 184 struct DXGI_MODE_DESC { 185 UINT Width; 186 UINT Height; 187 DXGI_RATIONAL RefreshRate; 188 DXGI_FORMAT Format; 189 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering; 190 DXGI_MODE_SCALING Scaling; 191 } 192 193 struct DXGI_SAMPLE_DESC { 194 UINT Count; 195 UINT Quality; 196 }