1 #ifndef _D3D9_SURFACE_H_ 2 #define _D3D9_SURFACE_H_ 3 4 #include "d3d9_baseobject.h" 5 6 struct _D3D9BaseSurface; 7 8 typedef struct _D3D9BaseSurfaceVtbl 9 { 10 HRESULT (*QueryInterface)(struct _D3D9BaseSurface* iface, REFIID riid, LPVOID* ppvObject); 11 ULONG (*AddRef)(struct _D3D9BaseSurface* iface); 12 ULONG (*Release)(struct _D3D9BaseSurface* iface); 13 IDirect3DDevice9* (*GetDevice)(struct _D3D9BaseSurface* iface); 14 HRESULT (*SetPrivateData)(struct _D3D9BaseSurface* iface, REFIID riid, CONST LPVOID pData, DWORD DataSize, DWORD Flags); 15 HRESULT (*GetPrivateData)(struct _D3D9BaseSurface* iface, REFIID riid, LPVOID pData, DWORD* DataSize); 16 HRESULT (*FreePrivateData)(struct _D3D9BaseSurface* iface, REFIID riid); 17 DWORD (*SetPriority)(struct _D3D9BaseSurface* iface, DWORD NewPriority); 18 DWORD (*GetPriority)(struct _D3D9BaseSurface* iface); 19 VOID (*Load)(struct _D3D9BaseSurface* iface); 20 D3DRESOURCETYPE (*GetResourceType)(struct _D3D9BaseSurface* iface); 21 22 } ID3D9BaseSurfaceVtbl; 23 24 25 typedef struct _D3D9BaseSurface 26 { 27 /* 0x0020 */ ID3D9BaseSurfaceVtbl* lpVtbl; 28 /* 0x0024 */ D3DFORMAT DisplayFormat2; // Back buffer format? 29 /* 0x0028 */ DWORD dwUnknown0028; // Constant/ref count? (1) 30 /* 0x002c */ DWORD dwUnknown002c; // Refresh rate? 31 /* 0x0030 */ D3DPOOL SurfacePool; 32 /* 0x0034 */ DWORD dwUnknown0034; 33 /* 0x0038 */ DWORD dwUnknown0038; 34 /* 0x003c */ DWORD dwWidth; 35 /* 0x0040 */ DWORD dwHeight; 36 /* 0x0044 */ D3DPOOL ResourcePool; 37 /* 0x0048 */ D3DFORMAT DisplayFormat; 38 /* 0x004c */ DWORD dwUnknown004c; 39 /* 0x0050 */ DWORD dwUnknown0050; 40 /* 0x0054 */ DWORD dwUnknown0054; 41 /* 0x0058 */ DWORD dwBpp; 42 } D3D9BaseSurface; 43 44 typedef struct _D3D9Surface 45 { 46 /* 0x0000 */ D3D9BaseObject BaseObject; 47 /* 0x0020 */ D3D9BaseSurface BaseSurface; 48 } D3D9Surface; 49 50 typedef struct _D3D9DriverSurface 51 { 52 /* 0x0000 */ D3D9Surface BaseD3D9Surface; 53 /* 0x005c */ DWORD dwUnknown5c; 54 /* 0x0060 */ DWORD dwUnknown60; 55 /* 0x0064 */ struct _D3D9DriverSurface* pPreviousDriverSurface; 56 /* 0x0068 */ struct _D3D9DriverSurface* pNextDriverSurface; 57 /* 0x006c */ DWORD dwUnknown6c[8]; 58 } D3D9DriverSurface; 59 60 #endif // _D3D9_SURFACE_H_ 61