1 module aurora.directx.dxgi.dxgi1_3; 2 3 version(Windows): 4 5 import aurora.directx.com; 6 public import aurora.directx.dxgi.dxgitype; 7 public import aurora.directx.dxgi.dxgicommon; 8 public import aurora.directx.dxgi.dxgiformat; 9 public import aurora.directx.dxgi.dxgi1_2; 10 11 public: 12 13 // 14 // Constants 15 // 16 17 //DXGI_CREATE_FACTORY 18 enum DXGI_CREATE_FACTORY_NORMAL = (0U); 19 enum DXGI_CREATE_FACTORY_DEBUG = (1U); 20 21 //DXGI_PRESENT 22 enum DXGI_PRESENT_USE_DURATION = (0x00000100U); 23 24 // 25 // Enumerations 26 // 27 28 29 30 // 31 // Structures 32 // 33 34 public struct DXGI_DECODE_SWAP_CHAIN_DESC { 35 uint Flags; 36 } 37 38 public struct DXGI_FRAME_STATISTICS_MEDIA { 39 DXGI_FRAME_STATISTICS Base; 40 alias Base this; 41 DXGI_FRAME_PRESENTATION_MODE CompositionMode; 42 UINT ApprovedPresentDuration; 43 } 44 45 public struct DXGI_MATRIX_3X2_F { 46 float _11; 47 float _12; 48 float _21; 49 float _22; 50 float _31; 51 float _32; 52 } 53 54 enum DXGI_OVERLAY_SUPPORT_FLAG 55 { 56 DIRECT = 0x1, 57 SCALING = 0x2 58 } 59 60 // 61 // Interfaces 62 // 63 64 mixin(uuid!(IDXGIDebug1, "c5a05f0c-16f2-4adf-9f4d-a8c4d58ac550")); 65 public interface IDXGIDebug1 : IDXGIDebug 66 { 67 extern(Windows): 68 void DisableLeakTrackingForThread(); 69 void EnableLeakTrackingForThread(); 70 bool IsLeakTrackingEnabledForThread(); 71 } 72 73 mixin(uuid!(IDXGIDecodeSwapChain, "2633066b-4514-4c7a-8fd8-12ea98059d18")); 74 public interface IDXGIDecodeSwapChain : IUnknown 75 { 76 extern(Windows): 77 DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS GetColorSpace(); 78 HRESULT GetDestSize(uint *Width, uint *Height); 79 HRESULT GetSourceRect(RECT *Rect); 80 HRESULT GetTargetRect(RECT *Rect); 81 HRESULT PresentBuffer(uint BufferToPresent, uint SyncInterval, uint Flags); 82 HRESULT SetColorSpace(DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS ColorSpace); 83 HRESULT SetDestSize(uint Width, uint Height); 84 HRESULT SetSourceRect(const RECT *Rect); 85 HRESULT SetTargetRect(const RECT *Rect); 86 } 87 88 mixin(uuid!(IDXGIDevice3, "6007896c-3244-4afd-bf18-a6d3beda5023")); 89 public interface IDXGIDevice3 : IDXGIDevice2 90 { 91 extern(Windows): 92 void Trim(); 93 } 94 95 mixin(uuid!(IDXGIFactory3, "25483823-cd46-4c7d-86ca-47aa95b837bd")); 96 interface IDXGIFactory3 : IDXGIFactory2 97 { 98 extern(Windows): 99 uint GetCreationFlags(); 100 } 101 102 mixin(uuid!(IDXGIFactoryMedia, "41e7d1f2-a591-4f7b-a2e5-fa9c843e1c12")); 103 public interface IDXGIFactoryMedia : IDXGIObject 104 { 105 extern(Windows): 106 HRESULT CreateDecodeSwapChainForCompositionSurfaceHandle(IUnknown Device, HANDLE Surface, const DXGI_DECODE_SWAP_CHAIN_DESC *Desc, IDXGIResource YuvDecodeBuffers, IDXGIOutput RestrictToOutput, IDXGIDecodeSwapChain *SwapChain); 107 HRESULT CreateSwapChainForCompositionSurfaceHandle(IUnknown Device, HANDLE Surface, const DXGI_SWAP_CHAIN_DESC1 *Desc, IDXGIOutput RestrictToOutput, IDXGISwapChain1 *SwapChain); 108 } 109 110 mixin(uuid!(IDXGIOutput2, "595e39d1-2724-4663-99b1-da969de28364")); 111 public interface IDXGIOutput2 : IDXGIOutput1 112 { 113 extern(Windows): 114 bool SupportsOverlays(); 115 } 116 117 mixin(uuid!(IDXGISwapChain2, "a8be2ac4-199f-4946-b331-79599fb98de7")); 118 public interface IDXGISwapChain2 : IDXGISwapChain1 119 { 120 extern(Windows): 121 HANDLE GetFrameLatencyWaitableObject(); 122 HRESULT GetMatrixTransform(DXGI_MATRIX_3X2_F *Matrix); 123 HRESULT GetMaximumFrameLatency(uint *MaxLatency); 124 HRESULT GetSourceSize(uint *Width, uint *Height); 125 HRESULT SetMatrixTransform(const DXGI_MATRIX_3X2_F *Matrix); 126 HRESULT SetMaximumFrameLatency(uint MaxLatency); 127 HRESULT SetSourceSize(uint Width, uint Height); 128 } 129 130 mixin(uuid!(IDXGISwapChainMedia,"dd95b90b-f05f-4f6a-bd65-25bfb264bd84")); 131 public interface IDXGISwapChainMedia : IUnknown 132 { 133 extern(Windows): 134 HRESULT CheckPresentDurationSupport(uint DesiredPresentDuration, uint *ClosestSmallerPresentDuration, uint *ClosestLargerPresentDuration); 135 HRESULT GetFrameStatisticsMedia(DXGI_FRAME_STATISTICS_MEDIA *Stats); 136 HRESULT SetPresentDuration(uint Duration); 137 } 138 139 mixin(uuid!(IDXGIOutput3, "8a6bb301-7e7e-41F4-a8e0-5b32f7f99b18")); 140 public interface IDXGIOutput3 : IDXGIOutput2 141 { 142 extern(Windows): 143 HRESULT CheckOverlaySupport(DXGI_FORMAT EnumFormat, IUnknown pConcernedDevice, uint *pFlags); 144 } 145 146 // 147 // Functions 148 // 149 150 extern(Windows) public HRESULT CreateDXGIFactory2(uint Flags, const(GUID)* RIID, void **Factory); 151 extern(Windows) public HRESULT DXGIGetDebugInterface1(uint Flags, const(GUID)* RIID, void **Debug);