// H to Pas Converter Ver.0.17.0.20
//     Date : 6 6 1999
//   Source : d3dcaps.h

unit d3dcaps;

{$X+}{$Z4}

interface

uses Windows, ddraw, d3dtypes;

(*==========================================================================;
 *
 *
 *  File:       d3dcaps.h
 *  Content:    Direct3D capabilities include file
 *
 ***************************************************************************)


(*
 *  Pull in DirectDraw include file automatically:
 *)
// Error :  #include " ddraw.h "

const
  DIRECT3D_VERSION	= $0700;

// Error :  #pragma pack ( 4 )

(* Description of capabilities of transform *)

type
  LPD3DTRANSFORMCAPS	= ^D3DTRANSFORMCAPS;
  D3DTRANSFORMCAPS = record
	dwSize	: DWORD;
	dwCaps	: DWORD;
  end;

const
  D3DTRANSFORMCAPS_CLIP	= $00000001;	(* Will clip whilst transforming *)

(* Description of capabilities of lighting *)

type
  LPD3DLIGHTINGCAPS	= ^D3DLIGHTINGCAPS;
  D3DLIGHTINGCAPS = record
	dwSize	: DWORD;
	dwCaps	: DWORD;	(* Lighting caps *)
	dwLightingModel	: DWORD;	(* Lighting model - RGB or mono *)
	dwNumLights	: DWORD;	(* Number of lights that can be handled *)
  end;

const
  D3DLIGHTINGMODEL_RGB	= $00000001;
  D3DLIGHTINGMODEL_MONO	= $00000002;

  D3DLIGHTCAPS_POINT	= $00000001;	(* Point lights supported *)
  D3DLIGHTCAPS_SPOT	= $00000002;	(* Spot lights supported *)
  D3DLIGHTCAPS_DIRECTIONAL	= $00000004;	(* Directional lights supported *)
// Error :  #if ( DIRECT3D_VERSION < 0x700 )
  D3DLIGHTCAPS_PARALLELPOINT	= $00000008;	(* Parallel point lights supported *)
//{$ENDIF}
// Error :  #if ( DIRECT3D_VERSION < 0x500 )
  D3DLIGHTCAPS_GLSPOT	= $00000010;	(* GL syle spot lights supported *)
//{$ENDIF}

(* Description of capabilities for each primitive type *)

type
  LPD3DPRIMCAPS	= ^D3DPRIMCAPS;
  D3DPRIMCAPS = record
	dwSize	: DWORD;
	dwMiscCaps	: DWORD;	(* Capability flags *)
	dwRasterCaps	: DWORD;
	dwZCmpCaps	: DWORD;
	dwSrcBlendCaps	: DWORD;
	dwDestBlendCaps	: DWORD;
	dwAlphaCmpCaps	: DWORD;
	dwShadeCaps	: DWORD;
	dwTextureCaps	: DWORD;
	dwTextureFilterCaps	: DWORD;
	dwTextureBlendCaps	: DWORD;
	dwTextureAddressCaps	: DWORD;
	dwStippleWidth	: DWORD;	(* maximum width and height of *)
	dwStippleHeight	: DWORD;	(* of supported stipple (up to 32x32) *)
  end;

(* D3DPRIMCAPS dwMiscCaps *)

const
  D3DPMISCCAPS_MASKPLANES	= $00000001;
  D3DPMISCCAPS_MASKZ	= $00000002;
  D3DPMISCCAPS_LINEPATTERNREP	= $00000004;
  D3DPMISCCAPS_CONFORMANT	= $00000008;
  D3DPMISCCAPS_CULLNONE	= $00000010;
  D3DPMISCCAPS_CULLCW	= $00000020;
  D3DPMISCCAPS_CULLCCW	= $00000040;

(* D3DPRIMCAPS dwRasterCaps *)

  D3DPRASTERCAPS_DITHER	= $00000001;
  D3DPRASTERCAPS_ROP2	= $00000002;
  D3DPRASTERCAPS_XOR	= $00000004;
  D3DPRASTERCAPS_PAT	= $00000008;
  D3DPRASTERCAPS_ZTEST	= $00000010;
  D3DPRASTERCAPS_SUBPIXEL	= $00000020;
  D3DPRASTERCAPS_SUBPIXELX	= $00000040;
  D3DPRASTERCAPS_FOGVERTEX	= $00000080;
  D3DPRASTERCAPS_FOGTABLE	= $00000100;
  D3DPRASTERCAPS_STIPPLE	= $00000200;
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT	= $00000400;
  D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT	= $00000800;
  D3DPRASTERCAPS_ANTIALIASEDGES	= $00001000;
  D3DPRASTERCAPS_MIPMAPLODBIAS	= $00002000;
  D3DPRASTERCAPS_ZBIAS	= $00004000;
  D3DPRASTERCAPS_ZBUFFERLESSHSR	= $00008000;
  D3DPRASTERCAPS_FOGRANGE	= $00010000;
  D3DPRASTERCAPS_ANISOTROPY	= $00020000;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  D3DPRASTERCAPS_WBUFFER	= $00040000;
  D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT	= $00080000;
  D3DPRASTERCAPS_WFOG	= $00100000;
  D3DPRASTERCAPS_ZFOG	= $00200000;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  D3DPRASTERCAPS_COLORKEYBLEND	= $00400000;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)

(* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps *)

  D3DPCMPCAPS_NEVER	= $00000001;
  D3DPCMPCAPS_LESS	= $00000002;
  D3DPCMPCAPS_EQUAL	= $00000004;
  D3DPCMPCAPS_LESSEQUAL	= $00000008;
  D3DPCMPCAPS_GREATER	= $00000010;
  D3DPCMPCAPS_NOTEQUAL	= $00000020;
  D3DPCMPCAPS_GREATEREQUAL	= $00000040;
  D3DPCMPCAPS_ALWAYS	= $00000080;

(* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps *)

  D3DPBLENDCAPS_ZERO	= $00000001;
  D3DPBLENDCAPS_ONE	= $00000002;
  D3DPBLENDCAPS_SRCCOLOR	= $00000004;
  D3DPBLENDCAPS_INVSRCCOLOR	= $00000008;
  D3DPBLENDCAPS_SRCALPHA	= $00000010;
  D3DPBLENDCAPS_INVSRCALPHA	= $00000020;
  D3DPBLENDCAPS_DESTALPHA	= $00000040;
  D3DPBLENDCAPS_INVDESTALPHA	= $00000080;
  D3DPBLENDCAPS_DESTCOLOR	= $00000100;
  D3DPBLENDCAPS_INVDESTCOLOR	= $00000200;
  D3DPBLENDCAPS_SRCALPHASAT	= $00000400;
  D3DPBLENDCAPS_BOTHSRCALPHA	= $00000800;
  D3DPBLENDCAPS_BOTHINVSRCALPHA	= $00001000;

(* D3DPRIMCAPS dwShadeCaps *)

  D3DPSHADECAPS_COLORFLATMONO	= $00000001;
  D3DPSHADECAPS_COLORFLATRGB	= $00000002;
  D3DPSHADECAPS_COLORGOURAUDMONO	= $00000004;
  D3DPSHADECAPS_COLORGOURAUDRGB	= $00000008;
  D3DPSHADECAPS_COLORPHONGMONO	= $00000010;
  D3DPSHADECAPS_COLORPHONGRGB	= $00000020;

  D3DPSHADECAPS_SPECULARFLATMONO	= $00000040;
  D3DPSHADECAPS_SPECULARFLATRGB	= $00000080;
  D3DPSHADECAPS_SPECULARGOURAUDMONO	= $00000100;
  D3DPSHADECAPS_SPECULARGOURAUDRGB	= $00000200;
  D3DPSHADECAPS_SPECULARPHONGMONO	= $00000400;
  D3DPSHADECAPS_SPECULARPHONGRGB	= $00000800;

  D3DPSHADECAPS_ALPHAFLATBLEND	= $00001000;
  D3DPSHADECAPS_ALPHAFLATSTIPPLED	= $00002000;
  D3DPSHADECAPS_ALPHAGOURAUDBLEND	= $00004000;
  D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED	= $00008000;
  D3DPSHADECAPS_ALPHAPHONGBLEND	= $00010000;
  D3DPSHADECAPS_ALPHAPHONGSTIPPLED	= $00020000;

  D3DPSHADECAPS_FOGFLAT	= $00040000;
  D3DPSHADECAPS_FOGGOURAUD	= $00080000;
  D3DPSHADECAPS_FOGPHONG	= $00100000;

(* D3DPRIMCAPS dwTextureCaps *)

(*
 * Perspective-correct texturing is supported
 *)
  D3DPTEXTURECAPS_PERSPECTIVE	= $00000001;

(*
 * Power-of-2 texture dimensions are required
 *)
  D3DPTEXTURECAPS_POW2	= $00000002;

(*
 * Alpha in texture pixels is supported
 *)
  D3DPTEXTURECAPS_ALPHA	= $00000004;

(*
 * Color-keyed textures are supported
 *)
  D3DPTEXTURECAPS_TRANSPARENCY	= $00000008;

(*
 * obsolete, see D3DPTADDRESSCAPS_BORDER
 *)
  D3DPTEXTURECAPS_BORDER	= $00000010;

(*
 * Only square textures are supported
 *)
  D3DPTEXTURECAPS_SQUAREONLY	= $00000020;

// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
(*
 * Texture indices are not scaled by the texture size prior
 * to interpolation.
 *)
  D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE	= $00000040;

(*
 * Device can draw alpha from texture palettes
 *)
  D3DPTEXTURECAPS_ALPHAPALETTE	= $00000080;

(*
 * Device can use non-POW2 textures if:
 *  1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage
 *  2) D3DRS_WRAP(N) is zero for this texture's coordinates
 *  3) mip mapping is not enabled (use magnification only)
 *)
  D3DPTEXTURECAPS_NONPOW2CONDITIONAL	= $00000100;

//	$00000200; unused

(*
 * Device can divide transformed texture coordinates by the
 * COUNTth texture coordinate (can do D3DTTFF_PROJECTED)
 *)
  D3DPTEXTURECAPS_PROJECTED	= $00000400;

(*
 * Device can do cubemap textures
 *)
  D3DPTEXTURECAPS_CUBEMAP	= $00000800;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)

(* D3DPRIMCAPS dwTextureFilterCaps *)

  D3DPTFILTERCAPS_NEAREST	= $00000001;
  D3DPTFILTERCAPS_LINEAR	= $00000002;
  D3DPTFILTERCAPS_MIPNEAREST	= $00000004;
  D3DPTFILTERCAPS_MIPLINEAR	= $00000008;
  D3DPTFILTERCAPS_LINEARMIPNEAREST	= $00000010;
  D3DPTFILTERCAPS_LINEARMIPLINEAR	= $00000020;

// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
(* Device3 Min Filter *)
  D3DPTFILTERCAPS_MINFPOINT	= $00000100;
  D3DPTFILTERCAPS_MINFLINEAR	= $00000200;
  D3DPTFILTERCAPS_MINFANISOTROPIC	= $00000400;

(* Device3 Mip Filter *)
  D3DPTFILTERCAPS_MIPFPOINT	= $00010000;
  D3DPTFILTERCAPS_MIPFLINEAR	= $00020000;

(* Device3 Mag Filter *)
  D3DPTFILTERCAPS_MAGFPOINT	= $01000000;
  D3DPTFILTERCAPS_MAGFLINEAR	= $02000000;
  D3DPTFILTERCAPS_MAGFANISOTROPIC	= $04000000;
  D3DPTFILTERCAPS_MAGFAFLATCUBIC	= $08000000;
  D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC	= $10000000;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)

(* D3DPRIMCAPS dwTextureBlendCaps *)

  D3DPTBLENDCAPS_DECAL	= $00000001;
  D3DPTBLENDCAPS_MODULATE	= $00000002;
  D3DPTBLENDCAPS_DECALALPHA	= $00000004;
  D3DPTBLENDCAPS_MODULATEALPHA	= $00000008;
  D3DPTBLENDCAPS_DECALMASK	= $00000010;
  D3DPTBLENDCAPS_MODULATEMASK	= $00000020;
  D3DPTBLENDCAPS_COPY	= $00000040;
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  D3DPTBLENDCAPS_ADD	= $00000080;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

(* D3DPRIMCAPS dwTextureAddressCaps *)
  D3DPTADDRESSCAPS_WRAP	= $00000001;
  D3DPTADDRESSCAPS_MIRROR	= $00000002;
  D3DPTADDRESSCAPS_CLAMP	= $00000004;
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  D3DPTADDRESSCAPS_BORDER	= $00000008;
  D3DPTADDRESSCAPS_INDEPENDENTUV	= $00000010;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )

(* D3DDEVICEDESC dwStencilCaps *)

  D3DSTENCILCAPS_KEEP	= $00000001;
  D3DSTENCILCAPS_ZERO	= $00000002;
  D3DSTENCILCAPS_REPLACE	= $00000004;
  D3DSTENCILCAPS_INCRSAT	= $00000008;
  D3DSTENCILCAPS_DECRSAT	= $00000010;
  D3DSTENCILCAPS_INVERT	= $00000020;
  D3DSTENCILCAPS_INCR	= $00000040;
  D3DSTENCILCAPS_DECR	= $00000080;

(* D3DDEVICEDESC dwTextureOpCaps *)

  D3DTEXOPCAPS_DISABLE	= $00000001;
  D3DTEXOPCAPS_SELECTARG1	= $00000002;
  D3DTEXOPCAPS_SELECTARG2	= $00000004;
  D3DTEXOPCAPS_MODULATE	= $00000008;
  D3DTEXOPCAPS_MODULATE2X	= $00000010;
  D3DTEXOPCAPS_MODULATE4X	= $00000020;
  D3DTEXOPCAPS_ADD	= $00000040;
  D3DTEXOPCAPS_ADDSIGNED	= $00000080;
  D3DTEXOPCAPS_ADDSIGNED2X	= $00000100;
  D3DTEXOPCAPS_SUBTRACT	= $00000200;
  D3DTEXOPCAPS_ADDSMOOTH	= $00000400;
  D3DTEXOPCAPS_BLENDDIFFUSEALPHA	= $00000800;
  D3DTEXOPCAPS_BLENDTEXTUREALPHA	= $00001000;
  D3DTEXOPCAPS_BLENDFACTORALPHA	= $00002000;
  D3DTEXOPCAPS_BLENDTEXTUREALPHAPM	= $00004000;
  D3DTEXOPCAPS_BLENDCURRENTALPHA	= $00008000;
  D3DTEXOPCAPS_PREMODULATE	= $00010000;
  D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR	= $00020000;
  D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA	= $00040000;
  D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR	= $00080000;
  D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA	= $00100000;
  D3DTEXOPCAPS_BUMPENVMAP	= $00200000;
  D3DTEXOPCAPS_BUMPENVMAPLUMINANCE	= $00400000;
  D3DTEXOPCAPS_DOTPRODUCT3	= $00800000;

(* D3DDEVICEDESC dwFVFCaps flags *)

  D3DFVFCAPS_TEXCOORDCOUNTMASK	= $0000ffff;	(* mask for texture coordinate count field *)
  D3DFVFCAPS_DONOTSTRIPELEMENTS	= $00080000;	(* Device prefers that vertex elements not be stripped *)

//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)

(*
 * Description for a device.
 * This is used to describe a device that is to be created or to query
 * the current device.
 *)
type
  LPD3DDEVICEDESC	= ^D3DDEVICEDESC;
  D3DDEVICEDESC = record
	dwSize	: DWORD;	(* Size of D3DDEVICEDESC structure *)
	dwFlags	: DWORD;	(* Indicates which fields have valid data *)
	dcmColorModel	: D3DCOLORMODEL;	(* Color model of device *)
	dwDevCaps	: DWORD;	(* Capabilities of device *)
	dtcTransformCaps	: D3DTRANSFORMCAPS;	(* Capabilities of transform *)
	bClipping	: BOOL;	(* Device can do 3D clipping *)
	dlcLightingCaps	: D3DLIGHTINGCAPS;	(* Capabilities of lighting *)
	dpcLineCaps	: D3DPRIMCAPS;
	dpcTriCaps	: D3DPRIMCAPS;
	dwDeviceRenderBitDepth	: DWORD;	(* One of DDBB_8, 16, etc.. *)
	dwDeviceZBufferBitDepth	: DWORD;	(* One of DDBD_16, 32, etc.. *)
	dwMaxBufferSize	: DWORD;	(* Maximum execute buffer size *)
	dwMaxVertexCount	: DWORD;	(* Maximum vertex count *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
// *** New fields for DX5 *** //

// Width and height caps are 0 for legacy HALs.
	dwMinTextureWidth, dwMinTextureHeight	: DWORD;
	dwMaxTextureWidth, dwMaxTextureHeight	: DWORD;
	dwMinStippleWidth, dwMaxStippleWidth	: DWORD;
	dwMinStippleHeight, dwMaxStippleHeight	: DWORD;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
// New fields for DX6
	dwMaxTextureRepeat	: DWORD;
	dwMaxTextureAspectRatio	: DWORD;
	dwMaxAnisotropy	: DWORD;

// Guard band that the rasterizer can accommodate
// Screen-space vertices inside this space but outside the viewport
// will get clipped properly.
	dvGuardBandLeft	: D3DVALUE;
	dvGuardBandTop	: D3DVALUE;
	dvGuardBandRight	: D3DVALUE;
	dvGuardBandBottom	: D3DVALUE;

	dvExtentsAdjust	: D3DVALUE;
	dwStencilCaps	: DWORD;

	dwFVFCaps	: DWORD;
	dwTextureOpCaps	: DWORD;
	wMaxTextureBlendStages	: WORD;
	wMaxSimultaneousTextures	: WORD;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)
  end;

// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  LPD3DDEVICEDESC7	= ^D3DDEVICEDESC7;
  D3DDEVICEDESC7 = record
	dwSize	: DWORD;	(* Size of D3DDEVICEDESC7 structure *)
	dwFlags	: DWORD;	(* Indicates which fields have valid data *)
	dcmColorModel	: D3DCOLORMODEL;	(* Color model of device *)
	dwDevCaps	: DWORD;	(* Capabilities of device *)
	dtcTransformCaps	: D3DTRANSFORMCAPS;	(* Capabilities of transform *)
	bClipping	: BOOL;	(* Device can do 3D clipping *)
	dlcLightingCaps	: D3DLIGHTINGCAPS;	(* Capabilities of lighting *)
	dpcLineCaps	: D3DPRIMCAPS;
	dpcTriCaps	: D3DPRIMCAPS;
	dwDeviceRenderBitDepth	: DWORD;	(* One of DDBB_8, 16, etc.. *)
	dwDeviceZBufferBitDepth	: DWORD;	(* One of DDBD_16, 32, etc.. *)
	dwMaxBufferSize	: DWORD;	(* Maximum execute buffer size *)
	dwMaxVertexCount	: DWORD;	(* Maximum vertex count *)

	dwMinTextureWidth, dwMinTextureHeight	: DWORD;
	dwMaxTextureWidth, dwMaxTextureHeight	: DWORD;
	dwMinStippleWidth, dwMaxStippleWidth	: DWORD;
	dwMinStippleHeight, dwMaxStippleHeight	: DWORD;

	dwMaxTextureRepeat	: DWORD;
	dwMaxTextureAspectRatio	: DWORD;
	dwMaxAnisotropy	: DWORD;

	dvGuardBandLeft	: D3DVALUE;
	dvGuardBandTop	: D3DVALUE;
	dvGuardBandRight	: D3DVALUE;
	dvGuardBandBottom	: D3DVALUE;

	dvExtentsAdjust	: D3DVALUE;
	dwStencilCaps	: DWORD;

	dwFVFCaps	: DWORD;
	dwTextureOpCaps	: DWORD;
	wMaxTextureBlendStages	: WORD;
	wMaxSimultaneousTextures	: WORD;

	dwMaxActiveLights	: DWORD;
	dvMaxVertexW	: D3DVALUE;
	deviceGUID	: TGUID;

	wMaxUserClipPlanes	: WORD;
	wMaxVertexBlendMatrices	: WORD;

	dwReserved1	: DWORD;
	dwReserved2	: DWORD;
	dwReserved3	: DWORD;
	dwReserved4	: DWORD;
	dwReserved5	: DWORD;
  end;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)

// Error :  #define D3DDEVICEDESCSIZE ( sizeof ( D3DDEVICEDESC ) )
// Error :  #define D3DDEVICEDESC7SIZE ( sizeof ( D3DDEVICEDESC7 ) )

type
  LPD3DENUMDEVICESCALLBACK =   function (lpGuid: PGUID; lpDeviceDescription: LPSTR;
	 lpDeviceName: LPSTR; Para0: LPD3DDEVICEDESC; Para1: LPD3DDEVICEDESC; Para2: Pointer): HRESULT; stdcall;

// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  LPD3DENUMDEVICESCALLBACK7 =   function (lpDeviceDescription: LPSTR;
	 lpDeviceName: LPSTR; Para0: LPD3DDEVICEDESC7; Para1: Pointer): HRESULT; stdcall;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)

(* D3DDEVICEDESC dwFlags indicating valid fields *)

const
  D3DDD_COLORMODEL	= $00000001;	(* dcmColorModel is valid *)
  D3DDD_DEVCAPS	= $00000002;	(* dwDevCaps is valid *)
  D3DDD_TRANSFORMCAPS	= $00000004;	(* dtcTransformCaps is valid *)
  D3DDD_LIGHTINGCAPS	= $00000008;	(* dlcLightingCaps is valid *)
  D3DDD_BCLIPPING	= $00000010;	(* bClipping is valid *)
  D3DDD_LINECAPS	= $00000020;	(* dpcLineCaps is valid *)
  D3DDD_TRICAPS	= $00000040;	(* dpcTriCaps is valid *)
  D3DDD_DEVICERENDERBITDEPTH	= $00000080;	(* dwDeviceRenderBitDepth is valid *)
  D3DDD_DEVICEZBUFFERBITDEPTH	= $00000100;	(* dwDeviceZBufferBitDepth is valid *)
  D3DDD_MAXBUFFERSIZE	= $00000200;	(* dwMaxBufferSize is valid *)
  D3DDD_MAXVERTEXCOUNT	= $00000400;	(* dwMaxVertexCount is valid *)

(* D3DDEVICEDESC dwDevCaps flags *)

  D3DDEVCAPS_FLOATTLVERTEX	= $00000001;	(* Device accepts floating point *)
(* for post-transform vertex data *)
  D3DDEVCAPS_SORTINCREASINGZ	= $00000002;	(* Device needs data sorted for increasing Z *)
  D3DDEVCAPS_SORTDECREASINGZ	= $00000004;	(* Device needs data sorted for decreasing Z *)
  D3DDEVCAPS_SORTEXACT	= $00000008;	(* Device needs data sorted exactly *)

  D3DDEVCAPS_EXECUTESYSTEMMEMORY	= $00000010;	(* Device can use execute buffers from system memory *)
  D3DDEVCAPS_EXECUTEVIDEOMEMORY	= $00000020;	(* Device can use execute buffers from video memory *)
  D3DDEVCAPS_TLVERTEXSYSTEMMEMORY	= $00000040;	(* Device can use TL buffers from system memory *)
  D3DDEVCAPS_TLVERTEXVIDEOMEMORY	= $00000080;	(* Device can use TL buffers from video memory *)
  D3DDEVCAPS_TEXTURESYSTEMMEMORY	= $00000100;	(* Device can texture from system memory *)
  D3DDEVCAPS_TEXTUREVIDEOMEMORY	= $00000200;	(* Device can texture from device memory *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  D3DDEVCAPS_DRAWPRIMTLVERTEX	= $00000400;	(* Device can draw TLVERTEX primitives *)
  D3DDEVCAPS_CANRENDERAFTERFLIP	= $00000800;	(* Device can render without waiting for flip to complete *)
  D3DDEVCAPS_TEXTURENONLOCALVIDMEM	= $00001000;	(* Device can texture from nonlocal video memory *)
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  D3DDEVCAPS_DRAWPRIMITIVES2	= $00002000;	(* Device can support DrawPrimitives2 *)
  D3DDEVCAPS_SEPARATETEXTUREMEMORIES	= $00004000;	(* Device is texturing from separate memory pools *)
  D3DDEVCAPS_DRAWPRIMITIVES2EX	= $00008000;	(* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*)
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  D3DDEVCAPS_HWTRANSFORMANDLIGHT	= $00010000;	(* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also *)
  D3DDEVCAPS_CANBLTSYSTONONLOCAL	= $00020000;	(* Device supports a Tex Blt from system memory to non-local vidmem *)
  D3DDEVCAPS_STRIDEDVERTICES	= $00040000;	(* Device can support Strided vertex data *)
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)

  D3DFDS_COLORMODEL	= $00000001;	(* Match color model *)
  D3DFDS_GUID	= $00000002;	(* Match guid *)
  D3DFDS_HARDWARE	= $00000004;	(* Match hardware/software *)
  D3DFDS_TRIANGLES	= $00000008;	(* Match in triCaps *)
  D3DFDS_LINES	= $00000010;	(* Match in lineCaps  *)
  D3DFDS_MISCCAPS	= $00000020;	(* Match primCaps.dwMiscCaps *)
  D3DFDS_RASTERCAPS	= $00000040;	(* Match primCaps.dwRasterCaps *)
  D3DFDS_ZCMPCAPS	= $00000080;	(* Match primCaps.dwZCmpCaps *)
  D3DFDS_ALPHACMPCAPS	= $00000100;	(* Match primCaps.dwAlphaCmpCaps *)
  D3DFDS_SRCBLENDCAPS	= $00000200;	(* Match primCaps.dwSourceBlendCaps *)
  D3DFDS_DSTBLENDCAPS	= $00000400;	(* Match primCaps.dwDestBlendCaps *)
  D3DFDS_SHADECAPS	= $00000800;	(* Match primCaps.dwShadeCaps *)
  D3DFDS_TEXTURECAPS	= $00001000;	(* Match primCaps.dwTextureCaps *)
  D3DFDS_TEXTUREFILTERCAPS	= $00002000;	(* Match primCaps.dwTextureFilterCaps *)
  D3DFDS_TEXTUREBLENDCAPS	= $00004000;	(* Match primCaps.dwTextureBlendCaps *)
  D3DFDS_TEXTUREADDRESSCAPS	= $00008000;	(* Match primCaps.dwTextureBlendCaps *)

(*
 * FindDevice arguments
 *)
type
  LPD3DFINDDEVICESEARCH	= ^D3DFINDDEVICESEARCH;
  D3DFINDDEVICESEARCH = record
	dwSize	: DWORD;
	dwFlags	: DWORD;
	bHardware	: BOOL;
	dcmColorModel	: D3DCOLORMODEL;
	TGUID	: TGUID;
	dwCaps	: DWORD;
	dpcPrimCaps	: D3DPRIMCAPS;
  end;

  LPD3DFINDDEVICERESULT	= ^D3DFINDDEVICERESULT;
  D3DFINDDEVICERESULT = record
	dwSize	: DWORD;
	TGUID	: TGUID;	(* guid which matched *)
	ddHwDesc	: D3DDEVICEDESC;	(* hardware D3DDEVICEDESC *)
	ddSwDesc	: D3DDEVICEDESC;	(* software D3DDEVICEDESC *)
  end;

(*
 * Description of execute buffer.
 *)
  LPD3DEXECUTEBUFFERDESC	= ^D3DEXECUTEBUFFERDESC;
  D3DEXECUTEBUFFERDESC = record
	dwSize	: DWORD;	(* size of this structure *)
	dwFlags	: DWORD;	(* flags indicating which fields are valid *)
	dwCaps	: DWORD;	(* capabilities of execute buffer *)
	dwBufferSize	: DWORD;	(* size of execute buffer data *)
	lpData	: Pointer;	(* pointer to actual data *)
  end;

(* D3DEXECUTEBUFFER dwFlags indicating valid fields *)

const
  D3DDEB_BUFSIZE	= $00000001;	(* buffer size valid *)
  D3DDEB_CAPS	= $00000002;	(* caps valid *)
  D3DDEB_LPDATA	= $00000004;	(* lpData valid *)

(* D3DEXECUTEBUFFER dwCaps *)

  D3DDEBCAPS_SYSTEMMEMORY	= $00000001;	(* buffer in system memory *)
  D3DDEBCAPS_VIDEOMEMORY	= $00000002;	(* buffer in device memory *)
  D3DDEBCAPS_MEM	= ( D3DDEBCAPS_SYSTEMMEMORY or D3DDEBCAPS_VIDEOMEMORY );

// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
type
  LPD3DDEVINFO_TEXTUREMANAGER	= ^D3DDEVINFO_TEXTUREMANAGER;
  D3DDEVINFO_TEXTUREMANAGER = record
	bThrashing	: BOOL;	(* indicates if thrashing *)
	dwNumEvicts	: DWORD;	(* number of textures evicted *)
	dwNumVidCreates	: DWORD;	(* number of textures created in video memory *)
	dwNumTexturesUsed	: DWORD;	(* number of textures used *)
	dwNumUsedTexInVid	: DWORD;	(* number of used textures present in video memory *)
	dwWorkingSet	: DWORD;	(* number of textures in video memory *)
	dwWorkingSetBytes	: DWORD;	(* number of bytes in video memory *)
	dwTotalManaged	: DWORD;	(* total number of managed textures *)
	dwTotalBytes	: DWORD;	(* total number of bytes of managed textures *)
	dwLastPri	: DWORD;	(* priority of last texture evicted *)
  end;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)

// Error :  #pragma pack ( )

//{$ENDIF}(* _D3DCAPS_H_ *)


implementation

end.
