Commit 0b56446e authored by Peter Hunnisett's avatar Peter Hunnisett Committed by Alexandre Julliard

- Added remaining DirectX 3D3 6&7 3D interfaces.

- Added d3dcaps.h, d3dtypes.h and rearranged contents according to DirectX 7 headers. - Fixed dsound.h include list (d3d.h->d3dtypes.h).
parent 991b03f8
......@@ -2,22 +2,28 @@
#define __WINE_D3D_H
#include "ddraw.h"
#include "d3dtypes.h" /* must precede d3dcaps.h */
#include "d3dcaps.h"
/*****************************************************************************
* Predeclare the interfaces
*/
DEFINE_GUID(IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
DEFINE_GUID(IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
DEFINE_GUID(IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
DEFINE_GUID(IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a);
DEFINE_GUID(IID_IDirect3D3, 0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e);
DEFINE_GUID(IID_IDirect3D7, 0xf5049e77,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
DEFINE_GUID(IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
DEFINE_GUID(IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
DEFINE_GUID(IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E);
DEFINE_GUID(IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29);
DEFINE_GUID(IID_IDirect3DRefDevice, 0x50936643,0x13e9,0x11d1,0x89,0xaa,0x00,0xa0,0xc9,0x05,0x41,0x29);
DEFINE_GUID(IID_IDirect3DTnLHalDevice, 0xf5049e78,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
DEFINE_GUID(IID_IDirect3DDevice, 0x64108800,0x957d,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
DEFINE_GUID(IID_IDirect3DDevice2, 0x93281501,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
DEFINE_GUID(IID_IDirect3DDevice3, 0xb0ab3b60,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
DEFINE_GUID(IID_IDirect3DDevice7, 0xf5049e79,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
DEFINE_GUID(IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56);
DEFINE_GUID(IID_IDirect3DTexture2, 0x93281502,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0,0xC9,0x05,0x41,0x29);
......@@ -35,24 +41,28 @@ DEFINE_GUID(IID_IDirect3DViewport2, 0x93281500,0x8CF8,0x11D0,0x89,0xAB,0x00,0xA0
DEFINE_GUID(IID_IDirect3DViewport3, 0xb0ab3b61,0x33d7,0x11d1,0xa9,0x81,0x00,0xc0,0x4f,0xd7,0xb1,0x74);
DEFINE_GUID(IID_IDirect3DVertexBuffer, 0x7a503555,0x4a83,0x11d1,0xa5,0xdb,0x00,0xa0,0xc9,0x03,0x67,0xf8);
DEFINE_GUID(IID_IDirect3DVertexBuffer7, 0xf5049e7d,0x4861,0x11d2,0xa4,0x07,0x00,0xa0,0xc9,0x06,0x29,0xa8);
typedef struct IDirect3D IDirect3D ,*LPDIRECT3D;
typedef struct IDirect3D2 IDirect3D2,*LPDIRECT3D2;
typedef struct IDirect3D2 IDirect3D3,*LPDIRECT3D3;
typedef struct IDirect3D3 IDirect3D3,*LPDIRECT3D3;
typedef struct IDirect3D7 IDirect3D7,*LPDIRECT3D7;
typedef struct IDirect3DLight IDirect3DLight,*LPDIRECT3DLIGHT;
typedef struct IDirect3DDevice IDirect3DDevice, *LPDIRECT3DDEVICE;
typedef struct IDirect3DDevice2 IDirect3DDevice2, *LPDIRECT3DDEVICE2;
typedef struct IDirect3DDevice2 IDirect3DDevice3, *LPDIRECT3DDEVICE3;
typedef struct IDirect3DDevice3 IDirect3DDevice3, *LPDIRECT3DDEVICE3;
typedef struct IDirect3DDevice7 IDirect3DDevice7, *LPDIRECT3DDEVICE7;
typedef struct IDirect3DViewport2 IDirect3DViewport, *LPDIRECT3DVIEWPORT;
typedef struct IDirect3DViewport2 IDirect3DViewport2, *LPDIRECT3DVIEWPORT2;
typedef struct IDirect3DViewport2 IDirect3DViewport3, *LPDIRECT3DVIEWPORT3;
typedef struct IDirect3DViewport3 IDirect3DViewport3, *LPDIRECT3DVIEWPORT3;
typedef struct IDirect3DMaterial2 IDirect3DMaterial, *LPDIRECT3DMATERIAL;
typedef struct IDirect3DMaterial2 IDirect3DMaterial2, *LPDIRECT3DMATERIAL2;
typedef struct IDirect3DMaterial2 IDirect3DMaterial3, *LPDIRECT3DMATERIAL3;
typedef struct IDirect3DMaterial3 IDirect3DMaterial3, *LPDIRECT3DMATERIAL3;
typedef struct IDirect3DTexture2 IDirect3DTexture, *LPDIRECT3DTEXTURE;
typedef struct IDirect3DTexture2 IDirect3DTexture2, *LPDIRECT3DTEXTURE2;
......@@ -60,6 +70,7 @@ typedef struct IDirect3DTexture2 IDirect3DTexture2, *LPDIRECT3DTEXTURE2;
typedef struct IDirect3DExecuteBuffer IDirect3DExecuteBuffer, *LPDIRECT3DEXECUTEBUFFER;
typedef struct IDirect3DVertexBuffer IDirect3DVertexBuffer, *LPDIRECT3DVERTEXBUFFER;
typedef struct IDirect3DVertexBuffer7 IDirect3DVertexBuffer7, *LPDIRECT3DVERTEXBUFFER7;
/* ********************************************************************
Error Codes
......@@ -127,1077 +138,11 @@ typedef struct IDirect3DVertexBuffer IDirect3DVertexBuffer, *LPDIRECT3DVERTEXBU
#define D3DNEXT_HEAD 0x02l
#define D3DNEXT_TAIL 0x04l
typedef enum {
D3DLIGHT_POINT = 1,
D3DLIGHT_SPOT = 2,
D3DLIGHT_DIRECTIONAL = 3,
D3DLIGHT_PARALLELPOINT = 4,
D3DLIGHT_FORCE_DWORD = 0x7fffffff
} D3DLIGHTTYPE;
typedef enum {
D3DPT_POINTLIST = 1,
D3DPT_LINELIST = 2,
D3DPT_LINESTRIP = 3,
D3DPT_TRIANGLELIST = 4,
D3DPT_TRIANGLESTRIP = 5,
D3DPT_TRIANGLEFAN = 6,
D3DPT_FORCE_DWORD = 0x7fffffff
} D3DPRIMITIVETYPE;
typedef enum {
D3DFILL_POINT = 1,
D3DFILL_WIREFRAME = 2,
D3DFILL_SOLID = 3,
D3DFILL_FORCE_DWORD = 0x7fffffff
} D3DFILLMODE;
typedef enum {
D3DSHADE_FLAT = 1,
D3DSHADE_GOURAUD = 2,
D3DSHADE_PHONG = 3,
D3DSHADE_FORCE_DWORD = 0x7fffffff
} D3DSHADEMODE;
typedef enum {
D3DCULL_NONE = 1,
D3DCULL_CW = 2,
D3DCULL_CCW = 3,
D3DCULL_FORCE_DWORD = 0x7fffffff
} D3DCULL;
typedef enum {
D3DBLEND_ZERO = 1,
D3DBLEND_ONE = 2,
D3DBLEND_SRCCOLOR = 3,
D3DBLEND_INVSRCCOLOR = 4,
D3DBLEND_SRCALPHA = 5,
D3DBLEND_INVSRCALPHA = 6,
D3DBLEND_DESTALPHA = 7,
D3DBLEND_INVDESTALPHA = 8,
D3DBLEND_DESTCOLOR = 9,
D3DBLEND_INVDESTCOLOR = 10,
D3DBLEND_SRCALPHASAT = 11,
D3DBLEND_BOTHSRCALPHA = 12,
D3DBLEND_BOTHINVSRCALPHA = 13,
D3DBLEND_FORCE_DWORD = 0x7fffffff
} D3DBLEND;
typedef enum {
D3DTBLEND_DECAL = 1,
D3DTBLEND_MODULATE = 2,
D3DTBLEND_DECALALPHA = 3,
D3DTBLEND_MODULATEALPHA = 4,
D3DTBLEND_DECALMASK = 5,
D3DTBLEND_MODULATEMASK = 6,
D3DTBLEND_COPY = 7,
D3DTBLEND_ADD = 8,
D3DTBLEND_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREBLEND;
typedef enum {
D3DFILTER_NEAREST = 1,
D3DFILTER_LINEAR = 2,
D3DFILTER_MIPNEAREST = 3,
D3DFILTER_MIPLINEAR = 4,
D3DFILTER_LINEARMIPNEAREST = 5,
D3DFILTER_LINEARMIPLINEAR = 6,
D3DFILTER_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREFILTER;
typedef enum {
D3DRENDERSTATE_TEXTUREHANDLE = 1, /* Texture handle */
D3DRENDERSTATE_ANTIALIAS = 2, /* D3DANTIALIASMODE */
D3DRENDERSTATE_TEXTUREADDRESS = 3, /* D3DTEXTUREADDRESS */
D3DRENDERSTATE_TEXTUREPERSPECTIVE = 4, /* TRUE for perspective correction */
D3DRENDERSTATE_WRAPU = 5, /* TRUE for wrapping in u */
D3DRENDERSTATE_WRAPV = 6, /* TRUE for wrapping in v */
D3DRENDERSTATE_ZENABLE = 7, /* TRUE to enable z test */
D3DRENDERSTATE_FILLMODE = 8, /* D3DFILL_MODE */
D3DRENDERSTATE_SHADEMODE = 9, /* D3DSHADEMODE */
D3DRENDERSTATE_LINEPATTERN = 10, /* D3DLINEPATTERN */
D3DRENDERSTATE_MONOENABLE = 11, /* TRUE to enable mono rasterization */
D3DRENDERSTATE_ROP2 = 12, /* ROP2 */
D3DRENDERSTATE_PLANEMASK = 13, /* DWORD physical plane mask */
D3DRENDERSTATE_ZWRITEENABLE = 14, /* TRUE to enable z writes */
D3DRENDERSTATE_ALPHATESTENABLE = 15, /* TRUE to enable alpha tests */
D3DRENDERSTATE_LASTPIXEL = 16, /* TRUE for last-pixel on lines */
D3DRENDERSTATE_TEXTUREMAG = 17, /* D3DTEXTUREFILTER */
D3DRENDERSTATE_TEXTUREMIN = 18, /* D3DTEXTUREFILTER */
D3DRENDERSTATE_SRCBLEND = 19, /* D3DBLEND */
D3DRENDERSTATE_DESTBLEND = 20, /* D3DBLEND */
D3DRENDERSTATE_TEXTUREMAPBLEND = 21, /* D3DTEXTUREBLEND */
D3DRENDERSTATE_CULLMODE = 22, /* D3DCULL */
D3DRENDERSTATE_ZFUNC = 23, /* D3DCMPFUNC */
D3DRENDERSTATE_ALPHAREF = 24, /* D3DFIXED */
D3DRENDERSTATE_ALPHAFUNC = 25, /* D3DCMPFUNC */
D3DRENDERSTATE_DITHERENABLE = 26, /* TRUE to enable dithering */
D3DRENDERSTATE_ALPHABLENDENABLE = 27, /* TRUE to enable alpha blending */
D3DRENDERSTATE_FOGENABLE = 28, /* TRUE to enable fog */
D3DRENDERSTATE_SPECULARENABLE = 29, /* TRUE to enable specular */
D3DRENDERSTATE_ZVISIBLE = 30, /* TRUE to enable z checking */
D3DRENDERSTATE_SUBPIXEL = 31, /* TRUE to enable subpixel correction */
D3DRENDERSTATE_SUBPIXELX = 32, /* TRUE to enable correction in X only */
D3DRENDERSTATE_STIPPLEDALPHA = 33, /* TRUE to enable stippled alpha */
D3DRENDERSTATE_FOGCOLOR = 34, /* D3DCOLOR */
D3DRENDERSTATE_FOGTABLEMODE = 35, /* D3DFOGMODE */
D3DRENDERSTATE_FOGTABLESTART = 36, /* Fog table start */
D3DRENDERSTATE_FOGTABLEEND = 37, /* Fog table end */
D3DRENDERSTATE_FOGTABLEDENSITY = 38, /* Fog table density */
D3DRENDERSTATE_STIPPLEENABLE = 39, /* TRUE to enable stippling */
D3DRENDERSTATE_EDGEANTIALIAS = 40, /* TRUE to enable edge antialiasing */
D3DRENDERSTATE_COLORKEYENABLE = 41, /* TRUE to enable source colorkeyed textures */
D3DRENDERSTATE_BORDERCOLOR = 43, /* Border color for texturing w/border */
D3DRENDERSTATE_TEXTUREADDRESSU = 44, /* Texture addressing mode for U coordinate */
D3DRENDERSTATE_TEXTUREADDRESSV = 45, /* Texture addressing mode for V coordinate */
D3DRENDERSTATE_MIPMAPLODBIAS = 46, /* D3DVALUE Mipmap LOD bias */
D3DRENDERSTATE_ZBIAS = 47, /* LONG Z bias */
D3DRENDERSTATE_RANGEFOGENABLE = 48, /* Enables range-based fog */
D3DRENDERSTATE_ANISOTROPY = 49, /* Max. anisotropy. 1 = no anisotropy */
D3DRENDERSTATE_FLUSHBATCH = 50, /* Explicit flush for DP batching (DX5 Only) */
D3DRENDERSTATE_STIPPLEPATTERN00 = 64, /* Stipple pattern 01... */
D3DRENDERSTATE_STIPPLEPATTERN01 = 65,
D3DRENDERSTATE_STIPPLEPATTERN02 = 66,
D3DRENDERSTATE_STIPPLEPATTERN03 = 67,
D3DRENDERSTATE_STIPPLEPATTERN04 = 68,
D3DRENDERSTATE_STIPPLEPATTERN05 = 69,
D3DRENDERSTATE_STIPPLEPATTERN06 = 70,
D3DRENDERSTATE_STIPPLEPATTERN07 = 71,
D3DRENDERSTATE_STIPPLEPATTERN08 = 72,
D3DRENDERSTATE_STIPPLEPATTERN09 = 73,
D3DRENDERSTATE_STIPPLEPATTERN10 = 74,
D3DRENDERSTATE_STIPPLEPATTERN11 = 75,
D3DRENDERSTATE_STIPPLEPATTERN12 = 76,
D3DRENDERSTATE_STIPPLEPATTERN13 = 77,
D3DRENDERSTATE_STIPPLEPATTERN14 = 78,
D3DRENDERSTATE_STIPPLEPATTERN15 = 79,
D3DRENDERSTATE_STIPPLEPATTERN16 = 80,
D3DRENDERSTATE_STIPPLEPATTERN17 = 81,
D3DRENDERSTATE_STIPPLEPATTERN18 = 82,
D3DRENDERSTATE_STIPPLEPATTERN19 = 83,
D3DRENDERSTATE_STIPPLEPATTERN20 = 84,
D3DRENDERSTATE_STIPPLEPATTERN21 = 85,
D3DRENDERSTATE_STIPPLEPATTERN22 = 86,
D3DRENDERSTATE_STIPPLEPATTERN23 = 87,
D3DRENDERSTATE_STIPPLEPATTERN24 = 88,
D3DRENDERSTATE_STIPPLEPATTERN25 = 89,
D3DRENDERSTATE_STIPPLEPATTERN26 = 90,
D3DRENDERSTATE_STIPPLEPATTERN27 = 91,
D3DRENDERSTATE_STIPPLEPATTERN28 = 92,
D3DRENDERSTATE_STIPPLEPATTERN29 = 93,
D3DRENDERSTATE_STIPPLEPATTERN30 = 94,
D3DRENDERSTATE_STIPPLEPATTERN31 = 95,
D3DRENDERSTATE_FORCE_DWORD = 0x7fffffff /* force 32-bit size enum */
} D3DRENDERSTATETYPE;
typedef enum {
D3DCMP_NEVER = 1,
D3DCMP_LESS = 2,
D3DCMP_EQUAL = 3,
D3DCMP_LESSEQUAL = 4,
D3DCMP_GREATER = 5,
D3DCMP_NOTEQUAL = 6,
D3DCMP_GREATEREQUAL = 7,
D3DCMP_ALWAYS = 8,
D3DCMP_FORCE_DWORD = 0x7fffffff
} D3DCMPFUNC;
typedef enum {
D3DLIGHTSTATE_MATERIAL = 1,
D3DLIGHTSTATE_AMBIENT = 2,
D3DLIGHTSTATE_COLORMODEL = 3,
D3DLIGHTSTATE_FOGMODE = 4,
D3DLIGHTSTATE_FOGSTART = 5,
D3DLIGHTSTATE_FOGEND = 6,
D3DLIGHTSTATE_FOGDENSITY = 7,
D3DLIGHTSTATE_FORCE_DWORD = 0x7fffffff /* force 32-bit size enum */
} D3DLIGHTSTATETYPE;
typedef enum {
D3DVT_VERTEX = 1,
D3DVT_LVERTEX = 2,
D3DVT_TLVERTEX = 3,
D3DVT_FORCE_DWORD = 0x7fffffff /* force 32-bit size enum */
} D3DVERTEXTYPE;
typedef enum {
D3DTRANSFORMSTATE_WORLD = 1,
D3DTRANSFORMSTATE_VIEW = 2,
D3DTRANSFORMSTATE_PROJECTION = 3,
D3DTRANSFORMSTATE_FORCE_DWORD = 0x7fffffff /* force 32-bit size enum */
} D3DTRANSFORMSTATETYPE;
/* ********************************************************************
Types and structures
******************************************************************** */
typedef DWORD D3DMATERIALHANDLE, *LPD3DMATERIALHANDLE;
typedef DWORD D3DTEXTUREHANDLE, *LPD3DTEXTUREHANDLE;
typedef DWORD D3DVIEWPORTHANDLE, *LPD3DVIEWPORTHANDLE;
typedef DWORD D3DMATRIXHANDLE, *LPD3DMATRIXHANDLE;
typedef DWORD D3DCOLOR, *LPD3DCOLOR;
typedef struct {
DWORD dwSize;
DWORD dwCaps;
} D3DTRANSFORMCAPS,*LPD3DTRANSFORMCAPS;
#define D3DTRANSFORMCAPS_CLIP 0x00000001
typedef struct {
DWORD dwSize;
DWORD dwCaps;
DWORD dwLightingModel;
DWORD dwNumLights;
} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
#define D3DLIGHTINGMODEL_RGB 0x00000001
#define D3DLIGHTINGMODEL_MONO 0x00000002
#define D3DLIGHTCAPS_POINT 0x00000001
#define D3DLIGHTCAPS_SPOT 0x00000002
#define D3DLIGHTCAPS_DIRECTIONAL 0x00000004
#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008
#define D3DCOLOR_MONO 1
#define D3DCOLOR_RGB 2
typedef DWORD D3DCOLORMODEL;
typedef struct {
DWORD dwSize;
DWORD dwMiscCaps; /* Capability flags */
DWORD dwRasterCaps;
DWORD dwZCmpCaps;
DWORD dwSrcBlendCaps;
DWORD dwDestBlendCaps;
DWORD dwAlphaCmpCaps;
DWORD dwShadeCaps;
DWORD dwTextureCaps;
DWORD dwTextureFilterCaps;
DWORD dwTextureBlendCaps;
DWORD dwTextureAddressCaps;
DWORD dwStippleWidth; /* maximum width and height of */
DWORD dwStippleHeight; /* of supported stipple (up to 32x32) */
} D3DPRIMCAPS, *LPD3DPRIMCAPS;
/* D3DPRIMCAPS.dwMiscCaps */
#define D3DPMISCCAPS_MASKPLANES 0x00000001
#define D3DPMISCCAPS_MASKZ 0x00000002
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004
#define D3DPMISCCAPS_CONFORMANT 0x00000008
#define D3DPMISCCAPS_CULLNONE 0x00000010
#define D3DPMISCCAPS_CULLCW 0x00000020
#define D3DPMISCCAPS_CULLCCW 0x00000040
/* D3DPRIMCAPS.dwRasterCaps */
#define D3DPRASTERCAPS_DITHER 0x00000001
#define D3DPRASTERCAPS_ROP2 0x00000002
#define D3DPRASTERCAPS_XOR 0x00000004
#define D3DPRASTERCAPS_PAT 0x00000008
#define D3DPRASTERCAPS_ZTEST 0x00000010
#define D3DPRASTERCAPS_SUBPIXEL 0x00000020
#define D3DPRASTERCAPS_SUBPIXELX 0x00000040
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080
#define D3DPRASTERCAPS_FOGTABLE 0x00000100
#define D3DPRASTERCAPS_STIPPLE 0x00000200
#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400
#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000
#define D3DPRASTERCAPS_ZBIAS 0x00004000
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000
#define D3DPRASTERCAPS_FOGRANGE 0x00010000
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000
/* D3DPRIMCAPS.dwZCmpCaps and dwAlphaCmpCaps */
#define D3DPCMPCAPS_NEVER 0x00000001
#define D3DPCMPCAPS_LESS 0x00000002
#define D3DPCMPCAPS_EQUAL 0x00000004
#define D3DPCMPCAPS_LESSEQUAL 0x00000008
#define D3DPCMPCAPS_GREATER 0x00000010
#define D3DPCMPCAPS_NOTEQUAL 0x00000020
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040
#define D3DPCMPCAPS_ALWAYS 0x00000080
/* D3DPRIMCAPS.dwSourceBlendCaps, dwDestBlendCaps */
#define D3DPBLENDCAPS_ZERO 0x00000001
#define D3DPBLENDCAPS_ONE 0x00000002
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008
#define D3DPBLENDCAPS_SRCALPHA 0x00000010
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020
#define D3DPBLENDCAPS_DESTALPHA 0x00000040
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000
/* D3DPRIMCAPS.dwShadeCaps */
#define D3DPSHADECAPS_COLORFLATMONO 0x00000001
#define D3DPSHADECAPS_COLORFLATRGB 0x00000002
#define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008
#define D3DPSHADECAPS_COLORPHONGMONO 0x00000010
#define D3DPSHADECAPS_COLORPHONGRGB 0x00000020
#define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040
#define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080
#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200
#define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400
#define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800
#define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000
#define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000
#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000
#define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000
#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000
#define D3DPSHADECAPS_FOGFLAT 0x00040000
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000
#define D3DPSHADECAPS_FOGPHONG 0x00100000
/* D3DPRIMCAPS.dwTextureCaps */
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001
#define D3DPTEXTURECAPS_POW2 0x00000002
#define D3DPTEXTURECAPS_ALPHA 0x00000004
#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008
#define D3DPTEXTURECAPS_BORDER 0x00000010
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020
/* D3DPRIMCAPS.dwTextureFilterCaps */
#define D3DPTFILTERCAPS_NEAREST 0x00000001
#define D3DPTFILTERCAPS_LINEAR 0x00000002
#define D3DPTFILTERCAPS_MIPNEAREST 0x00000004
#define D3DPTFILTERCAPS_MIPLINEAR 0x00000008
#define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010
#define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020
/* D3DPRIMCAPS.dwTextureBlendCaps */
#define D3DPTBLENDCAPS_DECAL 0x00000001
#define D3DPTBLENDCAPS_MODULATE 0x00000002
#define D3DPTBLENDCAPS_DECALALPHA 0x00000004
#define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008
#define D3DPTBLENDCAPS_DECALMASK 0x00000010
#define D3DPTBLENDCAPS_MODULATEMASK 0x00000020
#define D3DPTBLENDCAPS_COPY 0x00000040
#define D3DPTBLENDCAPS_ADD 0x00000080
/* D3DPRIMCAPS.dwTextureAddressCaps */
#define D3DPTADDRESSCAPS_WRAP 0x00000001
#define D3DPTADDRESSCAPS_MIRROR 0x00000002
#define D3DPTADDRESSCAPS_CLAMP 0x00000004
#define D3DPTADDRESSCAPS_BORDER 0x00000008
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010
/* D3DDEVICEDESC.dwFlags */
#define D3DDD_COLORMODEL 0x00000001
#define D3DDD_DEVCAPS 0x00000002
#define D3DDD_TRANSFORMCAPS 0x00000004
#define D3DDD_LIGHTINGCAPS 0x00000008
#define D3DDD_BCLIPPING 0x00000010
#define D3DDD_LINECAPS 0x00000020
#define D3DDD_TRICAPS 0x00000040
#define D3DDD_DEVICERENDERBITDEPTH 0x00000080
#define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100
#define D3DDD_MAXBUFFERSIZE 0x00000200
#define D3DDD_MAXVERTEXCOUNT 0x00000400
/* D3DDEVICEDESC.dwDevCaps */
#define D3DDEVCAPS_FLOATTLVERTEX 0x00000001
#define D3DDEVCAPS_SORTINCREASINGZ 0x00000002
#define D3DDEVCAPS_SORTDECREASINGZ 0X00000004
#define D3DDEVCAPS_SORTEXACT 0x00000008
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000
typedef struct _D3DDeviceDesc {
DWORD dwSize;
DWORD dwFlags;
D3DCOLORMODEL dcmColorModel;
DWORD dwDevCaps;
D3DTRANSFORMCAPS dtcTransformCaps;
BOOL bClipping;
D3DLIGHTINGCAPS dlcLightingCaps;
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth;
DWORD dwDeviceZBufferBitDepth;
DWORD dwMaxBufferSize;
DWORD dwMaxVertexCount;
/* *** New fields for DX5 *** */
DWORD dwMinTextureWidth,dwMinTextureHeight;
DWORD dwMaxTextureWidth,dwMaxTextureHeight;
DWORD dwMinStippleWidth,dwMaxStippleWidth;
DWORD dwMinStippleHeight,dwMaxStippleHeight;
} D3DDEVICEDESC,*LPD3DDEVICEDESC;
typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK)(LPGUID lpGuid,LPSTR lpDeviceDescription,LPSTR lpDeviceName,LPD3DDEVICEDESC,LPD3DDEVICEDESC,LPVOID);
typedef HRESULT (CALLBACK* LPD3DVALIDATECALLBACK)(LPVOID lpUserArg, DWORD dwOffset);
/* dwflags for FindDevice */
#define D3DFDS_COLORMODEL 0x00000001
#define D3DFDS_GUID 0x00000002
#define D3DFDS_HARDWARE 0x00000004
#define D3DFDS_TRIANGLES 0x00000008
#define D3DFDS_LINES 0x00000010
#define D3DFDS_MISCCAPS 0x00000020
#define D3DFDS_RASTERCAPS 0x00000040
#define D3DFDS_ZCMPCAPS 0x00000080
#define D3DFDS_ALPHACMPCAPS 0x00000100
#define D3DFDS_DSTBLENDCAPS 0x00000400
#define D3DFDS_SHADECAPS 0x00000800
#define D3DFDS_TEXTURECAPS 0x00001000
#define D3DFDS_TEXTUREFILTERCAPS 0x00002000
#define D3DFDS_TEXTUREBLENDCAPS 0x00004000
#define D3DFDS_TEXTUREADDRESSCAPS 0x00008000
typedef struct {
DWORD dwSize;
DWORD dwFlags;
BOOL bHardware;
D3DCOLORMODEL dcmColorModel;
GUID guid;
DWORD dwCaps;
D3DPRIMCAPS dpcPrimCaps;
} D3DFINDDEVICESEARCH,*LPD3DFINDDEVICESEARCH;
typedef struct {
DWORD dwSize;
GUID guid;
D3DDEVICEDESC ddHwDesc;
D3DDEVICEDESC ddSwDesc;
} D3DFINDDEVICERESULT,*LPD3DFINDDEVICERESULT;
#define D3DVALP(val, prec) ((float)(val))
#define D3DVAL(val) ((float)(val))
typedef float D3DVALUE,*LPD3DVALUE;
#define D3DDivide(a, b) (float)((double) (a) / (double) (b))
#define D3DMultiply(a, b) ((a) * (b))
typedef struct {
DWORD dwFlags; /* Homogeneous clipping flags */
union {
D3DVALUE hx;
D3DVALUE dvHX;
} x;
union {
D3DVALUE hy;
D3DVALUE dvHY;
} y;
union {
D3DVALUE hz;
D3DVALUE dvHZ;
} z;
} D3DHVERTEX, *LPD3DHVERTEX;
/*
* Transformed/lit vertices
*/
typedef struct {
union {
D3DVALUE sx; /* Screen coordinates */
D3DVALUE dvSX;
} x;
union {
D3DVALUE sy;
D3DVALUE dvSY;
} y;
union {
D3DVALUE sz;
D3DVALUE dvSZ;
} z;
union {
D3DVALUE rhw; /* Reciprocal of homogeneous w */
D3DVALUE dvRHW;
} r;
union {
D3DCOLOR color; /* Vertex color */
D3DCOLOR dcColor;
} c;
union {
D3DCOLOR specular; /* Specular component of vertex */
D3DCOLOR dcSpecular;
} s;
union {
D3DVALUE tu; /* Texture coordinates */
D3DVALUE dvTU;
} u;
union {
D3DVALUE tv;
D3DVALUE dvTV;
} v;
} D3DTLVERTEX, *LPD3DTLVERTEX;
typedef struct {
union {
D3DVALUE x; /* Homogeneous coordinates */
D3DVALUE dvX;
} x;
union {
D3DVALUE y;
D3DVALUE dvY;
} y;
union {
D3DVALUE z;
D3DVALUE dvZ;
} z;
DWORD dwReserved;
union {
D3DCOLOR color; /* Vertex color */
D3DCOLOR dcColor;
} c;
union {
D3DCOLOR specular; /* Specular component of vertex */
D3DCOLOR dcSpecular;
} s;
union {
D3DVALUE tu; /* Texture coordinates */
D3DVALUE dvTU;
} u;
union {
D3DVALUE tv;
D3DVALUE dvTV;
} v;
} D3DLVERTEX, *LPD3DLVERTEX;
typedef struct {
union {
D3DVALUE x; /* Homogeneous coordinates */
D3DVALUE dvX;
} x;
union {
D3DVALUE y;
D3DVALUE dvY;
} y;
union {
D3DVALUE z;
D3DVALUE dvZ;
} z;
union {
D3DVALUE nx; /* Normal */
D3DVALUE dvNX;
} nx;
union {
D3DVALUE ny;
D3DVALUE dvNY;
} ny;
union {
D3DVALUE nz;
D3DVALUE dvNZ;
} nz;
union {
D3DVALUE tu; /* Texture coordinates */
D3DVALUE dvTU;
} u;
union {
D3DVALUE tv;
D3DVALUE dvTV;
} v;
} D3DVERTEX, *LPD3DVERTEX;
typedef struct {
union {
LONG x1;
LONG lX1;
} x1;
union {
LONG y1;
LONG lY1;
} y1;
union {
LONG x2;
LONG lX2;
} x2;
union {
LONG y2;
LONG lY2;
} y2;
} D3DRECT, *LPD3DRECT;
typedef struct {
union {
D3DVALUE x;
D3DVALUE dvX;
} x;
union {
D3DVALUE y;
D3DVALUE dvY;
} y;
union {
D3DVALUE z;
D3DVALUE dvZ;
} z;
/* the c++ variant has operator overloads etc. too */
} D3DVECTOR,*LPD3DVECTOR;
typedef struct {
D3DVALUE _11, _12, _13, _14;
D3DVALUE _21, _22, _23, _24;
D3DVALUE _31, _32, _33, _34;
D3DVALUE _41, _42, _43, _44;
} D3DMATRIX, *LPD3DMATRIX;
typedef struct _D3DCOLORVALUE {
union {
D3DVALUE r;
D3DVALUE dvR;
} r;
union {
D3DVALUE g;
D3DVALUE dvG;
} g;
union {
D3DVALUE b;
D3DVALUE dvB;
} b;
union {
D3DVALUE a;
D3DVALUE dvA;
} a;
} D3DCOLORVALUE,*LPD3DCOLORVALUE;
typedef struct {
DWORD dwSize;
D3DLIGHTTYPE dltType;
D3DCOLORVALUE dcvColor;
D3DVECTOR dvPosition; /* Position in world space */
D3DVECTOR dvDirection; /* Direction in world space */
D3DVALUE dvRange; /* Cutoff range */
D3DVALUE dvFalloff; /* Falloff */
D3DVALUE dvAttenuation0; /* Constant attenuation */
D3DVALUE dvAttenuation1; /* Linear attenuation */
D3DVALUE dvAttenuation2; /* Quadratic attenuation */
D3DVALUE dvTheta; /* Inner angle of spotlight cone */
D3DVALUE dvPhi; /* Outer angle of spotlight cone */
} D3DLIGHT,*LPD3DLIGHT;
/* flags bits */
#define D3DLIGHT_ACTIVE 0x00000001
#define D3DLIGHT_NO_SPECULAR 0x00000002
/* Textures and Pixel formats*/
/* Used in Dx 5.0 */
typedef HRESULT (CALLBACK* LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd, LPVOID lpContext);
/* Used in Dx 6.0 for both Z buffers and Textures */
typedef HRESULT (CALLBACK* LPD3DENUMPIXELFORMATSCALLBACK)(LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext);
/* Statistics structure */
typedef struct {
DWORD dwSize;
DWORD dwTrianglesDrawn;
DWORD dwLinesDrawn;
DWORD dwPointsDrawn;
DWORD dwSpansDrawn;
DWORD dwVerticesProcessed;
} D3DSTATS, *LPD3DSTATS;
/* Clipping */
typedef struct _D3DCLIPSTATUS {
DWORD dwFlags; /* Do we set 2d extents, 3D extents or status */
DWORD dwStatus; /* Clip status */
float minx, maxx; /* X extents */
float miny, maxy; /* Y extents */
float minz, maxz; /* Z extents */
} D3DCLIPSTATUS, *LPD3DCLIPSTATUS;
typedef struct {
DWORD dwSize;
union {
D3DCOLORVALUE diffuse; /* Diffuse color RGBA */
D3DCOLORVALUE dcvDiffuse;
} a;
union {
D3DCOLORVALUE ambient; /* Ambient color RGB */
D3DCOLORVALUE dcvAmbient;
} b;
union {
D3DCOLORVALUE specular; /* Specular 'shininess' */
D3DCOLORVALUE dcvSpecular;
} c;
union {
D3DCOLORVALUE emissive; /* Emissive color RGB */
D3DCOLORVALUE dcvEmissive;
} d;
union {
D3DVALUE power; /* Sharpness if specular highlight */
D3DVALUE dvPower;
} e;
D3DTEXTUREHANDLE hTexture; /* Handle to texture map */
DWORD dwRampSize;
} D3DMATERIAL, *LPD3DMATERIAL;
typedef struct {
D3DVECTOR dvPosition; /* Lightable point in model space */
D3DVECTOR dvNormal; /* Normalised unit vector */
} D3DLIGHTINGELEMENT, *LPD3DLIGHTINGELEMENT;
typedef struct {
DWORD dwSize;
DWORD dwX;
DWORD dwY; /* Top left */
DWORD dwWidth;
DWORD dwHeight; /* Dimensions */
D3DVALUE dvScaleX; /* Scale homogeneous to screen */
D3DVALUE dvScaleY; /* Scale homogeneous to screen */
D3DVALUE dvMaxX; /* Min/max homogeneous x coord */
D3DVALUE dvMaxY; /* Min/max homogeneous y coord */
D3DVALUE dvMinZ;
D3DVALUE dvMaxZ; /* Min/max homogeneous z coord */
} D3DVIEWPORT, *LPD3DVIEWPORT;
typedef struct {
DWORD dwSize;
DWORD dwX;
DWORD dwY; /* Viewport Top left */
DWORD dwWidth;
DWORD dwHeight; /* Viewport Dimensions */
D3DVALUE dvClipX; /* Top left of clip volume */
D3DVALUE dvClipY;
D3DVALUE dvClipWidth; /* Clip Volume Dimensions */
D3DVALUE dvClipHeight;
D3DVALUE dvMinZ; /* Min/max of clip Volume */
D3DVALUE dvMaxZ;
} D3DVIEWPORT2, *LPD3DVIEWPORT2;
#define D3DTRANSFORM_CLIPPED 0x00000001l
#define D3DTRANSFORM_UNCLIPPED 0x00000002l
typedef struct {
DWORD dwSize;
LPVOID lpIn; /* Input vertices */
DWORD dwInSize; /* Stride of input vertices */
LPVOID lpOut; /* Output vertices */
DWORD dwOutSize; /* Stride of output vertices */
LPD3DHVERTEX lpHOut; /* Output homogeneous vertices */
DWORD dwClip; /* Clipping hint */
DWORD dwClipIntersection;
DWORD dwClipUnion; /* Union of all clip flags */
D3DRECT drExtent; /* Extent of transformed vertices */
} D3DTRANSFORMDATA, *LPD3DTRANSFORMDATA;
/* flags bits */
#define D3DLIGHT_ACTIVE 0x00000001
#define D3DLIGHT_NO_SPECULAR 0x00000002
/* maximum valid light range */
#define D3DLIGHT_RANGE_MAX ((float)sqrt(FLT_MAX))
typedef struct _D3DLIGHT2 {
DWORD dwSize;
D3DLIGHTTYPE dltType; /* Type of light source */
D3DCOLORVALUE dcvColor; /* Color of light */
D3DVECTOR dvPosition; /* Position in world space */
D3DVECTOR dvDirection; /* Direction in world space */
D3DVALUE dvRange; /* Cutoff range */
D3DVALUE dvFalloff; /* Falloff */
D3DVALUE dvAttenuation0; /* Constant attenuation */
D3DVALUE dvAttenuation1; /* Linear attenuation */
D3DVALUE dvAttenuation2; /* Quadratic attenuation */
D3DVALUE dvTheta; /* Inner angle of spotlight cone */
D3DVALUE dvPhi; /* Outer angle of spotlight cone */
DWORD dwFlags;
} D3DLIGHT2, *LPD3DLIGHT2;
typedef struct _D3DLIGHTDATA {
DWORD dwSize;
LPD3DLIGHTINGELEMENT lpIn; /* Input positions and normals */
DWORD dwInSize; /* Stride of input elements */
LPD3DTLVERTEX lpOut; /* Output colors */
DWORD dwOutSize; /* Stride of output colors */
} D3DLIGHTDATA, *LPD3DLIGHTDATA;
typedef struct _D3DPICKRECORD {
BYTE bOpcode;
BYTE bPad;
DWORD dwOffset;
D3DVALUE dvZ;
} D3DPICKRECORD, *LPD3DPICKRECORD;
typedef struct _D3DExecuteBufferDesc {
DWORD dwSize;
DWORD dwFlags;
DWORD dwCaps;
DWORD dwBufferSize;
LPVOID lpData;
} D3DEXECUTEBUFFERDESC;
typedef D3DEXECUTEBUFFERDESC *LPD3DEXECUTEBUFFERDESC;
#define D3DDEB_BUFSIZE 0x00000001l /* buffer size valid */
#define D3DDEB_CAPS 0x00000002l /* caps valid */
#define D3DDEB_LPDATA 0x00000004l /* lpData valid */
#define D3DDEBCAPS_SYSTEMMEMORY 0x00000001l /* buffer in system memory */
#define D3DDEBCAPS_VIDEOMEMORY 0x00000002l /* buffer in device memory */
#define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY)
/*
* Values for d3d status.
*/
#define D3DSTATUS_CLIPUNIONLEFT D3DCLIP_LEFT
#define D3DSTATUS_CLIPUNIONRIGHT D3DCLIP_RIGHT
#define D3DSTATUS_CLIPUNIONTOP D3DCLIP_TOP
#define D3DSTATUS_CLIPUNIONBOTTOM D3DCLIP_BOTTOM
#define D3DSTATUS_CLIPUNIONFRONT D3DCLIP_FRONT
#define D3DSTATUS_CLIPUNIONBACK D3DCLIP_BACK
#define D3DSTATUS_CLIPUNIONGEN0 D3DCLIP_GEN0
#define D3DSTATUS_CLIPUNIONGEN1 D3DCLIP_GEN1
#define D3DSTATUS_CLIPUNIONGEN2 D3DCLIP_GEN2
#define D3DSTATUS_CLIPUNIONGEN3 D3DCLIP_GEN3
#define D3DSTATUS_CLIPUNIONGEN4 D3DCLIP_GEN4
#define D3DSTATUS_CLIPUNIONGEN5 D3DCLIP_GEN5
#define D3DSTATUS_CLIPINTERSECTIONLEFT 0x00001000L
#define D3DSTATUS_CLIPINTERSECTIONRIGHT 0x00002000L
#define D3DSTATUS_CLIPINTERSECTIONTOP 0x00004000L
#define D3DSTATUS_CLIPINTERSECTIONBOTTOM 0x00008000L
#define D3DSTATUS_CLIPINTERSECTIONFRONT 0x00010000L
#define D3DSTATUS_CLIPINTERSECTIONBACK 0x00020000L
#define D3DSTATUS_CLIPINTERSECTIONGEN0 0x00040000L
#define D3DSTATUS_CLIPINTERSECTIONGEN1 0x00080000L
#define D3DSTATUS_CLIPINTERSECTIONGEN2 0x00100000L
#define D3DSTATUS_CLIPINTERSECTIONGEN3 0x00200000L
#define D3DSTATUS_CLIPINTERSECTIONGEN4 0x00400000L
#define D3DSTATUS_CLIPINTERSECTIONGEN5 0x00800000L
#define D3DSTATUS_ZNOTVISIBLE 0x01000000L
#define D3DSTATUS_CLIPUNIONALL ( \
D3DSTATUS_CLIPUNIONLEFT | \
D3DSTATUS_CLIPUNIONRIGHT | \
D3DSTATUS_CLIPUNIONTOP | \
D3DSTATUS_CLIPUNIONBOTTOM | \
D3DSTATUS_CLIPUNIONFRONT | \
D3DSTATUS_CLIPUNIONBACK | \
D3DSTATUS_CLIPUNIONGEN0 | \
D3DSTATUS_CLIPUNIONGEN1 | \
D3DSTATUS_CLIPUNIONGEN2 | \
D3DSTATUS_CLIPUNIONGEN3 | \
D3DSTATUS_CLIPUNIONGEN4 | \
D3DSTATUS_CLIPUNIONGEN5 \
)
#define D3DSTATUS_CLIPINTERSECTIONALL ( \
D3DSTATUS_CLIPINTERSECTIONLEFT | \
D3DSTATUS_CLIPINTERSECTIONRIGHT | \
D3DSTATUS_CLIPINTERSECTIONTOP | \
D3DSTATUS_CLIPINTERSECTIONBOTTOM | \
D3DSTATUS_CLIPINTERSECTIONFRONT | \
D3DSTATUS_CLIPINTERSECTIONBACK | \
D3DSTATUS_CLIPINTERSECTIONGEN0 | \
D3DSTATUS_CLIPINTERSECTIONGEN1 | \
D3DSTATUS_CLIPINTERSECTIONGEN2 | \
D3DSTATUS_CLIPINTERSECTIONGEN3 | \
D3DSTATUS_CLIPINTERSECTIONGEN4 | \
D3DSTATUS_CLIPINTERSECTIONGEN5 \
)
#define D3DSTATUS_DEFAULT ( \
D3DSTATUS_CLIPINTERSECTIONALL | \
D3DSTATUS_ZNOTVISIBLE)
typedef struct _D3DSTATUS {
DWORD dwFlags;
DWORD dwStatus;
D3DRECT drExtent;
} D3DSTATUS, *LPD3DSTATUS;
typedef struct _D3DEXECUTEDATA {
DWORD dwSize;
DWORD dwVertexOffset;
DWORD dwVertexCount;
DWORD dwInstructionOffset;
DWORD dwInstructionLength;
DWORD dwHVertexOffset;
D3DSTATUS dsStatus;
} D3DEXECUTEDATA, *LPD3DEXECUTEDATA;
typedef enum _D3DOPCODE {
D3DOP_POINT = 1,
D3DOP_LINE = 2,
D3DOP_TRIANGLE = 3,
D3DOP_MATRIXLOAD = 4,
D3DOP_MATRIXMULTIPLY = 5,
D3DOP_STATETRANSFORM = 6,
D3DOP_STATELIGHT = 7,
D3DOP_STATERENDER = 8,
D3DOP_PROCESSVERTICES = 9,
D3DOP_TEXTURELOAD = 10,
D3DOP_EXIT = 11,
D3DOP_BRANCHFORWARD = 12,
D3DOP_SPAN = 13,
D3DOP_SETSTATUS = 14,
D3DOP_FORCE_DWORD = 0x7fffffff
} D3DOPCODE;
typedef struct _D3DPOINT {
WORD wCount;
WORD wFirst;
} D3DPOINT, *LPD3DPOINT;
typedef struct _D3DLINE {
union {
WORD v1;
WORD wV1;
} v1;
union {
WORD v2;
WORD wV2;
} v2;
} D3DLINE, *LPD3DLINE;
#define D3DTRIFLAG_START 0x00000000L
#define D3DTRIFLAG_STARTFLAT(len) (len) /* 0 < len < 30 */
#define D3DTRIFLAG_ODD 0x0000001eL
#define D3DTRIFLAG_EVEN 0x0000001fL
#define D3DTRIFLAG_EDGEENABLE1 0x00000100L /* v0-v1 edge */
#define D3DTRIFLAG_EDGEENABLE2 0x00000200L /* v1-v2 edge */
#define D3DTRIFLAG_EDGEENABLE3 0x00000400L /* v2-v0 edge */
#define D3DTRIFLAG_EDGEENABLETRIANGLE \
(D3DTRIFLAG_EDGEENABLE1 | D3DTRIFLAG_EDGEENABLE2 | D3DTRIFLAG_EDGEENABLE3)
typedef struct _D3DTRIANGLE {
union {
WORD v1;
WORD wV1;
} v1;
union {
WORD v2;
WORD wV2;
} v2;
union {
WORD v3;
WORD wV3;
} v3;
WORD wFlags;
} D3DTRIANGLE, *LPD3DTRIANGLE;
typedef struct _D3DMATRIXLOAD {
D3DMATRIXHANDLE hDestMatrix;
D3DMATRIXHANDLE hSrcMatrix;
} D3DMATRIXLOAD, *LPD3DMATRIXLOAD;
typedef struct _D3DMATRIXMULTIPLY {
D3DMATRIXHANDLE hDestMatrix;
D3DMATRIXHANDLE hSrcMatrix1;
D3DMATRIXHANDLE hSrcMatrix2;
} D3DMATRIXMULTIPLY, *LPD3DMATRIXMULTIPLY;
typedef struct _D3DSTATE {
union {
D3DTRANSFORMSTATETYPE dtstTransformStateType;
D3DLIGHTSTATETYPE dlstLightStateType;
D3DRENDERSTATETYPE drstRenderStateType;
} t;
union {
DWORD dwArg[1];
D3DVALUE dvArg[1];
} v;
} D3DSTATE, *LPD3DSTATE;
#define D3DPROCESSVERTICES_TRANSFORMLIGHT 0x00000000L
#define D3DPROCESSVERTICES_TRANSFORM 0x00000001L
#define D3DPROCESSVERTICES_COPY 0x00000002L
#define D3DPROCESSVERTICES_OPMASK 0x00000007L
#define D3DPROCESSVERTICES_UPDATEEXTENTS 0x00000008L
#define D3DPROCESSVERTICES_NOCOLOR 0x00000010L
typedef struct _D3DPROCESSVERTICES {
DWORD dwFlags;
WORD wStart;
WORD wDest;
DWORD dwCount;
DWORD dwReserved;
} D3DPROCESSVERTICES, *LPD3DPROCESSVERTICES;
typedef struct _D3DTEXTURELOAD {
D3DTEXTUREHANDLE hDestTexture;
D3DTEXTUREHANDLE hSrcTexture;
} D3DTEXTURELOAD, *LPD3DTEXTURELOAD;
typedef struct _D3DBRANCH {
DWORD dwMask;
DWORD dwValue;
BOOL bNegate;
DWORD dwOffset;
} D3DBRANCH, *LPD3DBRANCH;
typedef struct _D3DSPAN {
WORD wCount;
WORD wFirst;
} D3DSPAN, *LPD3DSPAN;
typedef struct _D3DINSTRUCTION {
BYTE bOpcode;
BYTE bSize;
WORD wCount;
} D3DINSTRUCTION, *LPD3DINSTRUCTION;
typedef struct _D3DVERTEXBUFFERDESC {
DWORD dwSize;
DWORD dwCaps;
DWORD dwFVF;
DWORD dwNumVertices;
} D3DVERTEXBUFFERDESC, *LPD3DVERTEXBUFFERDESC;
typedef struct _D3DDP_PTRSTRIDE {
LPVOID lpvData;
DWORD dwStride;
} D3DDP_PTRSTRIDE;
#define D3DDP_MAXTEXCOORD 8
typedef struct _D3DDRAWPRIMITIVESTRIDEDDATA {
D3DDP_PTRSTRIDE position;
D3DDP_PTRSTRIDE normal;
D3DDP_PTRSTRIDE diffuse;
D3DDP_PTRSTRIDE specular;
D3DDP_PTRSTRIDE textureCoords[D3DDP_MAXTEXCOORD];
} D3DDRAWPRIMITIVESTRIDEDDATA ,*LPD3DDRAWPRIMITIVESTRIDEDDATA;
typedef enum _D3DTEXTURESTAGESTATETYPE {
D3DTSS_COLOROP = 1,
D3DTSS_COLORARG1 = 2,
D3DTSS_COLORARG2 = 3,
D3DTSS_ALPHAOP = 4,
D3DTSS_ALPHAARG1 = 5,
D3DTSS_ALPHAARG2 = 6,
D3DTSS_BUMPENVMAT00 = 7,
D3DTSS_BUMPENVMAT01 = 8,
D3DTSS_BUMPENVMAT10 = 9,
D3DTSS_BUMPENVMAT11 = 10,
D3DTSS_TEXCOORDINDEX = 11,
D3DTSS_ADDRESS = 12,
D3DTSS_ADDRESSU = 13,
D3DTSS_ADDRESSV = 14,
D3DTSS_BORDERCOLOR = 15,
D3DTSS_MAGFILTER = 16,
D3DTSS_MINFILTER = 17,
D3DTSS_MIPFILTER = 18,
D3DTSS_MIPMAPLODBIAS = 19,
D3DTSS_MAXMIPLEVEL = 20,
D3DTSS_MAXANISOTROPY = 21,
D3DTSS_BUMPENVLSCALE = 22,
D3DTSS_BUMPENVLOFFSET = 23,
D3DTSS_FORCE_DWORD = 0x7fffffff
} D3DTEXTURESTAGESTATETYPE;
/*****************************************************************************
* IDirect3D interface
......@@ -1294,6 +239,33 @@ ICOM_DEFINE(IDirect3D3,IUnknown)
#define IDirect3D3_EnumZBufferFormats(p,a,b,c) ICOM_CALL3(EnumZBufferFormats,p,a,b,c)
#define IDirect3D3_EvictManagedTextures(p) ICOM_CALL0(EvictManagedTextures,p)
/*****************************************************************************
* IDirect3D7 interface
*/
#define ICOM_INTERFACE IDirect3D7
#define IDirect3D7_METHODS \
ICOM_METHOD2(HRESULT,EnumDevices, LPD3DENUMDEVICESCALLBACK7,lpEnumDevicesCallback, LPVOID,lpUserArg) \
ICOM_METHOD3(HRESULT,CreateDevice, REFCLSID,rclsid,LPDIRECTDRAWSURFACE7,lpDDS, LPDIRECT3DDEVICE7*,lplpD3DDevice) \
ICOM_METHOD3(HRESULT,CreateVertexBuffer,LPD3DVERTEXBUFFERDESC,lpD3DVertBufDesc,LPDIRECT3DVERTEXBUFFER7*,lplpD3DVertBuf,DWORD,dwFlags) \
ICOM_METHOD3(HRESULT,EnumZBufferFormats,REFCLSID,riidDevice,LPD3DENUMPIXELFORMATSCALLBACK,lpEnumCallback,LPVOID,lpContext) \
ICOM_METHOD (HRESULT,EvictManagedTextures)
#define IDirect3D7_IMETHODS \
IUnknown_IMETHODS \
IDirect3D7_METHODS
ICOM_DEFINE(IDirect3D7,IUnknown)
#undef ICOM_INTERFACE
/*** IUnknown methods ***/
#define IDirect3D7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirect3D7_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirect3D7_Release(p) ICOM_CALL (Release,p)
/*** IDirect3D3 methods ***/
#define IDirect3D7_EnumDevices(p,a,b) ICOM_CALL2(EnumDevices,p,a,b)
#define IDirect3D7_CreateDevice(p,a,b,c) ICOM_CALL3(CreateDevice,p,a,b,c)
#define IDirect3D7_CreateVertexBuffer(p,a,b,c) ICOM_CALL4(CreateVertexBuffer,p,a,b,c)
#define IDirect3D7_EnumZBufferFormats(p,a,b,c) ICOM_CALL3(EnumZBufferFormats,p,a,b,c)
#define IDirect3D7_EvictManagedTextures(p) ICOM_CALL0(EvictManagedTextures,p)
/*****************************************************************************
* IDirect3DLight interface
......@@ -1832,6 +804,114 @@ ICOM_DEFINE(IDirect3DDevice3,IUnknown)
#define IDirect3DDevice3_SetTextureStageState(p,a,b,c) ICOM_CALL3(SetTextureStageState,p,a,b,c)
#define IDirect3DDevice3_ValidateDevice(p,a) ICOM_CALL1(ValidateDevice,p,a)
/*****************************************************************************
* IDirect3DDevice7 interface
*/
#define ICOM_INTERFACE IDirect3DDevice7
#define IDirect3DDevice7_METHODS \
ICOM_METHOD1(HRESULT,GetCaps, LPD3DDEVICEDESC7,lpD3DHELDevDesc) \
ICOM_METHOD2(HRESULT,EnumTextureFormats, LPD3DENUMPIXELFORMATSCALLBACK,lpD3DEnumPixelProc, LPVOID,lpArg) \
ICOM_METHOD (HRESULT,BeginScene) \
ICOM_METHOD (HRESULT,EndScene) \
ICOM_METHOD1(HRESULT,GetDirect3D, LPDIRECT3D7*,lplpDirect3D3) \
ICOM_METHOD2(HRESULT,SetRenderTarget, LPDIRECTDRAWSURFACE,lpNewRenderTarget,DWORD,dwFlags) \
ICOM_METHOD1(HRESULT,GetRenderTarget, LPDIRECTDRAWSURFACE*,lplpRenderTarget) \
ICOM_METHOD6(HRESULT,Clear, DWORD,,LPD3DRECT,,DWORD,,D3DCOLOR,,D3DVALUE,,DWORD,) \
ICOM_METHOD2(HRESULT,SetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
ICOM_METHOD2(HRESULT,GetTransform, D3DTRANSFORMSTATETYPE,dtstTransformStateType, LPD3DMATRIX,lpD3DMatrix) \
ICOM_METHOD2(HRESULT,MultiplyTransform, D3DTRANSFORMSTATETYPE,,LPD3DMATRIX,) \
ICOM_METHOD1(HRESULT,GetViewport, LPD3DVIEWPORT7,lpData) \
ICOM_METHOD1(HRESULT,SetViewport, LPD3DVIEWPORT7,lpData) \
ICOM_METHOD1(HRESULT,SetMaterial, LPD3DMATERIAL7,lpMat) \
ICOM_METHOD1(HRESULT,GetMaterial, LPD3DMATERIAL7,lpMat) \
ICOM_METHOD2(HRESULT,SetLight, DWORD,,LPD3DLIGHT7,lpLight) \
ICOM_METHOD2(HRESULT,GetLight, DWORD,,LPD3DLIGHT7,lpLight) \
ICOM_METHOD2(HRESULT,SetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, DWORD,dwRenderState) \
ICOM_METHOD2(HRESULT,GetRenderState, D3DRENDERSTATETYPE,dwRenderStateType, LPDWORD,lpdwRenderState) \
ICOM_METHOD (HRESULT,BeginStateBlock) \
ICOM_METHOD1(HRESULT,EndStateBlock, LPDWORD,) \
ICOM_METHOD1(HRESULT,PreLoad, LPDIRECTDRAWSURFACE7,) \
ICOM_METHOD5(HRESULT,DrawPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, DWORD,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, DWORD,dwFlags) \
ICOM_METHOD7(HRESULT,DrawIndexedPrimitive, D3DPRIMITIVETYPE,d3dptPrimitiveType, DWORD,d3dvtVertexType, LPVOID,lpvVertices, DWORD,dwVertexCount, LPWORD,dwIndices, DWORD,dwIndexCount, DWORD,dwFlags) \
ICOM_METHOD1(HRESULT,SetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus) \
ICOM_METHOD1(HRESULT,GetClipStatus, LPD3DCLIPSTATUS,lpD3DClipStatus) \
ICOM_METHOD5(HRESULT,DrawPrimitiveStrided, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA,lpD3DDrawPrimStrideData,DWORD,dwVertexCount,DWORD,dwFlags) \
ICOM_METHOD7(HRESULT,DrawIndexedPrimitiveStrided, D3DPRIMITIVETYPE,d3dptPrimitiveType,DWORD,dwVertexType,LPD3DDRAWPRIMITIVESTRIDEDDATA,lpD3DDrawPrimStrideData,DWORD,dwVertexCount,LPWORD,lpIndex,DWORD,dwIndexCount,DWORD,dwFlags) \
ICOM_METHOD5(HRESULT,DrawPrimitiveVB, D3DPRIMITIVETYPE,d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER7,lpD3DVertexBuf,DWORD,dwStartVertex,DWORD,dwNumVertices,DWORD,dwFlags) \
ICOM_METHOD7(HRESULT,DrawIndexedPrimitiveVB, D3DPRIMITIVETYPE,d3dptPrimitiveType,LPDIRECT3DVERTEXBUFFER7,lpD3DVertexBuf,DWORD,,DWORD,,LPWORD,lpwIndices,DWORD,dwIndexCount,DWORD,dwFlags) \
ICOM_METHOD5(HRESULT,ComputeSphereVisibility, LPD3DVECTOR,lpCenters,LPD3DVALUE,lpRadii,DWORD,dwNumSpheres,DWORD,dwFlags,LPDWORD,lpdwReturnValues) \
ICOM_METHOD2(HRESULT,GetTexture, DWORD,dwStage,LPDIRECTDRAWSURFACE7*,) \
ICOM_METHOD2(HRESULT,SetTexture, DWORD,dwStage,LPDIRECTDRAWSURFACE,) \
ICOM_METHOD3(HRESULT,GetTextureStageState, DWORD,dwStage,D3DTEXTURESTAGESTATETYPE,d3dTexStageStateType,LPDWORD,lpdwState) \
ICOM_METHOD3(HRESULT,SetTextureStageState, DWORD,dwStage,D3DTEXTURESTAGESTATETYPE,d3dTexStageStateType,DWORD,dwState) \
ICOM_METHOD1(HRESULT,ValidateDevice, LPDWORD,lpdwPasses) \
ICOM_METHOD1(HRESULT,ApplyStateBlock, DWORD,) \
ICOM_METHOD1(HRESULT,CaptureStateBlock, DWORD,) \
ICOM_METHOD1(HRESULT,DeleteStateBlock, DWORD,) \
ICOM_METHOD2(HRESULT,CreateStateBlock, D3DSTATEBLOCKTYPE,,LPDWORD,) \
ICOM_METHOD5(HRESULT,Load, LPDIRECTDRAWSURFACE7,,LPPOINT,,LPDIRECTDRAWSURFACE7,,LPRECT,,DWORD,) \
ICOM_METHOD2(HRESULT,LightEnable, DWORD,,BOOL,) \
ICOM_METHOD2(HRESULT,GetLightEnable, DWORD,,BOOL*,) \
ICOM_METHOD2(HRESULT,SetClipPlane, DWORD,,D3DVALUE*,) \
ICOM_METHOD2(HRESULT,GetClipPlane, DWORD,,D3DVALUE*,) \
ICOM_METHOD3(HRESULT,GetInfo, DWORD,,LPVOID,,DWORD, )
#define IDirect3DDevice7_IMETHODS \
IUnknown_IMETHODS \
IDirect3DDevice7_METHODS
ICOM_DEFINE(IDirect3DDevice7,IUnknown)
#undef ICOM_INTERFACE
#define IDirect3DDevice7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirect3DDevice7_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirect3DDevice7_Release(p) ICOM_CALL (Release,p)
#define IDirect3DDevice7_GetCaps(p,a) ICOM_CALL1(GetCaps,p,a)
#define IDirect3DDevice7_EnumTextureFormats(p,a,b) ICOM_CALL2(EnumTextureFormats,p,a,b)
#define IDirect3DDevice7_BeginScene(p) ICOM_CALL (BeginScene,p)
#define IDirect3DDevice7_EndScene(p) ICOM_CALL (EndScene,p)
#define IDirect3DDevice7_GetDirect3D(p,a) ICOM_CALL1(GetDirect3D,p,a)
#define IDirect3DDevice7_SetRenderTarget(p,a,b) ICOM_CALL2(SetRenderTarget,p,a,b)
#define IDirect3DDevice7_GetRenderTarget(p,a) ICOM_CALL1(GetRenderTarget,p,a)
#define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) ICOM_CALL6(Clear,p,a,b,c,d,e,f)
#define IDirect3DDevice7_SetTransform(p,a,b) ICOM_CALL2(SetTransform,p,a,b)
#define IDirect3DDevice7_GetTransform(p,a,b) ICOM_CALL2(GetTransform,p,a,b)
#define IDirect3DDevice7_SetViewport(p,a) ICOM_CALL1(SetViewport,p,a)
#define IDirect3DDevice7_MultiplyTransform(p,a,b) ICOM_CALL2(MultiplyTransform,p,a,b)
#define IDirect3DDevice7_GetViewport(p,a) ICOM_CALL1(GetViewport,p,a)
#define IDirect3DDevice7_SetMaterial(p,a) ICOM_CALL1(SetMaterial,p,a)
#define IDirect3DDevice7_GetMaterial(p,a) ICOM_CALL1(GetMaterial,p,a)
#define IDirect3DDevice7_SetLight(p,a,b) ICOM_CALL2(SetLight,p,a,b)
#define IDirect3DDevice7_GetLight(p,a,b) ICOM_CALL2(GetLight,p,a,b)
#define IDirect3DDevice7_SetRenderState(p,a,b) ICOM_CALL2(SetRenderState,p,a,b)
#define IDirect3DDevice7_GetRenderState(p,a,b) ICOM_CALL2(GetRenderState,p,a,b)
#define IDirect3DDevice7_BeginStateBlock(p) ICOM_CALL (BeginStateBlock,p)
#define IDirect3DDevice7_EndStateBlock(p,a) ICOM_CALL1(EndStateBlock,p,a)
#define IDirect3DDevice7_PreLoad(p,a) ICOM_CALL1(PreLoad,p,a)
#define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitive,p,a,b,c,d,e)
#define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitive,p,a,b,c,d,e,f,g)
#define IDirect3DDevice7_SetClipStatus(p,a) ICOM_CALL1(SetClipStatus,p,a)
#define IDirect3DDevice7_GetClipStatus(p,a) ICOM_CALL1(GetClipStatus,p,a)
#define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitiveStrided,p,a,b,c,d,e)
#define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitiveStrided,p,a,b,c,d,e,f,g)
#define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) ICOM_CALL5(DrawPrimitiveVB,p,a,b,c,d,e)
#define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) ICOM_CALL7(DrawIndexedPrimitiveVB,p,a,b,c,d,e,f,g)
#define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) ICOM_CALL5(ComputeSphereVisibility,p,a,b,c,d,e)
#define IDirect3DDevice7_GetTexture(p,a,b) ICOM_CALL2(GetTexture,p,a,b)
#define IDirect3DDevice7_SetTexture(p,a,b) ICOM_CALL2(SetTexture,p,a,b)
#define IDirect3DDevice7_GetTextureStageState(p,a,b,c) ICOM_CALL3(GetTextureStageState,p,a,b,c)
#define IDirect3DDevice7_SetTextureStageState(p,a,b,c) ICOM_CALL3(SetTextureStageState,p,a,b,c)
#define IDirect3DDevice7_ValidateDevice(p,a) ICOM_CALL1(ValidateDevice,p,a)
#define IDirect3DDevice7_ApplyStateBlock(p,a) ICOM_CALL1(ApplyStateBlock,p,a)
#define IDirect3DDevice7_CaptureStateBlock(p,a) ICOM_CALL1(CaptureStateBlock,p,a)
#define IDirect3DDevice7_DeleteStateBlock(p,a) ICOM_CALL1(DeleteStateBlock,p,a)
#define IDirect3DDevice7_CreateStateBlock(p,a,b) ICOM_CALL2(CreateStateBlock,p,a,b)
#define IDirect3DDevice7_Load(p,a,b,c,d,e) ICOM_CALL5(Load,p,a,b,c,d,e)
#define IDirect3DDevice7_LightEnable(p,a,b) ICOM_CALL2(LightEnable,p,a,b)
#define IDirect3DDevice7_GetLightEnable(p,a,b) ICOM_CALL2(GetLightEnable,p,a,b)
#define IDirect3DDevice7_SetClipPlane(p,a,b) ICOM_CALL2(SetClipPlane,p,a,b)
#define IDirect3DDevice7_GetClipPlane(p,a,b) ICOM_CALL2(GetClipPlane,p,a,b)
#define IDirect3DDevice7_GetInfo(p,a,b,c) ICOM_CALL3(GetInfo,p,a,b,c)
/*****************************************************************************
* IDirect3DVertexBuffer interface
......@@ -1860,5 +940,35 @@ ICOM_DEFINE(IDirect3DVertexBuffer,IUnknown)
#define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) ICOM_CALL1(GetVertexBufferDesc,p,a)
#define IDirect3DVertexBuffer_Optimize(p,a,b) ICOM_CALL2(Optimize,p,a,b)
/*****************************************************************************
* IDirect3DVertexBuffer7 interface
*/
#define ICOM_INTERFACE IDirect3DVertexBuffer7
#define IDirect3DVertexBuffer7_METHODS \
ICOM_METHOD3(HRESULT,Lock, DWORD,dwFlags,LPVOID*,lplpData,LPDWORD,lpdwSize) \
ICOM_METHOD (HRESULT,Unlock) \
ICOM_METHOD7(HRESULT,ProcessVertices, DWORD,dwVertexOp,DWORD,dwDestIndex,DWORD,dwCount,LPDIRECT3DVERTEXBUFFER7,lpSrcBuffer,DWORD,dwSrcIndex,LPDIRECT3DDEVICE7,lpD3DDevice,DWORD,dwFlags) \
ICOM_METHOD1(HRESULT,GetVertexBufferDesc, LPD3DVERTEXBUFFERDESC,lpD3DVertexBufferDesc) \
ICOM_METHOD2(HRESULT,Optimize, LPDIRECT3DDEVICE7, lpD3DDevice,DWORD,dwFlags) \
ICOM_METHOD7(HRESULT,ProcessVerticesStrided, DWORD,,DWORD,,DWORD,,LPD3DDRAWPRIMITIVESTRIDEDDATA,,DWORD,,LPDIRECT3DDEVICE7,,DWORD,)
#define IDirect3DVertexBuffer7_IMETHODS \
IUnknown_IMETHODS \
IDirect3DVertexBuffer7_METHODS
ICOM_DEFINE(IDirect3DVertexBuffer7,IUnknown)
#undef ICOM_INTERFACE
/*** IUnknown methods ***/
#define IDirect3DVertexBuffer7_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirect3DVertexBuffer7_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirect3DVertexBuffer7_Release(p) ICOM_CALL (Release,p)
/*** IDirect3DVertexBuffer7 methods ***/
#define IDirect3DVertexBuffer7_Lock(p,a,b,c) ICOM_CALL3(Lock,p,a,b,c)
#define IDirect3DVertexBuffer7_Unlock(p) ICOM_CALL (Unlock,p)
#define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) ICOM_CALL7(ProcessVertices,p,a,b,c,d,e,f,g)
#define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) ICOM_CALL1(GetVertexBufferDesc,p,a)
#define IDirect3DVertexBuffer7_Optimize(p,a,b) ICOM_CALL2(Optimize,p,a,b)
#define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) ICOM_CALL7(ProcessVerticesStrided,p,a,b,c,d,e,f,g)
#endif /* __WINE_D3D_H */
#ifndef __WINE_D3DCAPS_H
#define __WINE_D3DCAPS_H
#include "ddraw.h"
typedef struct _D3DTRANSFORMCAPS {
DWORD dwSize;
DWORD dwCaps;
} D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS;
#define D3DTRANSFORMCAPS_CLIP 0x00000001L
typedef struct _D3DLIGHTINGCAPS {
DWORD dwSize;
DWORD dwCaps;
DWORD dwLightingModel;
DWORD dwNumLights;
} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS;
#define D3DLIGHTINGMODEL_RGB 0x00000001
#define D3DLIGHTINGMODEL_MONO 0x00000002
#define D3DLIGHTCAPS_POINT 0x00000001
#define D3DLIGHTCAPS_SPOT 0x00000002
#define D3DLIGHTCAPS_DIRECTIONAL 0x00000004
#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008
#define D3DLIGHTCAPS_GLSPOT 0x00000010
typedef struct _D3dPrimCaps {
DWORD dwSize;
DWORD dwMiscCaps;
DWORD dwRasterCaps;
DWORD dwZCmpCaps;
DWORD dwSrcBlendCaps;
DWORD dwDestBlendCaps;
DWORD dwAlphaCmpCaps;
DWORD dwShadeCaps;
DWORD dwTextureCaps;
DWORD dwTextureFilterCaps;
DWORD dwTextureBlendCaps;
DWORD dwTextureAddressCaps;
DWORD dwStippleWidth;
DWORD dwStippleHeight;
} D3DPRIMCAPS, *LPD3DPRIMCAPS;
#define D3DPMISCCAPS_MASKPLANES 0x00000001
#define D3DPMISCCAPS_MASKZ 0x00000002
#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004
#define D3DPMISCCAPS_CONFORMANT 0x00000008
#define D3DPMISCCAPS_CULLNONE 0x00000010
#define D3DPMISCCAPS_CULLCW 0x00000020
#define D3DPMISCCAPS_CULLCCW 0x00000040
#define D3DPRASTERCAPS_DITHER 0x00000001
#define D3DPRASTERCAPS_ROP2 0x00000002
#define D3DPRASTERCAPS_XOR 0x00000004
#define D3DPRASTERCAPS_PAT 0x00000008
#define D3DPRASTERCAPS_ZTEST 0x00000010
#define D3DPRASTERCAPS_SUBPIXEL 0x00000020
#define D3DPRASTERCAPS_SUBPIXELX 0x00000040
#define D3DPRASTERCAPS_FOGVERTEX 0x00000080
#define D3DPRASTERCAPS_FOGTABLE 0x00000100
#define D3DPRASTERCAPS_STIPPLE 0x00000200
#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400
#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800
#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000
#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000
#define D3DPRASTERCAPS_ZBIAS 0x00004000
#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000
#define D3DPRASTERCAPS_FOGRANGE 0x00010000
#define D3DPRASTERCAPS_ANISOTROPY 0x00020000
#define D3DPRASTERCAPS_WBUFFER 0x00040000
#define D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000
#define D3DPRASTERCAPS_WFOG 0x00100000
#define D3DPRASTERCAPS_ZFOG 0x00200000
#define D3DPCMPCAPS_NEVER 0x00000001
#define D3DPCMPCAPS_LESS 0x00000002
#define D3DPCMPCAPS_EQUAL 0x00000004
#define D3DPCMPCAPS_LESSEQUAL 0x00000008
#define D3DPCMPCAPS_GREATER 0x00000010
#define D3DPCMPCAPS_NOTEQUAL 0x00000020
#define D3DPCMPCAPS_GREATEREQUAL 0x00000040
#define D3DPCMPCAPS_ALWAYS 0x00000080
#define D3DPBLENDCAPS_ZERO 0x00000001
#define D3DPBLENDCAPS_ONE 0x00000002
#define D3DPBLENDCAPS_SRCCOLOR 0x00000004
#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008
#define D3DPBLENDCAPS_SRCALPHA 0x00000010
#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020
#define D3DPBLENDCAPS_DESTALPHA 0x00000040
#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080
#define D3DPBLENDCAPS_DESTCOLOR 0x00000100
#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200
#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400
#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800
#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000
#define D3DPSHADECAPS_COLORFLATMONO 0x00000001
#define D3DPSHADECAPS_COLORFLATRGB 0x00000002
#define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004
#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008
#define D3DPSHADECAPS_COLORPHONGMONO 0x00000010
#define D3DPSHADECAPS_COLORPHONGRGB 0x00000020
#define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040
#define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080
#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100
#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200
#define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400
#define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800
#define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000
#define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000
#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000
#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000
#define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000
#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000
#define D3DPSHADECAPS_FOGFLAT 0x00040000
#define D3DPSHADECAPS_FOGGOURAUD 0x00080000
#define D3DPSHADECAPS_FOGPHONG 0x00100000
#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001
#define D3DPTEXTURECAPS_POW2 0x00000002
#define D3DPTEXTURECAPS_ALPHA 0x00000004
#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008
#define D3DPTEXTURECAPS_BORDER 0x00000010
#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020
#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040
#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080
#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L
/* yes actually 0x00000200 is unused - or at least unreleased */
#define D3DPTEXTURECAPS_PROJECTED 0x00000400
#define D3DPTEXTURECAPS_CUBEMAP 0x00000800
#define D3DPTEXTURECAPS_COLORKEYBLEND 0x00001000
#define D3DPTFILTERCAPS_NEAREST 0x00000001
#define D3DPTFILTERCAPS_LINEAR 0x00000002
#define D3DPTFILTERCAPS_MIPNEAREST 0x00000004
#define D3DPTFILTERCAPS_MIPLINEAR 0x00000008
#define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010
#define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020
/* yes - missing numbers */
#define D3DPTFILTERCAPS_MINFPOINT 0x00000100
#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200
#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400
/* yes - missing numbers */
#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000
#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000
/* yes - missing numbers */
#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000
#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000
#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000
#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000
#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000
#define D3DPTBLENDCAPS_DECAL 0x00000001
#define D3DPTBLENDCAPS_MODULATE 0x00000002
#define D3DPTBLENDCAPS_DECALALPHA 0x00000004
#define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008
#define D3DPTBLENDCAPS_DECALMASK 0x00000010
#define D3DPTBLENDCAPS_MODULATEMASK 0x00000020
#define D3DPTBLENDCAPS_COPY 0x00000040
#define D3DPTBLENDCAPS_ADD 0x00000080
#define D3DPTADDRESSCAPS_WRAP 0x00000001
#define D3DPTADDRESSCAPS_MIRROR 0x00000002
#define D3DPTADDRESSCAPS_CLAMP 0x00000004
#define D3DPTADDRESSCAPS_BORDER 0x00000008
#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010
typedef struct _D3DDeviceDesc {
DWORD dwSize;
DWORD dwFlags;
D3DCOLORMODEL dcmColorModel;
DWORD dwDevCaps;
D3DTRANSFORMCAPS dtcTransformCaps;
BOOL bClipping;
D3DLIGHTINGCAPS dlcLightingCaps;
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth;
DWORD dwDeviceZBufferBitDepth;
DWORD dwMaxBufferSize;
DWORD dwMaxVertexCount;
DWORD dwMinTextureWidth,dwMinTextureHeight;
DWORD dwMaxTextureWidth,dwMaxTextureHeight;
DWORD dwMinStippleWidth,dwMaxStippleWidth;
DWORD dwMinStippleHeight,dwMaxStippleHeight;
DWORD dwMaxTextureRepeat;
DWORD dwMaxTextureAspectRatio;
DWORD dwMaxAnisotropy;
D3DVALUE dvGuardBandLeft;
D3DVALUE dvGuardBandTop;
D3DVALUE dvGuardBandRight;
D3DVALUE dvGuardBandBottom;
D3DVALUE dvExtentsAdjust;
DWORD dwStencilCaps;
DWORD dwFVFCaps;
DWORD dwTextureOpCaps;
WORD wMaxTextureBlendStages;
WORD wMaxSimultaneousTextures;
} D3DDEVICEDESC,*LPD3DDEVICEDESC;
#define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC))
typedef struct _D3DDeviceDesc7 {
DWORD dwDevCaps;
D3DPRIMCAPS dpcLineCaps;
D3DPRIMCAPS dpcTriCaps;
DWORD dwDeviceRenderBitDepth;
DWORD dwDeviceZBufferBitDepth;
DWORD dwMinTextureWidth, dwMinTextureHeight;
DWORD dwMaxTextureWidth, dwMaxTextureHeight;
DWORD dwMaxTextureRepeat;
DWORD dwMaxTextureAspectRatio;
DWORD dwMaxAnisotropy;
D3DVALUE dvGuardBandLeft;
D3DVALUE dvGuardBandTop;
D3DVALUE dvGuardBandRight;
D3DVALUE dvGuardBandBottom;
D3DVALUE dvExtentsAdjust;
DWORD dwStencilCaps;
DWORD dwFVFCaps;
DWORD dwTextureOpCaps;
WORD wMaxTextureBlendStages;
WORD wMaxSimultaneousTextures;
DWORD dwMaxActiveLights;
D3DVALUE dvMaxVertexW;
GUID deviceGUID;
WORD wMaxUserClipPlanes;
WORD wMaxVertexBlendMatrices;
DWORD dwVertexProcessingCaps;
DWORD dwReserved1;
DWORD dwReserved2;
DWORD dwReserved3;
DWORD dwReserved4;
} D3DDEVICEDESC7, *LPD3DDEVICEDESC7;
#define D3DDEVICEDESC7SIZE (sizeof(D3DDEVICEDESC7))
#define D3DDD_COLORMODEL 0x00000001
#define D3DDD_DEVCAPS 0x00000002
#define D3DDD_TRANSFORMCAPS 0x00000004
#define D3DDD_LIGHTINGCAPS 0x00000008
#define D3DDD_BCLIPPING 0x00000010
#define D3DDD_LINECAPS 0x00000020
#define D3DDD_TRICAPS 0x00000040
#define D3DDD_DEVICERENDERBITDEPTH 0x00000080
#define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100
#define D3DDD_MAXBUFFERSIZE 0x00000200
#define D3DDD_MAXVERTEXCOUNT 0x00000400
#define D3DDEVCAPS_FLOATTLVERTEX 0x00000001
#define D3DDEVCAPS_SORTINCREASINGZ 0x00000002
#define D3DDEVCAPS_SORTDECREASINGZ 0X00000004
#define D3DDEVCAPS_SORTEXACT 0x00000008
#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010
#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020
#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040
#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080
#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100
#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200
#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400
#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800
#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000
#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000
#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000
#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000
#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000
#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000
#define D3DDEVCAPS_HWRASTERIZATION 0x00080000
#define D3DSTENCILCAPS_KEEP 0x00000001
#define D3DSTENCILCAPS_ZERO 0x00000002
#define D3DSTENCILCAPS_REPLACE 0x00000004
#define D3DSTENCILCAPS_INCRSAT 0x00000008
#define D3DSTENCILCAPS_DECRSAT 0x00000010
#define D3DSTENCILCAPS_INVERT 0x00000020
#define D3DSTENCILCAPS_INCR 0x00000040
#define D3DSTENCILCAPS_DECR 0x00000080
#define D3DTEXOPCAPS_DISABLE 0x00000001
#define D3DTEXOPCAPS_SELECTARG1 0x00000002
#define D3DTEXOPCAPS_SELECTARG2 0x00000004
#define D3DTEXOPCAPS_MODULATE 0x00000008
#define D3DTEXOPCAPS_MODULATE2X 0x00000010
#define D3DTEXOPCAPS_MODULATE4X 0x00000020
#define D3DTEXOPCAPS_ADD 0x00000040
#define D3DTEXOPCAPS_ADDSIGNED 0x00000080
#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100
#define D3DTEXOPCAPS_SUBTRACT 0x00000200
#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400
#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800
#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000
#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000
#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000
#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000
#define D3DTEXOPCAPS_PREMODULATE 0x00010000
#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000
#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000
#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000
#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000
#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000
#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000
#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000
#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000FFFF
#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000
#define D3DVTXPCAPS_TEXGEN 0x00000001
#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002
#define D3DVTXPCAPS_VERTEXFOG 0x00000004
#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008
#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010
#define D3DVTXPCAPS_LOCALVIEWER 0x00000020
typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK)(LPGUID lpGuid,LPSTR lpDeviceDescription,LPSTR lpDeviceName,LPD3DDEVICEDESC,LPD3DDEVICEDESC,LPVOID);
typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK7)(LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC7, LPVOID);
#define D3DFDS_COLORMODEL 0x00000001
#define D3DFDS_GUID 0x00000002
#define D3DFDS_HARDWARE 0x00000004
#define D3DFDS_TRIANGLES 0x00000008
#define D3DFDS_LINES 0x00000010
#define D3DFDS_MISCCAPS 0x00000020
#define D3DFDS_RASTERCAPS 0x00000040
#define D3DFDS_ZCMPCAPS 0x00000080
#define D3DFDS_ALPHACMPCAPS 0x00000100
#define D3DFDS_SRCBLENDCAPS 0x00000200
#define D3DFDS_DSTBLENDCAPS 0x00000400
#define D3DFDS_SHADECAPS 0x00000800
#define D3DFDS_TEXTURECAPS 0x00001000
#define D3DFDS_TEXTUREFILTERCAPS 0x00002000
#define D3DFDS_TEXTUREBLENDCAPS 0x00004000
#define D3DFDS_TEXTUREADDRESSCAPS 0x00008000
typedef struct _D3DFINDDEVICESEARCH {
DWORD dwSize;
DWORD dwFlags;
BOOL bHardware;
D3DCOLORMODEL dcmColorModel;
GUID guid;
DWORD dwCaps;
D3DPRIMCAPS dpcPrimCaps;
} D3DFINDDEVICESEARCH,*LPD3DFINDDEVICESEARCH;
typedef struct _D3DFINDDEVICERESULT {
DWORD dwSize;
GUID guid;
D3DDEVICEDESC ddHwDesc;
D3DDEVICEDESC ddSwDesc;
} D3DFINDDEVICERESULT,*LPD3DFINDDEVICERESULT;
typedef struct _D3DExecuteBufferDesc {
DWORD dwSize;
DWORD dwFlags;
DWORD dwCaps;
DWORD dwBufferSize;
LPVOID lpData;
} D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC;
#define D3DDEB_BUFSIZE 0x00000001
#define D3DDEB_CAPS 0x00000002
#define D3DDEB_LPDATA 0x00000004
#define D3DDEBCAPS_SYSTEMMEMORY 0x00000001
#define D3DDEBCAPS_VIDEOMEMORY 0x00000002
#define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY) /* = 0x3 */
typedef struct _D3DDEVINFO_TEXTUREMANAGER {
BOOL bThrashing;
DWORD dwApproxBytesDownloaded;
DWORD dwNumEvicts;
DWORD dwNumVidCreates;
DWORD dwNumTexturesUsed;
DWORD dwNumUsedTexInVid;
DWORD dwWorkingSet;
DWORD dwWorkingSetBytes;
DWORD dwTotalManaged;
DWORD dwTotalBytes;
DWORD dwLastPri;
} D3DDEVINFO_TEXTUREMANAGER, *LPD3DDEVINFO_TEXTUREMANAGER;
typedef struct _D3DDEVINFO_TEXTURING {
DWORD dwNumLoads;
DWORD dwApproxBytesLoaded;
DWORD dwNumPreLoads;
DWORD dwNumSet;
DWORD dwNumCreates;
DWORD dwNumDestroys;
DWORD dwNumSetPriorities;
DWORD dwNumSetLODs;
DWORD dwNumLocks;
DWORD dwNumGetDCs;
} D3DDEVINFO_TEXTURING, *LPD3DDEVINFO_TEXTURING;
#endif
/* FIXME: Need to add C++ code for certain structs for headers - this is going to be a problem
if WINE continues to only use C code - I suppose that we could always inline in
the header file to get around that little problem... */
/* FIXME: We need to implement versioning on everything directx 5 and up if these headers
are going to be generically useful for directx stuff */
#ifndef __WINE_D3DTYPES_H
#define __WINE_D3DTYPES_H
/* #include <windows.h> FIXME: Need to include for compatibility. Inclusion caused compile fail */
#include <float.h>
#include "ddraw.h"
#define D3DVALP(val, prec) ((float)(val))
#define D3DVAL(val) ((float)(val))
typedef float D3DVALUE,*LPD3DVALUE;
#define D3DDivide(a, b) (float)((double) (a) / (double) (b))
#define D3DMultiply(a, b) ((a) * (b))
typedef LONG D3DFIXED;
#ifndef RGB_MAKE
#define CI_GETALPHA(ci) ((ci) >> 24)
#define CI_GETINDEX(ci) (((ci) >> 8) & 0xffff)
#define CI_GETFRACTION(ci) ((ci) & 0xff)
#define CI_ROUNDINDEX(ci) CI_GETINDEX((ci) + 0x80)
#define CI_MASKALPHA(ci) ((ci) & 0xffffff)
#define CI_MAKE(a, i, f) (((a) << 24) | ((i) << 8) | (f))
#define RGBA_GETALPHA(rgb) ((rgb) >> 24)
#define RGBA_GETRED(rgb) (((rgb) >> 16) & 0xff)
#define RGBA_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
#define RGBA_GETBLUE(rgb) ((rgb) & 0xff)
#define RGBA_MAKE(r, g, b, a) ((D3DCOLOR) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b)))
#define D3DRGB(r, g, b) \
(0xff000000L | ( ((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255))
#define D3DRGBA(r, g, b, a) \
( (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \
| (((long)((g) * 255)) << 8) | (long)((b) * 255) \
)
#define RGB_GETRED(rgb) (((rgb) >> 16) & 0xff)
#define RGB_GETGREEN(rgb) (((rgb) >> 8) & 0xff)
#define RGB_GETBLUE(rgb) ((rgb) & 0xff)
#define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba) & 0x00ffffff))
#define RGB_MAKE(r, g, b) ((D3DCOLOR) (((r) << 16) | ((g) << 8) | (b)))
#define RGBA_TORGB(rgba) ((D3DCOLOR) ((rgba) & 0xffffff))
#define RGB_TORGBA(rgb) ((D3DCOLOR) ((rgb) | 0xff000000))
#endif
#define D3DENUMRET_CANCEL DDENUMRET_CANCEL
#define D3DENUMRET_OK DDENUMRET_OK
typedef HRESULT (CALLBACK* LPD3DVALIDATECALLBACK)(LPVOID lpUserArg, DWORD dwOffset);
typedef HRESULT (CALLBACK* LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd, LPVOID lpContext);
typedef HRESULT (CALLBACK* LPD3DENUMPIXELFORMATSCALLBACK)(LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext);
typedef DWORD D3DCOLOR, *LPD3DCOLOR;
typedef DWORD D3DMATERIALHANDLE, *LPD3DMATERIALHANDLE;
typedef DWORD D3DTEXTUREHANDLE, *LPD3DTEXTUREHANDLE;
typedef DWORD D3DMATRIXHANDLE, *LPD3DMATRIXHANDLE;
typedef struct _D3DCOLORVALUE {
union {
D3DVALUE r;
D3DVALUE dvR;
} r;
union {
D3DVALUE g;
D3DVALUE dvG;
} g;
union {
D3DVALUE b;
D3DVALUE dvB;
} b;
union {
D3DVALUE a;
D3DVALUE dvA;
} a;
} D3DCOLORVALUE,*LPD3DCOLORVALUE;
typedef struct _D3DRECT {
union {
LONG x1;
LONG lX1;
} x1;
union {
LONG y1;
LONG lY1;
} y1;
union {
LONG x2;
LONG lX2;
} x2;
union {
LONG y2;
LONG lY2;
} y2;
} D3DRECT, *LPD3DRECT;
typedef struct _D3DVECTOR {
union {
D3DVALUE x;
D3DVALUE dvX;
} x;
union {
D3DVALUE y;
D3DVALUE dvY;
} y;
union {
D3DVALUE z;
D3DVALUE dvZ;
} z;
/* the C++ variant has operator overloads etc. too */
} D3DVECTOR,*LPD3DVECTOR;
typedef struct _D3DHVERTEX {
DWORD dwFlags;
union {
D3DVALUE hx;
D3DVALUE dvHX;
} x;
union {
D3DVALUE hy;
D3DVALUE dvHY;
} y;
union {
D3DVALUE hz;
D3DVALUE dvHZ;
} z;
} D3DHVERTEX, *LPD3DHVERTEX;
/*
* Transformed/lit vertices
*/
typedef struct {
union {
D3DVALUE sx;
D3DVALUE dvSX;
} x;
union {
D3DVALUE sy;
D3DVALUE dvSY;
} y;
union {
D3DVALUE sz;
D3DVALUE dvSZ;
} z;
union {
D3DVALUE rhw;
D3DVALUE dvRHW;
} r;
union {
D3DCOLOR color;
D3DCOLOR dcColor;
} c;
union {
D3DCOLOR specular;
D3DCOLOR dcSpecular;
} s;
union {
D3DVALUE tu;
D3DVALUE dvTU;
} u;
union {
D3DVALUE tv;
D3DVALUE dvTV;
} v;
/* There are C++ members associated with this class */
} D3DTLVERTEX, *LPD3DTLVERTEX;
typedef struct _D3DLVERTEX {
union {
D3DVALUE x;
D3DVALUE dvX;
} x;
union {
D3DVALUE y;
D3DVALUE dvY;
} y;
union {
D3DVALUE z;
D3DVALUE dvZ;
} z;
DWORD dwReserved;
union {
D3DCOLOR color;
D3DCOLOR dcColor;
} c;
union {
D3DCOLOR specular;
D3DCOLOR dcSpecular;
} s;
union {
D3DVALUE tu;
D3DVALUE dvTU;
} u;
union {
D3DVALUE tv;
D3DVALUE dvTV;
} v;
} D3DLVERTEX, *LPD3DLVERTEX;
typedef struct _D3DVERTEX {
union {
D3DVALUE x;
D3DVALUE dvX;
} x;
union {
D3DVALUE y;
D3DVALUE dvY;
} y;
union {
D3DVALUE z;
D3DVALUE dvZ;
} z;
union {
D3DVALUE nx;
D3DVALUE dvNX;
} nx;
union {
D3DVALUE ny;
D3DVALUE dvNY;
} ny;
union {
D3DVALUE nz;
D3DVALUE dvNZ;
} nz;
union {
D3DVALUE tu;
D3DVALUE dvTU;
} u;
union {
D3DVALUE tv;
D3DVALUE dvTV;
} v;
/* FIXME: Some C++ stuff to go here */
} D3DVERTEX, *LPD3DVERTEX;
typedef struct {
D3DVALUE _11, _12, _13, _14;
D3DVALUE _21, _22, _23, _24;
D3DVALUE _31, _32, _33, _34;
D3DVALUE _41, _42, _43, _44;
/* FIXME: Some C++ stuff here */
} D3DMATRIX, *LPD3DMATRIX;
typedef struct _D3DVIEWPORT {
DWORD dwSize;
DWORD dwX;
DWORD dwY;
DWORD dwWidth;
DWORD dwHeight;
D3DVALUE dvScaleX;
D3DVALUE dvScaleY;
D3DVALUE dvMaxX;
D3DVALUE dvMaxY;
D3DVALUE dvMinZ;
D3DVALUE dvMaxZ;
} D3DVIEWPORT, *LPD3DVIEWPORT;
typedef struct _D3DVIEWPORT2 {
DWORD dwSize;
DWORD dwX;
DWORD dwY;
DWORD dwWidth;
DWORD dwHeight;
D3DVALUE dvClipX;
D3DVALUE dvClipY;
D3DVALUE dvClipWidth;
D3DVALUE dvClipHeight;
D3DVALUE dvMinZ;
D3DVALUE dvMaxZ;
} D3DVIEWPORT2, *LPD3DVIEWPORT2;
typedef struct _D3DVIEWPORT7 {
DWORD dwX;
DWORD dwY;
DWORD dwWidth;
DWORD dwHeight;
D3DVALUE dvMinZ;
D3DVALUE dvMaxZ;
} D3DVIEWPORT7, *LPD3DVIEWPORT7;
#define D3DMAXUSERCLIPPLANES 32
#define D3DCLIPPLANE0 (1 << 0)
#define D3DCLIPPLANE1 (1 << 1)
#define D3DCLIPPLANE2 (1 << 2)
#define D3DCLIPPLANE3 (1 << 3)
#define D3DCLIPPLANE4 (1 << 4)
#define D3DCLIPPLANE5 (1 << 5)
#define D3DCLIP_LEFT 0x00000001
#define D3DCLIP_RIGHT 0x00000002
#define D3DCLIP_TOP 0x00000004
#define D3DCLIP_BOTTOM 0x00000008
#define D3DCLIP_FRONT 0x00000010
#define D3DCLIP_BACK 0x00000020
#define D3DCLIP_GEN0 0x00000040
#define D3DCLIP_GEN1 0x00000080
#define D3DCLIP_GEN2 0x00000100
#define D3DCLIP_GEN3 0x00000200
#define D3DCLIP_GEN4 0x00000400
#define D3DCLIP_GEN5 0x00000800
#define D3DSTATUS_CLIPUNIONLEFT D3DCLIP_LEFT
#define D3DSTATUS_CLIPUNIONRIGHT D3DCLIP_RIGHT
#define D3DSTATUS_CLIPUNIONTOP D3DCLIP_TOP
#define D3DSTATUS_CLIPUNIONBOTTOM D3DCLIP_BOTTOM
#define D3DSTATUS_CLIPUNIONFRONT D3DCLIP_FRONT
#define D3DSTATUS_CLIPUNIONBACK D3DCLIP_BACK
#define D3DSTATUS_CLIPUNIONGEN0 D3DCLIP_GEN0
#define D3DSTATUS_CLIPUNIONGEN1 D3DCLIP_GEN1
#define D3DSTATUS_CLIPUNIONGEN2 D3DCLIP_GEN2
#define D3DSTATUS_CLIPUNIONGEN3 D3DCLIP_GEN3
#define D3DSTATUS_CLIPUNIONGEN4 D3DCLIP_GEN4
#define D3DSTATUS_CLIPUNIONGEN5 D3DCLIP_GEN5
#define D3DSTATUS_CLIPINTERSECTIONLEFT 0x00001000
#define D3DSTATUS_CLIPINTERSECTIONRIGHT 0x00002000
#define D3DSTATUS_CLIPINTERSECTIONTOP 0x00004000
#define D3DSTATUS_CLIPINTERSECTIONBOTTOM 0x00008000
#define D3DSTATUS_CLIPINTERSECTIONFRONT 0x00010000
#define D3DSTATUS_CLIPINTERSECTIONBACK 0x00020000
#define D3DSTATUS_CLIPINTERSECTIONGEN0 0x00040000
#define D3DSTATUS_CLIPINTERSECTIONGEN1 0x00080000
#define D3DSTATUS_CLIPINTERSECTIONGEN2 0x00100000
#define D3DSTATUS_CLIPINTERSECTIONGEN3 0x00200000
#define D3DSTATUS_CLIPINTERSECTIONGEN4 0x00400000
#define D3DSTATUS_CLIPINTERSECTIONGEN5 0x00800000
#define D3DSTATUS_ZNOTVISIBLE 0x01000000
#define D3DSTATUS_CLIPUNIONALL ( \
D3DSTATUS_CLIPUNIONLEFT | \
D3DSTATUS_CLIPUNIONRIGHT | \
D3DSTATUS_CLIPUNIONTOP | \
D3DSTATUS_CLIPUNIONBOTTOM | \
D3DSTATUS_CLIPUNIONFRONT | \
D3DSTATUS_CLIPUNIONBACK | \
D3DSTATUS_CLIPUNIONGEN0 | \
D3DSTATUS_CLIPUNIONGEN1 | \
D3DSTATUS_CLIPUNIONGEN2 | \
D3DSTATUS_CLIPUNIONGEN3 | \
D3DSTATUS_CLIPUNIONGEN4 | \
D3DSTATUS_CLIPUNIONGEN5 \
)
#define D3DSTATUS_CLIPINTERSECTIONALL ( \
D3DSTATUS_CLIPINTERSECTIONLEFT | \
D3DSTATUS_CLIPINTERSECTIONRIGHT | \
D3DSTATUS_CLIPINTERSECTIONTOP | \
D3DSTATUS_CLIPINTERSECTIONBOTTOM | \
D3DSTATUS_CLIPINTERSECTIONFRONT | \
D3DSTATUS_CLIPINTERSECTIONBACK | \
D3DSTATUS_CLIPINTERSECTIONGEN0 | \
D3DSTATUS_CLIPINTERSECTIONGEN1 | \
D3DSTATUS_CLIPINTERSECTIONGEN2 | \
D3DSTATUS_CLIPINTERSECTIONGEN3 | \
D3DSTATUS_CLIPINTERSECTIONGEN4 | \
D3DSTATUS_CLIPINTERSECTIONGEN5 \
)
#define D3DSTATUS_DEFAULT ( \
D3DSTATUS_CLIPINTERSECTIONALL | \
D3DSTATUS_ZNOTVISIBLE)
#define D3DTRANSFORM_CLIPPED 0x00000001
#define D3DTRANSFORM_UNCLIPPED 0x00000002
typedef struct _D3DTRANSFORMDATA {
DWORD dwSize;
LPVOID lpIn;
DWORD dwInSize;
LPVOID lpOut;
DWORD dwOutSize;
LPD3DHVERTEX lpHOut;
DWORD dwClip;
DWORD dwClipIntersection;
DWORD dwClipUnion;
D3DRECT drExtent;
} D3DTRANSFORMDATA, *LPD3DTRANSFORMDATA;
typedef struct _D3DLIGHTINGELEMENT {
D3DVECTOR dvPosition;
D3DVECTOR dvNormal;
} D3DLIGHTINGELEMENT, *LPD3DLIGHTINGELEMENT;
typedef struct _D3DMATERIAL {
DWORD dwSize;
union {
D3DCOLORVALUE diffuse;
D3DCOLORVALUE dcvDiffuse;
} a;
union {
D3DCOLORVALUE ambient;
D3DCOLORVALUE dcvAmbient;
} b;
union {
D3DCOLORVALUE specular;
D3DCOLORVALUE dcvSpecular;
} c;
union {
D3DCOLORVALUE emissive;
D3DCOLORVALUE dcvEmissive;
} d;
union {
D3DVALUE power;
D3DVALUE dvPower;
} e;
D3DTEXTUREHANDLE hTexture;
DWORD dwRampSize;
} D3DMATERIAL, *LPD3DMATERIAL;
typedef struct _D3DMATERIAL7 {
union {
D3DCOLORVALUE diffuse;
D3DCOLORVALUE dcvDiffuse;
}a;
union {
D3DCOLORVALUE ambient;
D3DCOLORVALUE dcvAmbient;
}b;
union {
D3DCOLORVALUE specular;
D3DCOLORVALUE dcvSpecular;
}c;
union {
D3DCOLORVALUE emissive;
D3DCOLORVALUE dcvEmissive;
}d;
union {
D3DVALUE power;
D3DVALUE dvPower;
}e;
} D3DMATERIAL7, *LPD3DMATERIAL7;
typedef enum {
D3DLIGHT_POINT = 1,
D3DLIGHT_SPOT = 2,
D3DLIGHT_DIRECTIONAL = 3,
D3DLIGHT_PARALLELPOINT = 4,
D3DLIGHT_GLSPOT = 5,
D3DLIGHT_FORCE_DWORD = 0x7fffffff
} D3DLIGHTTYPE;
typedef struct _D3DLIGHT {
DWORD dwSize;
D3DLIGHTTYPE dltType;
D3DCOLORVALUE dcvColor;
D3DVECTOR dvPosition;
D3DVECTOR dvDirection;
D3DVALUE dvRange;
D3DVALUE dvFalloff;
D3DVALUE dvAttenuation0;
D3DVALUE dvAttenuation1;
D3DVALUE dvAttenuation2;
D3DVALUE dvTheta;
D3DVALUE dvPhi;
} D3DLIGHT,*LPD3DLIGHT;
typedef struct _D3DLIGHT7 {
D3DLIGHTTYPE dltType;
D3DCOLORVALUE dcvDiffuse;
D3DCOLORVALUE dcvSpecular;
D3DCOLORVALUE dcvAmbient;
D3DVECTOR dvPosition;
D3DVECTOR dvDirection;
D3DVALUE dvRange;
D3DVALUE dvFalloff;
D3DVALUE dvAttenuation0;
D3DVALUE dvAttenuation1;
D3DVALUE dvAttenuation2;
D3DVALUE dvTheta;
D3DVALUE dvPhi;
} D3DLIGHT7, *LPD3DLIGHT7;
#define D3DLIGHT_ACTIVE 0x00000001
#define D3DLIGHT_NO_SPECULAR 0x00000002
#define D3DLIGHT_ALL (D3DLIGHT_ACTIVE | D3DLIGHT_NO_SPECULAR) /* 0x3 */
#define D3DLIGHT_RANGE_MAX ((float)sqrt(FLT_MAX))
typedef struct _D3DLIGHT2 {
DWORD dwSize;
D3DLIGHTTYPE dltType;
D3DCOLORVALUE dcvColor;
D3DVECTOR dvPosition;
D3DVECTOR dvDirection;
D3DVALUE dvRange;
D3DVALUE dvFalloff;
D3DVALUE dvAttenuation0;
D3DVALUE dvAttenuation1;
D3DVALUE dvAttenuation2;
D3DVALUE dvTheta;
D3DVALUE dvPhi;
DWORD dwFlags;
} D3DLIGHT2, *LPD3DLIGHT2;
typedef struct _D3DLIGHTDATA {
DWORD dwSize;
LPD3DLIGHTINGELEMENT lpIn;
DWORD dwInSize;
LPD3DTLVERTEX lpOut;
DWORD dwOutSize;
} D3DLIGHTDATA, *LPD3DLIGHTDATA;
#define D3DCOLOR_MONO 1
#define D3DCOLOR_RGB 2
typedef DWORD D3DCOLORMODEL;
#define D3DCLEAR_TARGET 0x00000001
#define D3DCLEAR_ZBUFFER 0x00000002
#define D3DCLEAR_STENCIL 0x00000004
typedef enum _D3DOPCODE {
D3DOP_POINT = 1,
D3DOP_LINE = 2,
D3DOP_TRIANGLE = 3,
D3DOP_MATRIXLOAD = 4,
D3DOP_MATRIXMULTIPLY = 5,
D3DOP_STATETRANSFORM = 6,
D3DOP_STATELIGHT = 7,
D3DOP_STATERENDER = 8,
D3DOP_PROCESSVERTICES = 9,
D3DOP_TEXTURELOAD = 10,
D3DOP_EXIT = 11,
D3DOP_BRANCHFORWARD = 12,
D3DOP_SPAN = 13,
D3DOP_SETSTATUS = 14,
D3DOP_FORCE_DWORD = 0x7fffffff
} D3DOPCODE;
typedef struct _D3DINSTRUCTION {
BYTE bOpcode;
BYTE bSize;
WORD wCount;
} D3DINSTRUCTION, *LPD3DINSTRUCTION;
typedef struct _D3DTEXTURELOAD {
D3DTEXTUREHANDLE hDestTexture;
D3DTEXTUREHANDLE hSrcTexture;
} D3DTEXTURELOAD, *LPD3DTEXTURELOAD;
typedef struct _D3DPICKRECORD {
BYTE bOpcode;
BYTE bPad;
DWORD dwOffset;
D3DVALUE dvZ;
} D3DPICKRECORD, *LPD3DPICKRECORD;
typedef enum {
D3DSHADE_FLAT = 1,
D3DSHADE_GOURAUD = 2,
D3DSHADE_PHONG = 3,
D3DSHADE_FORCE_DWORD = 0x7fffffff
} D3DSHADEMODE;
typedef enum {
D3DFILL_POINT = 1,
D3DFILL_WIREFRAME = 2,
D3DFILL_SOLID = 3,
D3DFILL_FORCE_DWORD = 0x7fffffff
} D3DFILLMODE;
typedef struct _D3DLINEPATTERN {
WORD wRepeatFactor;
WORD wLinePattern;
} D3DLINEPATTERN;
typedef enum {
D3DFILTER_NEAREST = 1,
D3DFILTER_LINEAR = 2,
D3DFILTER_MIPNEAREST = 3,
D3DFILTER_MIPLINEAR = 4,
D3DFILTER_LINEARMIPNEAREST = 5,
D3DFILTER_LINEARMIPLINEAR = 6,
D3DFILTER_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREFILTER;
typedef enum {
D3DBLEND_ZERO = 1,
D3DBLEND_ONE = 2,
D3DBLEND_SRCCOLOR = 3,
D3DBLEND_INVSRCCOLOR = 4,
D3DBLEND_SRCALPHA = 5,
D3DBLEND_INVSRCALPHA = 6,
D3DBLEND_DESTALPHA = 7,
D3DBLEND_INVDESTALPHA = 8,
D3DBLEND_DESTCOLOR = 9,
D3DBLEND_INVDESTCOLOR = 10,
D3DBLEND_SRCALPHASAT = 11,
D3DBLEND_BOTHSRCALPHA = 12,
D3DBLEND_BOTHINVSRCALPHA = 13,
D3DBLEND_FORCE_DWORD = 0x7fffffff
} D3DBLEND;
typedef enum {
D3DTBLEND_DECAL = 1,
D3DTBLEND_MODULATE = 2,
D3DTBLEND_DECALALPHA = 3,
D3DTBLEND_MODULATEALPHA = 4,
D3DTBLEND_DECALMASK = 5,
D3DTBLEND_MODULATEMASK = 6,
D3DTBLEND_COPY = 7,
D3DTBLEND_ADD = 8,
D3DTBLEND_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREBLEND;
typedef enum _D3DTEXTUREADDRESS {
D3DTADDRESS_WRAP = 1,
D3DTADDRESS_MIRROR = 2,
D3DTADDRESS_CLAMP = 3,
D3DTADDRESS_BORDER = 4,
D3DTADDRESS_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREADDRESS;
typedef enum {
D3DCULL_NONE = 1,
D3DCULL_CW = 2,
D3DCULL_CCW = 3,
D3DCULL_FORCE_DWORD = 0x7fffffff
} D3DCULL;
typedef enum {
D3DCMP_NEVER = 1,
D3DCMP_LESS = 2,
D3DCMP_EQUAL = 3,
D3DCMP_LESSEQUAL = 4,
D3DCMP_GREATER = 5,
D3DCMP_NOTEQUAL = 6,
D3DCMP_GREATEREQUAL = 7,
D3DCMP_ALWAYS = 8,
D3DCMP_FORCE_DWORD = 0x7fffffff
} D3DCMPFUNC;
typedef enum _D3DSTENCILOP {
D3DSTENCILOP_KEEP = 1,
D3DSTENCILOP_ZERO = 2,
D3DSTENCILOP_REPLACE = 3,
D3DSTENCILOP_INCRSAT = 4,
D3DSTENCILOP_DECRSAT = 5,
D3DSTENCILOP_INVERT = 6,
D3DSTENCILOP_INCR = 7,
D3DSTENCILOP_DECR = 8,
D3DSTENCILOP_FORCE_DWORD = 0x7fffffff
} D3DSTENCILOP;
typedef enum _D3DFOGMODE {
D3DFOG_NONE = 0,
D3DFOG_EXP = 1,
D3DFOG_EXP2 = 2,
D3DFOG_LINEAR = 3,
D3DFOG_FORCE_DWORD = 0x7fffffff
} D3DFOGMODE;
typedef enum _D3DZBUFFERTYPE {
D3DZB_FALSE = 0,
D3DZB_TRUE = 1,
D3DZB_USEW = 2,
D3DZB_FORCE_DWORD = 0x7fffffff
} D3DZBUFFERTYPE;
typedef enum _D3DANTIALIASMODE {
D3DANTIALIAS_NONE = 0,
D3DANTIALIAS_SORTDEPENDENT = 1,
D3DANTIALIAS_SORTINDEPENDENT = 2,
D3DANTIALIAS_FORCE_DWORD = 0x7fffffff
} D3DANTIALIASMODE;
typedef enum {
D3DVT_VERTEX = 1,
D3DVT_LVERTEX = 2,
D3DVT_TLVERTEX = 3,
D3DVT_FORCE_DWORD = 0x7fffffff
} D3DVERTEXTYPE;
typedef enum {
D3DPT_POINTLIST = 1,
D3DPT_LINELIST = 2,
D3DPT_LINESTRIP = 3,
D3DPT_TRIANGLELIST = 4,
D3DPT_TRIANGLESTRIP = 5,
D3DPT_TRIANGLEFAN = 6,
D3DPT_FORCE_DWORD = 0x7fffffff
} D3DPRIMITIVETYPE;
#define D3DSTATE_OVERRIDE_BIAS 256
#define D3DSTATE_OVERRIDE(type) (D3DRENDERSTATETYPE)(((DWORD) (type) + D3DSTATE_OVERRIDE_BIAS))
typedef enum _D3DTRANSFORMSTATETYPE {
D3DTRANSFORMSTATE_WORLD = 1,
D3DTRANSFORMSTATE_VIEW = 2,
D3DTRANSFORMSTATE_PROJECTION = 3,
D3DTRANSFORMSTATE_WORLD1 = 4,
D3DTRANSFORMSTATE_WORLD2 = 5,
D3DTRANSFORMSTATE_WORLD3 = 6,
D3DTRANSFORMSTATE_TEXTURE0 = 16,
D3DTRANSFORMSTATE_TEXTURE1 = 17,
D3DTRANSFORMSTATE_TEXTURE2 = 18,
D3DTRANSFORMSTATE_TEXTURE3 = 19,
D3DTRANSFORMSTATE_TEXTURE4 = 20,
D3DTRANSFORMSTATE_TEXTURE5 = 21,
D3DTRANSFORMSTATE_TEXTURE6 = 22,
D3DTRANSFORMSTATE_TEXTURE7 = 23,
D3DTRANSFORMSTATE_FORCE_DWORD = 0x7fffffff
} D3DTRANSFORMSTATETYPE;
typedef enum {
D3DLIGHTSTATE_MATERIAL = 1,
D3DLIGHTSTATE_AMBIENT = 2,
D3DLIGHTSTATE_COLORMODEL = 3,
D3DLIGHTSTATE_FOGMODE = 4,
D3DLIGHTSTATE_FOGSTART = 5,
D3DLIGHTSTATE_FOGEND = 6,
D3DLIGHTSTATE_FOGDENSITY = 7,
D3DLIGHTSTATE_COLORVERTEX = 8,
D3DLIGHTSTATE_FORCE_DWORD = 0x7fffffff
} D3DLIGHTSTATETYPE;
typedef enum {
D3DRENDERSTATE_TEXTUREHANDLE = 1,
D3DRENDERSTATE_ANTIALIAS = 2,
D3DRENDERSTATE_TEXTUREADDRESS = 3,
D3DRENDERSTATE_TEXTUREPERSPECTIVE = 4,
D3DRENDERSTATE_WRAPU = 5,
D3DRENDERSTATE_WRAPV = 6,
D3DRENDERSTATE_ZENABLE = 7,
D3DRENDERSTATE_FILLMODE = 8,
D3DRENDERSTATE_SHADEMODE = 9,
D3DRENDERSTATE_LINEPATTERN = 10,
D3DRENDERSTATE_MONOENABLE = 11,
D3DRENDERSTATE_ROP2 = 12,
D3DRENDERSTATE_PLANEMASK = 13,
D3DRENDERSTATE_ZWRITEENABLE = 14,
D3DRENDERSTATE_ALPHATESTENABLE = 15,
D3DRENDERSTATE_LASTPIXEL = 16,
D3DRENDERSTATE_TEXTUREMAG = 17,
D3DRENDERSTATE_TEXTUREMIN = 18,
D3DRENDERSTATE_SRCBLEND = 19,
D3DRENDERSTATE_DESTBLEND = 20,
D3DRENDERSTATE_TEXTUREMAPBLEND = 21,
D3DRENDERSTATE_CULLMODE = 22,
D3DRENDERSTATE_ZFUNC = 23,
D3DRENDERSTATE_ALPHAREF = 24,
D3DRENDERSTATE_ALPHAFUNC = 25,
D3DRENDERSTATE_DITHERENABLE = 26,
D3DRENDERSTATE_ALPHABLENDENABLE = 27,
D3DRENDERSTATE_FOGENABLE = 28,
D3DRENDERSTATE_SPECULARENABLE = 29,
D3DRENDERSTATE_ZVISIBLE = 30,
D3DRENDERSTATE_SUBPIXEL = 31,
D3DRENDERSTATE_SUBPIXELX = 32,
D3DRENDERSTATE_STIPPLEDALPHA = 33,
D3DRENDERSTATE_FOGCOLOR = 34,
D3DRENDERSTATE_FOGTABLEMODE = 35,
D3DRENDERSTATE_FOGTABLESTART = 36,
D3DRENDERSTATE_FOGTABLEEND = 37,
D3DRENDERSTATE_FOGTABLEDENSITY = 38,
D3DRENDERSTATE_STIPPLEENABLE = 39,
D3DRENDERSTATE_EDGEANTIALIAS = 40,
D3DRENDERSTATE_COLORKEYENABLE = 41,
D3DRENDERSTATE_BORDERCOLOR = 43,
D3DRENDERSTATE_TEXTUREADDRESSU = 44,
D3DRENDERSTATE_TEXTUREADDRESSV = 45,
D3DRENDERSTATE_MIPMAPLODBIAS = 46,
D3DRENDERSTATE_ZBIAS = 47,
D3DRENDERSTATE_RANGEFOGENABLE = 48,
D3DRENDERSTATE_ANISOTROPY = 49,
D3DRENDERSTATE_FLUSHBATCH = 50,
D3DRENDERSTATE_STENCILENABLE = 52,
D3DRENDERSTATE_STENCILFAIL = 53,
D3DRENDERSTATE_STENCILZFAIL = 54,
D3DRENDERSTATE_STENCILPASS = 55,
D3DRENDERSTATE_STENCILFUNC = 56,
D3DRENDERSTATE_STENCILREF = 57,
D3DRENDERSTATE_STENCILMASK = 58,
D3DRENDERSTATE_STENCILWRITEMASK = 59,
D3DRENDERSTATE_TEXTUREFACTOR = 60,
D3DRENDERSTATE_STIPPLEPATTERN00 = 64,
D3DRENDERSTATE_STIPPLEPATTERN01 = 65,
D3DRENDERSTATE_STIPPLEPATTERN02 = 66,
D3DRENDERSTATE_STIPPLEPATTERN03 = 67,
D3DRENDERSTATE_STIPPLEPATTERN04 = 68,
D3DRENDERSTATE_STIPPLEPATTERN05 = 69,
D3DRENDERSTATE_STIPPLEPATTERN06 = 70,
D3DRENDERSTATE_STIPPLEPATTERN07 = 71,
D3DRENDERSTATE_STIPPLEPATTERN08 = 72,
D3DRENDERSTATE_STIPPLEPATTERN09 = 73,
D3DRENDERSTATE_STIPPLEPATTERN10 = 74,
D3DRENDERSTATE_STIPPLEPATTERN11 = 75,
D3DRENDERSTATE_STIPPLEPATTERN12 = 76,
D3DRENDERSTATE_STIPPLEPATTERN13 = 77,
D3DRENDERSTATE_STIPPLEPATTERN14 = 78,
D3DRENDERSTATE_STIPPLEPATTERN15 = 79,
D3DRENDERSTATE_STIPPLEPATTERN16 = 80,
D3DRENDERSTATE_STIPPLEPATTERN17 = 81,
D3DRENDERSTATE_STIPPLEPATTERN18 = 82,
D3DRENDERSTATE_STIPPLEPATTERN19 = 83,
D3DRENDERSTATE_STIPPLEPATTERN20 = 84,
D3DRENDERSTATE_STIPPLEPATTERN21 = 85,
D3DRENDERSTATE_STIPPLEPATTERN22 = 86,
D3DRENDERSTATE_STIPPLEPATTERN23 = 87,
D3DRENDERSTATE_STIPPLEPATTERN24 = 88,
D3DRENDERSTATE_STIPPLEPATTERN25 = 89,
D3DRENDERSTATE_STIPPLEPATTERN26 = 90,
D3DRENDERSTATE_STIPPLEPATTERN27 = 91,
D3DRENDERSTATE_STIPPLEPATTERN28 = 92,
D3DRENDERSTATE_STIPPLEPATTERN29 = 93,
D3DRENDERSTATE_STIPPLEPATTERN30 = 94,
D3DRENDERSTATE_STIPPLEPATTERN31 = 95,
D3DRENDERSTATE_WRAP0 = 128,
D3DRENDERSTATE_WRAP1 = 129,
D3DRENDERSTATE_WRAP2 = 130,
D3DRENDERSTATE_WRAP3 = 131,
D3DRENDERSTATE_WRAP4 = 132,
D3DRENDERSTATE_WRAP5 = 133,
D3DRENDERSTATE_WRAP6 = 134,
D3DRENDERSTATE_WRAP7 = 135,
D3DRENDERSTATE_CLIPPING = 136,
D3DRENDERSTATE_LIGHTING = 137,
D3DRENDERSTATE_EXTENTS = 138,
D3DRENDERSTATE_AMBIENT = 139,
D3DRENDERSTATE_FOGVERTEXMODE = 140,
D3DRENDERSTATE_COLORVERTEX = 141,
D3DRENDERSTATE_LOCALVIEWER = 142,
D3DRENDERSTATE_NORMALIZENORMALS = 143,
D3DRENDERSTATE_COLORKEYBLENDENABLE = 144,
D3DRENDERSTATE_DIFFUSEMATERIALSOURCE = 145,
D3DRENDERSTATE_SPECULARMATERIALSOURCE = 146,
D3DRENDERSTATE_AMBIENTMATERIALSOURCE = 147,
D3DRENDERSTATE_EMISSIVEMATERIALSOURCE = 148,
D3DRENDERSTATE_VERTEXBLEND = 151,
D3DRENDERSTATE_CLIPPLANEENABLE = 152,
D3DRENDERSTATE_FORCE_DWORD = 0x7fffffff
/* FIXME: We have some retired values that are being reused for DirectX 7 */
} D3DRENDERSTATETYPE;
typedef enum _D3DMATERIALCOLORSOURCE
{
D3DMCS_MATERIAL = 0,
D3DMCS_COLOR1 = 1,
D3DMCS_COLOR2 = 2,
D3DMCS_FORCE_DWORD = 0x7fffffff
} D3DMATERIALCOLORSOURCE;
#define D3DRENDERSTATE_BLENDENABLE D3DRENDERSTATE_ALPHABLENDENABLE
#define D3DRENDERSTATE_WRAPBIAS 128UL
#define D3DWRAP_U 0x00000001L
#define D3DWRAP_V 0x00000002L
#define D3DWRAPCOORD_0 0x00000001L
#define D3DWRAPCOORD_1 0x00000002L
#define D3DWRAPCOORD_2 0x00000004L
#define D3DWRAPCOORD_3 0x00000008L
#define D3DRENDERSTATE_STIPPLEPATTERN(y) (D3DRENDERSTATE_STIPPLEPATTERN00 + (y))
typedef struct _D3DSTATE {
union {
D3DTRANSFORMSTATETYPE dtstTransformStateType;
D3DLIGHTSTATETYPE dlstLightStateType;
D3DRENDERSTATETYPE drstRenderStateType;
} t;
union {
DWORD dwArg[1];
D3DVALUE dvArg[1];
} v;
} D3DSTATE, *LPD3DSTATE;
typedef struct _D3DMATRIXLOAD {
D3DMATRIXHANDLE hDestMatrix;
D3DMATRIXHANDLE hSrcMatrix;
} D3DMATRIXLOAD, *LPD3DMATRIXLOAD;
typedef struct _D3DMATRIXMULTIPLY {
D3DMATRIXHANDLE hDestMatrix;
D3DMATRIXHANDLE hSrcMatrix1;
D3DMATRIXHANDLE hSrcMatrix2;
} D3DMATRIXMULTIPLY, *LPD3DMATRIXMULTIPLY;
typedef struct _D3DPROCESSVERTICES {
DWORD dwFlags;
WORD wStart;
WORD wDest;
DWORD dwCount;
DWORD dwReserved;
} D3DPROCESSVERTICES, *LPD3DPROCESSVERTICES;
#define D3DPROCESSVERTICES_TRANSFORMLIGHT 0x00000000L
#define D3DPROCESSVERTICES_TRANSFORM 0x00000001L
#define D3DPROCESSVERTICES_COPY 0x00000002L
#define D3DPROCESSVERTICES_OPMASK 0x00000007L
#define D3DPROCESSVERTICES_UPDATEEXTENTS 0x00000008L
#define D3DPROCESSVERTICES_NOCOLOR 0x00000010L
typedef enum _D3DTEXTURESTAGESTATETYPE
{
D3DTSS_COLOROP = 1,
D3DTSS_COLORARG1 = 2,
D3DTSS_COLORARG2 = 3,
D3DTSS_ALPHAOP = 4,
D3DTSS_ALPHAARG1 = 5,
D3DTSS_ALPHAARG2 = 6,
D3DTSS_BUMPENVMAT00 = 7,
D3DTSS_BUMPENVMAT01 = 8,
D3DTSS_BUMPENVMAT10 = 9,
D3DTSS_BUMPENVMAT11 = 10,
D3DTSS_TEXCOORDINDEX = 11,
D3DTSS_ADDRESS = 12,
D3DTSS_ADDRESSU = 13,
D3DTSS_ADDRESSV = 14,
D3DTSS_BORDERCOLOR = 15,
D3DTSS_MAGFILTER = 16,
D3DTSS_MINFILTER = 17,
D3DTSS_MIPFILTER = 18,
D3DTSS_MIPMAPLODBIAS = 19,
D3DTSS_MAXMIPLEVEL = 20,
D3DTSS_MAXANISOTROPY = 21,
D3DTSS_BUMPENVLSCALE = 22,
D3DTSS_BUMPENVLOFFSET = 23,
D3DTSS_TEXTURETRANSFORMFLAGS = 24,
D3DTSS_FORCE_DWORD = 0x7fffffff
} D3DTEXTURESTAGESTATETYPE;
#define D3DTSS_TCI_PASSTHRU 0x00000000
#define D3DTSS_TCI_CAMERASPACENORMAL 0x00010000
#define D3DTSS_TCI_CAMERASPACEPOSITION 0x00020000
#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x00030000
typedef enum _D3DTEXTUREOP
{
D3DTOP_DISABLE = 1,
D3DTOP_SELECTARG1 = 2,
D3DTOP_SELECTARG2 = 3,
D3DTOP_MODULATE = 4,
D3DTOP_MODULATE2X = 5,
D3DTOP_MODULATE4X = 6,
D3DTOP_ADD = 7,
D3DTOP_ADDSIGNED = 8,
D3DTOP_ADDSIGNED2X = 9,
D3DTOP_SUBTRACT = 10,
D3DTOP_ADDSMOOTH = 11,
D3DTOP_BLENDDIFFUSEALPHA = 12,
D3DTOP_BLENDTEXTUREALPHA = 13,
D3DTOP_BLENDFACTORALPHA = 14,
D3DTOP_BLENDTEXTUREALPHAPM = 15,
D3DTOP_BLENDCURRENTALPHA = 16,
D3DTOP_PREMODULATE = 17,
D3DTOP_MODULATEALPHA_ADDCOLOR = 18,
D3DTOP_MODULATECOLOR_ADDALPHA = 19,
D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20,
D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21,
D3DTOP_BUMPENVMAP = 22,
D3DTOP_BUMPENVMAPLUMINANCE = 23,
D3DTOP_DOTPRODUCT3 = 24,
D3DTOP_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREOP;
#define D3DTA_SELECTMASK 0x0000000f
#define D3DTA_DIFFUSE 0x00000000
#define D3DTA_CURRENT 0x00000001
#define D3DTA_TEXTURE 0x00000002
#define D3DTA_TFACTOR 0x00000003
#define D3DTA_SPECULAR 0x00000004
#define D3DTA_COMPLEMENT 0x00000010
#define D3DTA_ALPHAREPLICATE 0x00000020
typedef enum _D3DTEXTUREMAGFILTER
{
D3DTFG_POINT = 1,
D3DTFG_LINEAR = 2,
D3DTFG_FLATCUBIC = 3,
D3DTFG_GAUSSIANCUBIC = 4,
D3DTFG_ANISOTROPIC = 5,
D3DTFG_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREMAGFILTER;
typedef enum _D3DTEXTUREMINFILTER
{
D3DTFN_POINT = 1,
D3DTFN_LINEAR = 2,
D3DTFN_ANISOTROPIC = 3,
D3DTFN_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREMINFILTER;
typedef enum _D3DTEXTUREMIPFILTER
{
D3DTFP_NONE = 1,
D3DTFP_POINT = 2,
D3DTFP_LINEAR = 3,
D3DTFP_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREMIPFILTER;
#define D3DTRIFLAG_START 0x00000000L
#define D3DTRIFLAG_STARTFLAT(len) (len)
#define D3DTRIFLAG_ODD 0x0000001eL
#define D3DTRIFLAG_EVEN 0x0000001fL
#define D3DTRIFLAG_EDGEENABLE1 0x00000100L
#define D3DTRIFLAG_EDGEENABLE2 0x00000200L
#define D3DTRIFLAG_EDGEENABLE3 0x00000400L
#define D3DTRIFLAG_EDGEENABLETRIANGLE \
(D3DTRIFLAG_EDGEENABLE1 | D3DTRIFLAG_EDGEENABLE2 | D3DTRIFLAG_EDGEENABLE3)
typedef struct _D3DTRIANGLE {
union {
WORD v1;
WORD wV1;
} v1;
union {
WORD v2;
WORD wV2;
} v2;
union {
WORD v3;
WORD wV3;
} v3;
WORD wFlags;
} D3DTRIANGLE, *LPD3DTRIANGLE;
typedef struct _D3DLINE {
union {
WORD v1;
WORD wV1;
} v1;
union {
WORD v2;
WORD wV2;
} v2;
} D3DLINE, *LPD3DLINE;
typedef struct _D3DSPAN {
WORD wCount;
WORD wFirst;
} D3DSPAN, *LPD3DSPAN;
typedef struct _D3DPOINT {
WORD wCount;
WORD wFirst;
} D3DPOINT, *LPD3DPOINT;
typedef struct _D3DBRANCH {
DWORD dwMask;
DWORD dwValue;
BOOL bNegate;
DWORD dwOffset;
} D3DBRANCH, *LPD3DBRANCH;
typedef struct _D3DSTATUS {
DWORD dwFlags;
DWORD dwStatus;
D3DRECT drExtent;
} D3DSTATUS, *LPD3DSTATUS;
#define D3DSETSTATUS_STATUS 0x00000001L
#define D3DSETSTATUS_EXTENTS 0x00000002L
#define D3DSETSTATUS_ALL (D3DSETSTATUS_STATUS | D3DSETSTATUS_EXTENTS)
typedef struct _D3DCLIPSTATUS {
DWORD dwFlags;
DWORD dwStatus;
float minx, maxx;
float miny, maxy;
float minz, maxz;
} D3DCLIPSTATUS, *LPD3DCLIPSTATUS;
#define D3DCLIPSTATUS_STATUS 0x00000001L
#define D3DCLIPSTATUS_EXTENTS2 0x00000002L
#define D3DCLIPSTATUS_EXTENTS3 0x00000004L
typedef struct {
DWORD dwSize;
DWORD dwTrianglesDrawn;
DWORD dwLinesDrawn;
DWORD dwPointsDrawn;
DWORD dwSpansDrawn;
DWORD dwVerticesProcessed;
} D3DSTATS, *LPD3DSTATS;
#define D3DEXECUTE_CLIPPED 0x00000001l
#define D3DEXECUTE_UNCLIPPED 0x00000002l
typedef struct _D3DEXECUTEDATA {
DWORD dwSize;
DWORD dwVertexOffset;
DWORD dwVertexCount;
DWORD dwInstructionOffset;
DWORD dwInstructionLength;
DWORD dwHVertexOffset;
D3DSTATUS dsStatus;
} D3DEXECUTEDATA, *LPD3DEXECUTEDATA;
#define D3DPAL_FREE 0x00
#define D3DPAL_READONLY 0x40
#define D3DPAL_RESERVED 0x80
typedef struct _D3DVERTEXBUFFERDESC {
DWORD dwSize;
DWORD dwCaps;
DWORD dwFVF;
DWORD dwNumVertices;
} D3DVERTEXBUFFERDESC, *LPD3DVERTEXBUFFERDESC;
#define D3DVBCAPS_SYSTEMMEMORY 0x00000800l
#define D3DVBCAPS_WRITEONLY 0x00010000l
#define D3DVBCAPS_OPTIMIZED 0x80000000l
#define D3DVBCAPS_DONOTCLIP 0x00000001l
#define D3DVOP_LIGHT (1 << 10)
#define D3DVOP_TRANSFORM (1 << 0)
#define D3DVOP_CLIP (1 << 2)
#define D3DVOP_EXTENTS (1 << 3)
#define D3DMAXNUMVERTICES ((1<<16) - 1)
#define D3DMAXNUMPRIMITIVES ((1<<16) - 1)
#define D3DPV_DONOTCOPYDATA (1 << 0)
#define D3DFVF_RESERVED0 0x001
#define D3DFVF_POSITION_MASK 0x00E
#define D3DFVF_XYZ 0x002
#define D3DFVF_XYZRHW 0x004
#define D3DFVF_XYZB1 0x006
#define D3DFVF_XYZB2 0x008
#define D3DFVF_XYZB3 0x00a
#define D3DFVF_XYZB4 0x00c
#define D3DFVF_XYZB5 0x00e
#define D3DFVF_NORMAL 0x010
#define D3DFVF_RESERVED1 0x020
#define D3DFVF_DIFFUSE 0x040
#define D3DFVF_SPECULAR 0x080
#define D3DFVF_TEXCOUNT_MASK 0xf00
#define D3DFVF_TEXCOUNT_SHIFT 8
#define D3DFVF_TEX0 0x000
#define D3DFVF_TEX1 0x100
#define D3DFVF_TEX2 0x200
#define D3DFVF_TEX3 0x300
#define D3DFVF_TEX4 0x400
#define D3DFVF_TEX5 0x500
#define D3DFVF_TEX6 0x600
#define D3DFVF_TEX7 0x700
#define D3DFVF_TEX8 0x800
#define D3DFVF_RESERVED2 0xf000
#define D3DFVF_VERTEX ( D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1 )
#define D3DFVF_LVERTEX ( D3DFVF_XYZ | D3DFVF_RESERVED1 | D3DFVF_DIFFUSE | \
D3DFVF_SPECULAR | D3DFVF_TEX1 )
#define D3DFVF_TLVERTEX ( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | \
D3DFVF_TEX1 )
typedef struct _D3DDP_PTRSTRIDE {
LPVOID lpvData;
DWORD dwStride;
} D3DDP_PTRSTRIDE;
#define D3DDP_MAXTEXCOORD 8
typedef struct _D3DDRAWPRIMITIVESTRIDEDDATA {
D3DDP_PTRSTRIDE position;
D3DDP_PTRSTRIDE normal;
D3DDP_PTRSTRIDE diffuse;
D3DDP_PTRSTRIDE specular;
D3DDP_PTRSTRIDE textureCoords[D3DDP_MAXTEXCOORD];
} D3DDRAWPRIMITIVESTRIDEDDATA ,*LPD3DDRAWPRIMITIVESTRIDEDDATA;
#define D3DVIS_INSIDE_FRUSTUM 0
#define D3DVIS_INTERSECT_FRUSTUM 1
#define D3DVIS_OUTSIDE_FRUSTUM 2
#define D3DVIS_INSIDE_LEFT 0
#define D3DVIS_INTERSECT_LEFT (1 << 2)
#define D3DVIS_OUTSIDE_LEFT (2 << 2)
#define D3DVIS_INSIDE_RIGHT 0
#define D3DVIS_INTERSECT_RIGHT (1 << 4)
#define D3DVIS_OUTSIDE_RIGHT (2 << 4)
#define D3DVIS_INSIDE_TOP 0
#define D3DVIS_INTERSECT_TOP (1 << 6)
#define D3DVIS_OUTSIDE_TOP (2 << 6)
#define D3DVIS_INSIDE_BOTTOM 0
#define D3DVIS_INTERSECT_BOTTOM (1 << 8)
#define D3DVIS_OUTSIDE_BOTTOM (2 << 8)
#define D3DVIS_INSIDE_NEAR 0
#define D3DVIS_INTERSECT_NEAR (1 << 10)
#define D3DVIS_OUTSIDE_NEAR (2 << 10)
#define D3DVIS_INSIDE_FAR 0
#define D3DVIS_INTERSECT_FAR (1 << 12)
#define D3DVIS_OUTSIDE_FAR (2 << 12)
#define D3DVIS_MASK_FRUSTUM (3 << 0)
#define D3DVIS_MASK_LEFT (3 << 2)
#define D3DVIS_MASK_RIGHT (3 << 4)
#define D3DVIS_MASK_TOP (3 << 6)
#define D3DVIS_MASK_BOTTOM (3 << 8)
#define D3DVIS_MASK_NEAR (3 << 10)
#define D3DVIS_MASK_FAR (3 << 12)
#define D3DDEVINFOID_TEXTUREMANAGER 1
#define D3DDEVINFOID_D3DTEXTUREMANAGER 2
#define D3DDEVINFOID_TEXTURING 3
typedef enum _D3DSTATEBLOCKTYPE
{
D3DSBT_ALL = 1,
D3DSBT_PIXELSTATE = 2,
D3DSBT_VERTEXSTATE = 3,
D3DSBT_FORCE_DWORD = 0xffffffff
} D3DSTATEBLOCKTYPE;
typedef enum _D3DVERTEXBLENDFLAGS
{
D3DVBLEND_DISABLE = 0,
D3DVBLEND_1WEIGHT = 1,
D3DVBLEND_2WEIGHTS = 2,
D3DVBLEND_3WEIGHTS = 3,
} D3DVERTEXBLENDFLAGS;
typedef enum _D3DTEXTURETRANSFORMFLAGS {
D3DTTFF_DISABLE = 0,
D3DTTFF_COUNT1 = 1,
D3DTTFF_COUNT2 = 2,
D3DTTFF_COUNT3 = 3,
D3DTTFF_COUNT4 = 4,
D3DTTFF_PROJECTED = 256,
D3DTTFF_FORCE_DWORD = 0x7fffffff
} D3DTEXTURETRANSFORMFLAGS;
#define D3DFVF_TEXTUREFORMAT2 0
#define D3DFVF_TEXTUREFORMAT1 3
#define D3DFVF_TEXTUREFORMAT3 1
#define D3DFVF_TEXTUREFORMAT4 2
#define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16))
#define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2)
#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16))
#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16))
#endif
......@@ -3,7 +3,7 @@
#include "winbase.h" /* for CRITICAL_SECTION */
#include "mmsystem.h"
#include "d3d.h" /*FIXME: Need to break out d3dtypes.h */
#include "d3dtypes.h"
#ifdef __cplusplus
extern "C" {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment