1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS ReactX 4 * FILE: dll/directx/d3d9/d3d9_swapchain.h 5 * PURPOSE: Direct3D9's swap chain object 6 * PROGRAMERS: Gregor Gullwi <gbrunmar (dot) ros (at) gmail (dot) com> 7 */ 8 #ifndef _D3D9_SWAPCHAIN_H_ 9 #define _D3D9_SWAPCHAIN_H_ 10 11 #include "d3d9_common.h" 12 #include <d3d9.h> 13 #include <ddraw.h> 14 #include "d3d9_baseobject.h" 15 16 struct _Direct3DDevice9_INT; 17 18 typedef struct _Direct3DSwapChain9_INT 19 { 20 /* 0x0000 */ D3D9BaseObject BaseObject; 21 /* 0x0020 */ struct IDirect3DSwapChain9Vtbl* lpVtbl; 22 /* 0x0024 */ DWORD dwUnknown0024; 23 /* 0x0028 */ struct _D3D9Surface* pPrimarySurface; 24 /* 0x002c */ struct _D3D9Surface* pExtendedPrimarySurface; 25 /* 0x0030 */ DWORD dwUnknown0030; 26 /* 0x0034 */ struct _D3D9DriverSurface** ppBackBufferList; 27 /* 0x0038 */ DWORD dwNumBackBuffers; 28 /* 0x003c */ DWORD ChainIndex; 29 /* 0x0040 */ DWORD AdapterGroupIndex; 30 /* 0x0044 */ D3DPRESENT_PARAMETERS PresentParameters; 31 /* 0x007c */ DWORD dwUnknown007c; 32 /* 0x0080 */ DWORD dwUnknown0080[2]; /* Extended format? */ 33 /* 0x0088 */ struct _D3D9Cursor* pCursor; 34 /* 0x008c */ DWORD dwUnknown008c[4]; 35 /* 0x009c */ struct _D3D9_Unknown6BC* pUnknown6BC; 36 /* 0x00a0 */ LPDWORD dwUnknown00a0; 37 /* 0x00a4 */ DWORD dwUnknown00a4; 38 /* 0x00a8 */ DWORD dwUnknown00a8; 39 /* 0x00ac */ DWORD dwWidth; 40 /* 0x00b0 */ DWORD dwHeight; 41 /* 0x00b4 */ DWORD dwUnknown00b4; 42 /* 0x00b8 */ DWORD dwUnknown00b8; 43 /* 0x00bc */ DWORD dwUnknown00bc; 44 /* 0x00c0 */ DWORD dwWidth2; 45 /* 0x00c4 */ DWORD dwHeight2; 46 /* 0x00c8 */ DWORD dwUnknown00c8; 47 /* 0x00cc */ DWORD dwUnknown00cc; 48 /* 0x00d0 */ DWORD dwUnknown00d0; 49 /* 0x00d4 */ DWORD dwUnknown00d4; 50 /* 0x00d8 */ DWORD dwUnknown00d8; 51 /* 0x00dc */ DWORD dwUnknown00dc; 52 /* 0x00e0 */ DWORD dwDevModeScale; 53 /* 0x00e4 */ DWORD dwUnknown00e4; 54 /* 0x00e8 */ DWORD dwUnknown00e8; 55 /* 0x00ec */ DWORD dwUnknown00ec; 56 /* 0x00f0 */ DWORD dwUnknown00f0[27]; 57 58 /* 0x015c */ LPVOID pUnknown015c; 59 /* 0x0160 */ DWORD dwUnknown0160[4]; 60 /* 0x0170 */ HRESULT hResult; 61 62 /* 0x0174 */ DWORD dwUnknown0174[26]; 63 64 /* 0x01DC */ DWORD dwUnknownFlags; /* 1 = Show frame rate, 2 = Flip without vsync */ 65 /* 0x01E0 */ BOOL bForceRefreshRate; 66 /* 0x01E4 */ DWORD dwUnknown01dc[4]; 67 68 /* 0x01f4 */ D3DSWAPEFFECT SwapEffect; 69 /* 0x01f8 */ DWORD dwUnknown01f8; 70 /* 0x01fc */ DWORD dwUnknown01fc; 71 /* 0x0200 */ D3DGAMMARAMP GammaRamp; 72 } Direct3DSwapChain9_INT, FAR* LPDIRECT3DSWAPCHAIN9_INT; 73 74 LPDIRECT3DSWAPCHAIN9_INT IDirect3DSwapChain9ToImpl(LPDIRECT3DSWAPCHAIN9 iface); 75 Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice, DWORD ChainIndex); 76 77 VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); 78 HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); 79 HRESULT Direct3DSwapChain9_Reset(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters); 80 VOID Direct3DSwapChain9_GetGammaRamp(Direct3DSwapChain9_INT* pThisSwapChain, D3DGAMMARAMP* pRamp); 81 VOID Direct3DSwapChain9_SetGammaRamp(Direct3DSwapChain9_INT* pThisSwapChain, DWORD Flags, CONST D3DGAMMARAMP* pRamp); 82 83 #endif // _D3D9_SWAPCHAIN_H_ 84