ifndef _D3DCAPS_H
define _D3DCAPS_H

include ddraw.inc

ifndef DIRECT3D_VERSION
DIRECT3D_VERSION	equ 0x0700
endif

if defined(_X86_) OR defined(_IA64_)
.pragma pack(push, 4)
endif


D3DTRANSFORMCAPS	STRUC
dwSize			dd ?
dwCaps			dd ?
D3DTRANSFORMCAPS	ENDS
LPD3DTRANSFORMCAPS	typedef ptr D3DTRANSFORMCAPS

D3DTRANSFORMCAPS_CLIP	equ 0x00000001


D3DLIGHTINGCAPS		STRUC
dwSize			dd ?
dwCaps			dd ?
dwLightingModel		dd ?
dwNumLights		dd ?
D3DLIGHTINGCAPS		ENDS
LPD3DLIGHTINGCAPS	typedef ptr D3DLIGHTINGCAPS

D3DLIGHTINGMODEL_RGB	equ 0x00000001
D3DLIGHTINGMODEL_MONO	equ 0x00000002

D3DLIGHTCAPS_POINT	equ 0x00000001
D3DLIGHTCAPS_SPOT	equ 0x00000002
D3DLIGHTCAPS_DIRECTIONAL equ 0x00000004
if(DIRECT3D_VERSION LT 0x700)
D3DLIGHTCAPS_PARALLELPOINT equ 0x00000008
endif
if(DIRECT3D_VERSION LT 0x500)
D3DLIGHTCAPS_GLSPOT	equ 0x00000010
endif


D3DPRIMCAPS		STRUC
dwSize			dd ?
dwMiscCaps		dd ?
dwRasterCaps		dd ?
dwZCmpCaps		dd ?
dwSrcBlendCaps		dd ?
dwDestBlendCaps		dd ?
dwAlphaCmpCaps		dd ?
dwShadeCaps		dd ?
dwTextureCaps		dd ?
dwTextureFilterCaps	dd ?
dwTextureBlendCaps	dd ?
dwTextureAddressCaps	dd ?
dwStippleWidth		dd ?
dwStippleHeight		dd ?
D3DPRIMCAPS		ENDS
LPD3DPRIMCAPS		typedef ptr D3DPRIMCAPS


D3DPMISCCAPS_MASKPLANES equ 0x00000001
D3DPMISCCAPS_MASKZ	equ 0x00000002
D3DPMISCCAPS_LINEPATTERNREP equ 0x00000004
D3DPMISCCAPS_CONFORMANT equ 0x00000008
D3DPMISCCAPS_CULLNONE	equ 0x00000010
D3DPMISCCAPS_CULLCW	equ 0x00000020
D3DPMISCCAPS_CULLCCW	equ 0x00000040


D3DPRASTERCAPS_DITHER	equ 0x00000001
D3DPRASTERCAPS_ROP2	equ 0x00000002
D3DPRASTERCAPS_XOR	equ 0x00000004
D3DPRASTERCAPS_PAT	equ 0x00000008
D3DPRASTERCAPS_ZTEST	equ 0x00000010
D3DPRASTERCAPS_SUBPIXEL equ 0x00000020
D3DPRASTERCAPS_SUBPIXELX equ 0x00000040
D3DPRASTERCAPS_FOGVERTEX equ 0x00000080
D3DPRASTERCAPS_FOGTABLE equ 0x00000100
D3DPRASTERCAPS_STIPPLE	equ 0x00000200
if(DIRECT3D_VERSION GE 0x0500)
D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT equ 0x00000400
D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT equ 0x00000800
D3DPRASTERCAPS_ANTIALIASEDGES equ 0x00001000
D3DPRASTERCAPS_MIPMAPLODBIAS equ 0x00002000
D3DPRASTERCAPS_ZBIAS	equ 0x00004000
D3DPRASTERCAPS_ZBUFFERLESSHSR equ 0x00008000
D3DPRASTERCAPS_FOGRANGE equ 0x00010000
D3DPRASTERCAPS_ANISOTROPY equ 0x00020000
endif
if(DIRECT3D_VERSION GE 0x0600)
D3DPRASTERCAPS_WBUFFER	equ 0x00040000
D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT equ 0x00080000
D3DPRASTERCAPS_WFOG	equ 0x00100000
D3DPRASTERCAPS_ZFOG	equ 0x00200000
endif


D3DPCMPCAPS_NEVER	equ 0x00000001
D3DPCMPCAPS_LESS	equ 0x00000002
D3DPCMPCAPS_EQUAL	equ 0x00000004
D3DPCMPCAPS_LESSEQUAL	equ 0x00000008
D3DPCMPCAPS_GREATER	equ 0x00000010
D3DPCMPCAPS_NOTEQUAL	equ 0x00000020
D3DPCMPCAPS_GREATEREQUAL equ 0x00000040
D3DPCMPCAPS_ALWAYS	equ 0x00000080


D3DPBLENDCAPS_ZERO	equ 0x00000001
D3DPBLENDCAPS_ONE	equ 0x00000002
D3DPBLENDCAPS_SRCCOLOR	equ 0x00000004
D3DPBLENDCAPS_INVSRCCOLOR equ 0x00000008
D3DPBLENDCAPS_SRCALPHA	equ 0x00000010
D3DPBLENDCAPS_INVSRCALPHA equ 0x00000020
D3DPBLENDCAPS_DESTALPHA equ 0x00000040
D3DPBLENDCAPS_INVDESTALPHA equ 0x00000080
D3DPBLENDCAPS_DESTCOLOR equ 0x00000100
D3DPBLENDCAPS_INVDESTCOLOR equ 0x00000200
D3DPBLENDCAPS_SRCALPHASAT equ 0x00000400
D3DPBLENDCAPS_BOTHSRCALPHA equ 0x00000800
D3DPBLENDCAPS_BOTHINVSRCALPHA equ 0x00001000


D3DPSHADECAPS_COLORFLATMONO equ 0x00000001
D3DPSHADECAPS_COLORFLATRGB equ 0x00000002
D3DPSHADECAPS_COLORGOURAUDMONO equ 0x00000004
D3DPSHADECAPS_COLORGOURAUDRGB equ 0x00000008
D3DPSHADECAPS_COLORPHONGMONO equ 0x00000010
D3DPSHADECAPS_COLORPHONGRGB equ 0x00000020

D3DPSHADECAPS_SPECULARFLATMONO equ 0x00000040
D3DPSHADECAPS_SPECULARFLATRGB equ 0x00000080
D3DPSHADECAPS_SPECULARGOURAUDMONO equ 0x00000100
D3DPSHADECAPS_SPECULARGOURAUDRGB equ 0x00000200
D3DPSHADECAPS_SPECULARPHONGMONO equ 0x00000400
D3DPSHADECAPS_SPECULARPHONGRGB equ 0x00000800

D3DPSHADECAPS_ALPHAFLATBLEND equ 0x00001000
D3DPSHADECAPS_ALPHAFLATSTIPPLED equ 0x00002000
D3DPSHADECAPS_ALPHAGOURAUDBLEND equ 0x00004000
D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED equ 0x00008000
D3DPSHADECAPS_ALPHAPHONGBLEND equ 0x00010000
D3DPSHADECAPS_ALPHAPHONGSTIPPLED equ 0x00020000

D3DPSHADECAPS_FOGFLAT	equ 0x00040000
D3DPSHADECAPS_FOGGOURAUD equ 0x00080000
D3DPSHADECAPS_FOGPHONG	equ 0x00100000

D3DPTEXTURECAPS_PERSPECTIVE equ 0x00000001
D3DPTEXTURECAPS_POW2	equ 0x00000002
D3DPTEXTURECAPS_ALPHA	equ 0x00000004
D3DPTEXTURECAPS_TRANSPARENCY equ 0x00000008
D3DPTEXTURECAPS_BORDER	equ 0x00000010
D3DPTEXTURECAPS_SQUAREONLY equ 0x00000020

if(DIRECT3D_VERSION GE 0x0600)
D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE equ 0x00000040
D3DPTEXTURECAPS_ALPHAPALETTE equ 0x00000080
D3DPTEXTURECAPS_NONPOW2CONDITIONAL equ 0x00000100
endif

if(DIRECT3D_VERSION GE 0x0700)
D3DPTEXTURECAPS_PROJECTED equ 0x00000400
D3DPTEXTURECAPS_CUBEMAP equ 0x00000800
D3DPTEXTURECAPS_COLORKEYBLEND equ 0x00001000
endif

D3DPTFILTERCAPS_NEAREST equ 0x00000001
D3DPTFILTERCAPS_LINEAR	equ 0x00000002
D3DPTFILTERCAPS_MIPNEAREST equ 0x00000004
D3DPTFILTERCAPS_MIPLINEAR equ 0x00000008
D3DPTFILTERCAPS_LINEARMIPNEAREST equ 0x00000010
D3DPTFILTERCAPS_LINEARMIPLINEAR equ 0x00000020

if(DIRECT3D_VERSION GE 0x0600)
D3DPTFILTERCAPS_MINFPOINT equ 0x00000100
D3DPTFILTERCAPS_MINFLINEAR equ 0x00000200
D3DPTFILTERCAPS_MINFANISOTROPIC equ 0x00000400

D3DPTFILTERCAPS_MIPFPOINT equ 0x00010000
D3DPTFILTERCAPS_MIPFLINEAR equ 0x00020000

D3DPTFILTERCAPS_MAGFPOINT equ 0x01000000
D3DPTFILTERCAPS_MAGFLINEAR equ 0x02000000
D3DPTFILTERCAPS_MAGFANISOTROPIC equ 0x04000000
D3DPTFILTERCAPS_MAGFAFLATCUBIC equ 0x08000000
D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC equ 0x10000000
endif


D3DPTBLENDCAPS_DECAL	equ 0x00000001
D3DPTBLENDCAPS_MODULATE equ 0x00000002
D3DPTBLENDCAPS_DECALALPHA equ 0x00000004
D3DPTBLENDCAPS_MODULATEALPHA equ 0x00000008
D3DPTBLENDCAPS_DECALMASK equ 0x00000010
D3DPTBLENDCAPS_MODULATEMASK equ 0x00000020
D3DPTBLENDCAPS_COPY	equ 0x00000040
if(DIRECT3D_VERSION GE 0x0500)
D3DPTBLENDCAPS_ADD	equ 0x00000080
endif

D3DPTADDRESSCAPS_WRAP	equ 0x00000001
D3DPTADDRESSCAPS_MIRROR equ 0x00000002
D3DPTADDRESSCAPS_CLAMP	equ 0x00000004
if(DIRECT3D_VERSION GE 0x0500)
D3DPTADDRESSCAPS_BORDER equ 0x00000008
D3DPTADDRESSCAPS_INDEPENDENTUV equ 0x00000010
endif

if(DIRECT3D_VERSION GE 0x0600)


D3DSTENCILCAPS_KEEP	equ 0x00000001
D3DSTENCILCAPS_ZERO	equ 0x00000002
D3DSTENCILCAPS_REPLACE	equ 0x00000004
D3DSTENCILCAPS_INCRSAT	equ 0x00000008
D3DSTENCILCAPS_DECRSAT	equ 0x00000010
D3DSTENCILCAPS_INVERT	equ 0x00000020
D3DSTENCILCAPS_INCR	equ 0x00000040
D3DSTENCILCAPS_DECR	equ 0x00000080


D3DTEXOPCAPS_DISABLE	equ 0x00000001
D3DTEXOPCAPS_SELECTARG1 equ 0x00000002
D3DTEXOPCAPS_SELECTARG2 equ 0x00000004
D3DTEXOPCAPS_MODULATE	equ 0x00000008
D3DTEXOPCAPS_MODULATE2X equ 0x00000010
D3DTEXOPCAPS_MODULATE4X equ 0x00000020
D3DTEXOPCAPS_ADD	equ 0x00000040
D3DTEXOPCAPS_ADDSIGNED	equ 0x00000080
D3DTEXOPCAPS_ADDSIGNED2X equ 0x00000100
D3DTEXOPCAPS_SUBTRACT	equ 0x00000200
D3DTEXOPCAPS_ADDSMOOTH	equ 0x00000400
D3DTEXOPCAPS_BLENDDIFFUSEALPHA equ 0x00000800
D3DTEXOPCAPS_BLENDTEXTUREALPHA equ 0x00001000
D3DTEXOPCAPS_BLENDFACTORALPHA equ 0x00002000
D3DTEXOPCAPS_BLENDTEXTUREALPHAPM equ 0x00004000
D3DTEXOPCAPS_BLENDCURRENTALPHA equ 0x00008000
D3DTEXOPCAPS_PREMODULATE equ 0x00010000
D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR equ 0x00020000
D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA equ 0x00040000
D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR equ 0x00080000
D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA equ 0x00100000
D3DTEXOPCAPS_BUMPENVMAP equ 0x00200000
D3DTEXOPCAPS_BUMPENVMAPLUMINANCE equ 0x00400000
D3DTEXOPCAPS_DOTPRODUCT3 equ 0x00800000


D3DFVFCAPS_TEXCOORDCOUNTMASK equ 0x0000ffff
D3DFVFCAPS_DONOTSTRIPELEMENTS equ 0x00080000

endif

D3DDEVICEDESC		STRUC
dwSize			dd ?
dwFlags			dd ?
dcmColorModel		D3DCOLORMODEL ?
dwDevCaps		dd ?
dtcTransformCaps	D3DTRANSFORMCAPS <>
bClipping		BOOL ?
dlcLightingCaps		D3DLIGHTINGCAPS <>
dpcLineCaps		D3DPRIMCAPS <>
dpcTriCaps		D3DPRIMCAPS <>
dwDeviceRenderBitDepth	dd ?
dwDeviceZBufferBitDepth dd ?
dwMaxBufferSize		dd ?
dwMaxVertexCount	dd ?
if(DIRECT3D_VERSION GE 0x0500)
dwMinTextureWidth	dd ?
dwMinTextureHeight	dd ?
dwMaxTextureWidth	dd ?
dwMaxTextureHeight	dd ?
dwMinStippleWidth	dd ?
dwMaxStippleWidth	dd ?
dwMinStippleHeight	dd ?
dwMaxStippleHeight	dd ?
endif

if(DIRECT3D_VERSION GE 0x0600)
dwMaxTextureRepeat	dd ?
dwMaxTextureAspectRatio dd ?
dwMaxAnisotropy		dd ?

dvGuardBandLeft		D3DVALUE ?
dvGuardBandTop		D3DVALUE ?
dvGuardBandRight	D3DVALUE ?
dvGuardBandBottom	D3DVALUE ?

dvExtentsAdjust		D3DVALUE ?
dwStencilCaps		dd ?

dwFVFCaps		dd ?
dwTextureOpCaps		dd ?
wMaxTextureBlendStages	dw ?
wMaxSimultaneousTextures dw ?
endif
D3DDEVICEDESC		ENDS
LPD3DDEVICEDESC		typedef ptr D3DDEVICEDESC

if(DIRECT3D_VERSION GE 0x0700)
D3DDEVICEDESC7		STRUC
dwDevCaps		dd ?
dpcLineCaps		D3DPRIMCAPS <>
dpcTriCaps		D3DPRIMCAPS <>
dwDeviceRenderBitDepth	dd ?
dwDeviceZBufferBitDepth dd ?

dwMinTextureWidth	dd ?
dwMinTextureHeight	dd ?
dwMaxTextureWidth	dd ?
dwMaxTextureHeight	dd ?

dwMaxTextureRepeat	dd ?
dwMaxTextureAspectRatio dd ?
dwMaxAnisotropy		dd ?

dvGuardBandLeft		D3DVALUE ?
dvGuardBandTop		D3DVALUE ?
dvGuardBandRight	D3DVALUE ?
dvGuardBandBottom	D3DVALUE ?

dvExtentsAdjust		D3DVALUE ?
dwStencilCaps		dd ?

dwFVFCaps		dd ?
dwTextureOpCaps		dd ?
wMaxTextureBlendStages	dw ?
wMaxSimultaneousTextures dw ?

dwMaxActiveLights	dd ?
dvMaxVertexW		D3DVALUE ?
deviceGUID		GUID <>

wMaxUserClipPlanes	dw ?
wMaxVertexBlendMatrices dw ?

dwVertexProcessingCaps	dd ?

dwReserved1		dd ?
dwReserved2		dd ?
dwReserved3		dd ?
dwReserved4		dd ?
D3DDEVICEDESC7		ENDS
LPD3DDEVICEDESC7	typedef ptr D3DDEVICEDESC7
endif

D3DDEVICEDESCSIZE	equ (sizeof(D3DDEVICEDESC))
D3DDEVICEDESC7SIZE	equ (sizeof(D3DDEVICEDESC7))

CALLBACK(LPD3DENUMDEVICESCALLBACK, :ptr, :LPSTR, :LPSTR, :LPD3DDEVICEDESC, :LPD3DDEVICEDESC, :LPVOID)
if(DIRECT3D_VERSION GE 0x0700)
CALLBACK(LPD3DENUMDEVICESCALLBACK7, :LPSTR, :LPSTR, :LPD3DDEVICEDESC7, :LPVOID)
endif

D3DDD_COLORMODEL	equ 0x00000001
D3DDD_DEVCAPS		equ 0x00000002
D3DDD_TRANSFORMCAPS	equ 0x00000004
D3DDD_LIGHTINGCAPS	equ 0x00000008
D3DDD_BCLIPPING		equ 0x00000010
D3DDD_LINECAPS		equ 0x00000020
D3DDD_TRICAPS		equ 0x00000040
D3DDD_DEVICERENDERBITDEPTH equ 0x00000080
D3DDD_DEVICEZBUFFERBITDEPTH equ 0x00000100
D3DDD_MAXBUFFERSIZE	equ 0x00000200
D3DDD_MAXVERTEXCOUNT	equ 0x00000400


D3DDEVCAPS_FLOATTLVERTEX equ 0x00000001
D3DDEVCAPS_SORTINCREASINGZ equ 0x00000002
D3DDEVCAPS_SORTDECREASINGZ equ 0X00000004
D3DDEVCAPS_SORTEXACT	equ 0x00000008

D3DDEVCAPS_EXECUTESYSTEMMEMORY equ 0x00000010
D3DDEVCAPS_EXECUTEVIDEOMEMORY equ 0x00000020
D3DDEVCAPS_TLVERTEXSYSTEMMEMORY equ 0x00000040
D3DDEVCAPS_TLVERTEXVIDEOMEMORY equ 0x00000080
D3DDEVCAPS_TEXTURESYSTEMMEMORY equ 0x00000100
D3DDEVCAPS_TEXTUREVIDEOMEMORY equ 0x00000200
if(DIRECT3D_VERSION GE 0x0500)
D3DDEVCAPS_DRAWPRIMTLVERTEX equ 0x00000400
D3DDEVCAPS_CANRENDERAFTERFLIP equ 0x00000800
D3DDEVCAPS_TEXTURENONLOCALVIDMEM equ 0x00001000
endif
if(DIRECT3D_VERSION GE 0x0600)
D3DDEVCAPS_DRAWPRIMITIVES2 equ 0x00002000
D3DDEVCAPS_SEPARATETEXTUREMEMORIES equ 0x00004000
D3DDEVCAPS_DRAWPRIMITIVES2EX equ 0x00008000
endif
if(DIRECT3D_VERSION GE 0x0700)
D3DDEVCAPS_HWTRANSFORMANDLIGHT equ 0x00010000
D3DDEVCAPS_CANBLTSYSTONONLOCAL equ 0x00020000
D3DDEVCAPS_HWRASTERIZATION equ 0x00080000


D3DVTXPCAPS_TEXGEN	equ 0x00000001
D3DVTXPCAPS_MATERIALSOURCE7 equ 0x00000002
D3DVTXPCAPS_VERTEXFOG	equ 0x00000004
D3DVTXPCAPS_DIRECTIONALLIGHTS equ 0x00000008
D3DVTXPCAPS_POSITIONALLIGHTS equ 0x00000010
D3DVTXPCAPS_LOCALVIEWER equ 0x00000020

endif

D3DFDS_COLORMODEL	equ 0x00000001
D3DFDS_GUID		equ 0x00000002
D3DFDS_HARDWARE		equ 0x00000004
D3DFDS_TRIANGLES	equ 0x00000008
D3DFDS_LINES		equ 0x00000010
D3DFDS_MISCCAPS		equ 0x00000020
D3DFDS_RASTERCAPS	equ 0x00000040
D3DFDS_ZCMPCAPS		equ 0x00000080
D3DFDS_ALPHACMPCAPS	equ 0x00000100
D3DFDS_SRCBLENDCAPS	equ 0x00000200
D3DFDS_DSTBLENDCAPS	equ 0x00000400
D3DFDS_SHADECAPS	equ 0x00000800
D3DFDS_TEXTURECAPS	equ 0x00001000
D3DFDS_TEXTUREFILTERCAPS equ 0x00002000
D3DFDS_TEXTUREBLENDCAPS equ 0x00004000
D3DFDS_TEXTUREADDRESSCAPS equ 0x00008000

D3DFINDDEVICESEARCH	STRUC
dwSize			dd ?
dwFlags			dd ?
bHardware		BOOL ?
dcmColorModel		D3DCOLORMODEL ?
guid			GUID <>
dwCaps			dd ?
dpcPrimCaps		D3DPRIMCAPS <>
D3DFINDDEVICESEARCH	ENDS
LPD3DFINDDEVICESEARCH	typedef ptr D3DFINDDEVICESEARCH

D3DFINDDEVICERESULT	STRUC
dwSize			dd ?
guid			GUID <>
ddHwDesc		D3DDEVICEDESC <>
ddSwDesc		D3DDEVICEDESC <>
D3DFINDDEVICERESULT	ENDS
LPD3DFINDDEVICERESULT	typedef ptr D3DFINDDEVICERESULT

D3DEXECUTEBUFFERDESC	STRUC
dwSize			dd ?
dwFlags			dd ?
dwCaps			dd ?
dwBufferSize		dd ?
lpData			LPVOID ?
D3DEXECUTEBUFFERDESC	ENDS
LPD3DEXECUTEBUFFERDESC	typedef ptr D3DEXECUTEBUFFERDESC


D3DDEB_BUFSIZE		equ 0x00000001
D3DDEB_CAPS		equ 0x00000002
D3DDEB_LPDATA		equ 0x00000004


D3DDEBCAPS_SYSTEMMEMORY equ 0x00000001
D3DDEBCAPS_VIDEOMEMORY	equ 0x00000002
D3DDEBCAPS_MEM		equ (D3DDEBCAPS_SYSTEMMEMORY OR D3DDEBCAPS_VIDEOMEMORY)

if(DIRECT3D_VERSION LT 0x0800)

if(DIRECT3D_VERSION GE 0x0700)
D3DDEVINFO_TEXTUREMANAGER  STRUC
bThrashing		BOOL ?
dwApproxBytesDownloaded dd ?
dwNumEvicts		dd ?
dwNumVidCreates		dd ?
dwNumTexturesUsed	dd ?
dwNumUsedTexInVid	dd ?
dwWorkingSet		dd ?
dwWorkingSetBytes	dd ?
dwTotalManaged		dd ?
dwTotalBytes		dd ?
dwLastPri		dd ?
D3DDEVINFO_TEXTUREMANAGER ENDS
LPD3DDEVINFO_TEXTUREMANAGER typedef ptr D3DDEVINFO_TEXTUREMANAGER

D3DDEVINFO_TEXTURING	STRUC
dwNumLoads		dd ?
dwApproxBytesLoaded	dd ?
dwNumPreLoads		dd ?
dwNumSet		dd ?
dwNumCreates		dd ?
dwNumDestroys		dd ?
dwNumSetPriorities	dd ?
dwNumSetLODs		dd ?
dwNumLocks		dd ?
dwNumGetDCs		dd ?
D3DDEVINFO_TEXTURING	ENDS
LPD3DDEVINFO_TEXTURING	typedef ptr D3DDEVINFO_TEXTURING
endif

endif

.pragma pack(pop)

endif
