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

unit d3d;

{$X+}{$Z2}

interface

uses Windows, Ole2, d3dtypes, d3dcaps, ddraw;

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



// Error :  #include < stdlib.h >

{$DEFINE COM_NO_WINDOWS_H}
// Error :  #include < objbase.h >

// #define D3DAPI WINAPI

const
  DIRECT3D_VERSION	= $0700;

(*
 * Interface IID's
 *)
// Error : {$IFDEF _WIN32} && !defined ( _NO_COM )
  IID_IDirect3D: TGUID = (
    D1:$3BBA0080;D2:$2421;D3:$11CF;D4:($A3,$1A,$00,$AA,$00,$B9,$33,$56));
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  IID_IDirect3D2: TGUID = (
    D1:$6aae1ec1;D2:$662a;D3:$11d0;D4:($88,$9d,$00,$aa,$00,$bb,$b7,$6a));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  IID_IDirect3D3: TGUID = (
    D1:$bb223240;D2:$e72b;D3:$11d0;D4:($a9,$b4,$00,$aa,$00,$c0,$99,$3e));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  IID_IDirect3D7: TGUID = (
    D1:$f5049e77;D2:$4861;D3:$11d2;D4:($a4,$7,$0,$a0,$c9,$6,$29,$a8));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)

// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  IID_IDirect3DRampDevice: TGUID = (
    D1:$F2086B20;D2:$259F;D3:$11CF;D4:($A3,$1A,$00,$AA,$00,$B9,$33,$56));
  IID_IDirect3DRGBDevice: TGUID = (
    D1:$A4665C60;D2:$2673;D3:$11CF;D4:($A3,$1A,$00,$AA,$00,$B9,$33,$56));
  IID_IDirect3DHALDevice: TGUID = (
    D1:$84E63dE0;D2:$46AA;D3:$11CF;D4:($81,$6F,$00,$00,$C0,$20,$15,$6E));
  IID_IDirect3DMMXDevice: TGUID = (
    D1:$881949a1;D2:$d6f3;D3:$11d0;D4:($89,$ab,$00,$a0,$c9,$05,$41,$29));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  IID_IDirect3DRefDevice: TGUID = (
    D1:$50936643;D2:$13e9;D3:$11d1;D4:($89,$aa,$0,$a0,$c9,$5,$41,$29));
  IID_IDirect3DNullDevice: TGUID = (
    D1:$8767df22;D2:$bacc;D3:$11d1;D4:($89,$69,$0,$a0,$c9,$6,$29,$a8));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  IID_IDirect3DTnLHalDevice: TGUID = (
    D1:$f5049e78;D2:$4861;D3:$11d2;D4:($a4,$7,$0,$a0,$c9,$6,$29,$a8));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)

(*
 * Internal Guid to distinguish requested MMX from MMX being used as an RGB rasterizer
 *)

  IID_IDirect3DDevice: TGUID = (
    D1:$64108800;D2:$957d;D3:$11d0;D4:($89,$ab,$00,$a0,$c9,$05,$41,$29));
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  IID_IDirect3DDevice2: TGUID = (
    D1:$93281501;D2:$8cf8;D3:$11d0;D4:($89,$ab,$0,$a0,$c9,$5,$41,$29));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  IID_IDirect3DDevice3: TGUID = (
    D1:$b0ab3b60;D2:$33d7;D3:$11d1;D4:($a9,$81,$0,$c0,$4f,$d7,$b1,$74));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  IID_IDirect3DDevice7: TGUID = (
    D1:$f5049e79;D2:$4861;D3:$11d2;D4:($a4,$7,$0,$a0,$c9,$6,$29,$a8));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)

  IID_IDirect3DTexture: TGUID = (
    D1:$2CDCD9E0;D2:$25A0;D3:$11CF;D4:($A3,$1A,$00,$AA,$00,$B9,$33,$56));
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  IID_IDirect3DTexture2: TGUID = (
    D1:$93281502;D2:$8cf8;D3:$11d0;D4:($89,$ab,$0,$a0,$c9,$5,$41,$29));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

  IID_IDirect3DLight: TGUID = (
    D1:$4417C142;D2:$33AD;D3:$11CF;D4:($81,$6F,$00,$00,$C0,$20,$15,$6E));

  IID_IDirect3DMaterial: TGUID = (
    D1:$4417C144;D2:$33AD;D3:$11CF;D4:($81,$6F,$00,$00,$C0,$20,$15,$6E));
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  IID_IDirect3DMaterial2: TGUID = (
    D1:$93281503;D2:$8cf8;D3:$11d0;D4:($89,$ab,$0,$a0,$c9,$5,$41,$29));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  IID_IDirect3DMaterial3: TGUID = (
    D1:$ca9c46f4;D2:$d3c5;D3:$11d1;D4:($b7,$5a,$0,$60,$8,$52,$b3,$12));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)

  IID_IDirect3DExecuteBuffer: TGUID = (
    D1:$4417C145;D2:$33AD;D3:$11CF;D4:($81,$6F,$00,$00,$C0,$20,$15,$6E));
  IID_IDirect3DViewport: TGUID = (
    D1:$4417C146;D2:$33AD;D3:$11CF;D4:($81,$6F,$00,$00,$C0,$20,$15,$6E));
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  IID_IDirect3DViewport2: TGUID = (
    D1:$93281500;D2:$8cf8;D3:$11d0;D4:($89,$ab,$0,$a0,$c9,$5,$41,$29));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  IID_IDirect3DViewport3: TGUID = (
    D1:$b0ab3b61;D2:$33d7;D3:$11d1;D4:($a9,$81,$0,$c0,$4f,$d7,$b1,$74));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  IID_IDirect3DVertexBuffer: TGUID = (
    D1:$7a503555;D2:$4a83;D3:$11d1;D4:($a5,$db,$0,$a0,$c9,$3,$67,$f8));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)
// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  IID_IDirect3DVertexBuffer7: TGUID = (
    D1:$f5049e7d;D2:$4861;D3:$11d2;D4:($a4,$7,$0,$a0,$c9,$6,$29,$a8));
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)
//{$ENDIF}

//{$IFDEF __cplusplus}
type
  IDirect3D = class;
  IDirect3DDevice = class;
  IDirect3DLight = class;
  IDirect3DMaterial = class;
  IDirect3DExecuteBuffer = class;
  IDirect3DTexture = class;
  IDirect3DViewport = class;
  LPDIRECT3D	= ^IDirect3D;
  LPDIRECT3DDEVICE	= ^IDirect3DDevice;
  LPDIRECT3DEXECUTEBUFFER	= ^IDirect3DExecuteBuffer;
  LPDIRECT3DLIGHT	= ^IDirect3DLight;
  LPDIRECT3DMATERIAL	= ^IDirect3DMaterial;
  LPDIRECT3DTEXTURE	= ^IDirect3DTexture;
  LPDIRECT3DVIEWPORT	= ^IDirect3DViewport;

// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  IDirect3D2 = class;
  IDirect3DDevice2 = class;
  IDirect3DMaterial2 = class;
  IDirect3DTexture2 = class;
  IDirect3DViewport2 = class;
  LPDIRECT3D2	= ^IDirect3D2;
  LPDIRECT3DDEVICE2	= ^IDirect3DDevice2;
  LPDIRECT3DMATERIAL2	= ^IDirect3DMaterial2;
  LPDIRECT3DTEXTURE2	= ^IDirect3DTexture2;
  LPDIRECT3DVIEWPORT2	= ^IDirect3DViewport2;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  IDirect3D3 = class;
  IDirect3DDevice3 = class;
  IDirect3DMaterial3 = class;
  IDirect3DViewport3 = class;
  IDirect3DVertexBuffer = class;
  LPDIRECT3D3	= ^IDirect3D3;
  LPDIRECT3DDEVICE3	= ^IDirect3DDevice3;
  LPDIRECT3DMATERIAL3	= ^IDirect3DMaterial3;
  LPDIRECT3DVIEWPORT3	= ^IDirect3DViewport3;
  LPDIRECT3DVERTEXBUFFER	= ^IDirect3DVertexBuffer;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0600 *)

// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  IDirect3D7 = class;
  IDirect3DDevice7 = class;
  IDirect3DVertexBuffer7 = class;
  LPDIRECT3D7	= ^IDirect3D7;
  LPDIRECT3DDEVICE7	= ^IDirect3DDevice7;
  LPDIRECT3DVERTEXBUFFER7	= ^IDirect3DVertexBuffer7;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)

//{$ELSE}

{
  LPDIRECT3D	= ^IDirect3D;
  LPDIRECT3DDEVICE	= ^IDirect3DDevice;
  LPDIRECT3DEXECUTEBUFFER	= ^IDirect3DExecuteBuffer;
  LPDIRECT3DLIGHT	= ^IDirect3DLight;
  LPDIRECT3DMATERIAL	= ^IDirect3DMaterial;
  LPDIRECT3DTEXTURE	= ^IDirect3DTexture;
  LPDIRECT3DVIEWPORT	= ^IDirect3DViewport;

// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  LPDIRECT3D2	= ^IDirect3D2;
  LPDIRECT3DDEVICE2	= ^IDirect3DDevice2;
  LPDIRECT3DMATERIAL2	= ^IDirect3DMaterial2;
  LPDIRECT3DTEXTURE2	= ^IDirect3DTexture2;
  LPDIRECT3DVIEWPORT2	= ^IDirect3DViewport2;
//{$ENDIF(* DIRECT3D_VERSION >= 0x0500 *)

// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  LPDIRECT3D3	= ^IDirect3D3;
  LPDIRECT3DDEVICE3	= ^IDirect3DDevice3;
  LPDIRECT3DMATERIAL3	= ^IDirect3DMaterial3;
  LPDIRECT3DVIEWPORT3	= ^IDirect3DViewport3;
  LPDIRECT3DVERTEXBUFFER	= ^IDirect3DVertexBuffer;
//{$ENDIF(* DIRECT3D_VERSION >= 0x0600 *)

// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  LPDIRECT3D7	= ^IDirect3D7;
  LPDIRECT3DDEVICE7	= ^IDirect3DDevice7;
  LPDIRECT3DVERTEXBUFFER7	= ^IDirect3DVertexBuffer7;
//{$ENDIF(* DIRECT3D_VERSION >= 0x0700 *)
}




(*
 * Direct3D interfaces
 *)

  IDirect3D = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3D methods ***)
    function Initialize(Para0: PCLSID): HRESULT; virtual; stdcall; abstract;
    function EnumDevices(Para0: LPD3DENUMDEVICESCALLBACK; Para1: Pointer): HRESULT; virtual; stdcall; abstract;
    function CreateLight(var Para0: IDirect3DLight; Para1: IUnknown): HRESULT; virtual; stdcall; abstract;
    function CreateMaterial(var Para0: IDirect3DMaterial; Para1: IUnknown): HRESULT; virtual; stdcall; abstract;
    function CreateViewport(var Para0: IDirect3DViewport; Para1: IUnknown): HRESULT; virtual; stdcall; abstract;
    function FindDevice(Para0: LPD3DFINDDEVICESEARCH; Para1: LPD3DFINDDEVICERESULT): HRESULT; virtual; stdcall; abstract;
  end;

  //LPDIRECT3D	= ^IDirect3D;



  IDirect3D2 = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3D2 methods ***)
    function EnumDevices(Para0: LPD3DENUMDEVICESCALLBACK; Para1: Pointer): HRESULT; virtual; stdcall; abstract;
    function CreateLight(var Para0: IDirect3DLight; Para1: IUnknown): HRESULT; virtual; stdcall; abstract;
    function CreateMaterial(var Para0: IDirect3DMaterial2; Para1: IUnknown): HRESULT; virtual; stdcall; abstract;
    function CreateViewport(var Para0: IDirect3DViewport2; Para1: IUnknown): HRESULT; virtual; stdcall; abstract;
    function FindDevice(Para0: LPD3DFINDDEVICESEARCH; Para1: LPD3DFINDDEVICERESULT): HRESULT; virtual; stdcall; abstract;
    function CreateDevice(Para0: PCLSID; Para1: IDirectDrawSurface; var Para2: IDirect3DDevice2): HRESULT; virtual; stdcall; abstract;
  end;

  //LPDIRECT3D2	= ^IDirect3D2;


  IDirect3D3 = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3D3 methods ***)
    function EnumDevices(Para0: LPD3DENUMDEVICESCALLBACK; Para1: Pointer): HRESULT; virtual; stdcall; abstract;
    function CreateLight(var Para0: IDirect3DLight; Para1: IUnknown): HRESULT; virtual; stdcall; abstract;
    function CreateMaterial(var Para0: IDirect3DMaterial3; Para1: IUnknown): HRESULT; virtual; stdcall; abstract;
    function CreateViewport(var Para0: IDirect3DViewport3; Para1: IUnknown): HRESULT; virtual; stdcall; abstract;
    function FindDevice(Para0: LPD3DFINDDEVICESEARCH; Para1: LPD3DFINDDEVICERESULT): HRESULT; virtual; stdcall; abstract;
    function CreateDevice(Para0: PCLSID; Para1: IDirectDrawSurface4; var Para2: IDirect3DDevice3;
	 Para3: IUnknown): HRESULT; virtual; stdcall; abstract;
    function CreateVertexBuffer(Para0: LPD3DVERTEXBUFFERDESC; var Para1: IDirect3DVertexBuffer;
	 Para2: DWORD; Para3: IUnknown): HRESULT; virtual; stdcall; abstract;
    function EnumZBufferFormats(Para0: PCLSID; Para1: LPD3DENUMPIXELFORMATSCALLBACK;
	 Para2: Pointer): HRESULT; virtual; stdcall; abstract;
    function EvictManagedTextures: HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3D3	= ^IDirect3D3;


  IDirect3D7 = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3D7 methods ***)
    function EnumDevices(Para0: LPD3DENUMDEVICESCALLBACK7; Para1: Pointer): HRESULT; virtual; stdcall; abstract;
    function CreateDevice(Para0: PCLSID; Para1: IDirectDrawSurface7; var Para2: IDirect3DDevice7): HRESULT; virtual; stdcall; abstract;
    function CreateVertexBuffer(Para0: LPD3DVERTEXBUFFERDESC; var Para1: IDirect3DVertexBuffer7;
	 Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function EnumZBufferFormats(Para0: PCLSID; Para1: LPD3DENUMPIXELFORMATSCALLBACK;
	 Para2: Pointer): HRESULT; virtual; stdcall; abstract;
    function EvictManagedTextures: HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3D7	= ^IDirect3D7;

// Error : {$IFNDEF __cplusplus} || defined ( CINTERFACE )

  IDirect3DDevice = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DDevice methods ***)
    function Initialize(Para0: IDirect3D; Para1: PGUID; Para2: LPD3DDEVICEDESC): HRESULT; virtual; stdcall; abstract;
    function GetCaps(Para0: LPD3DDEVICEDESC; Para1: LPD3DDEVICEDESC): HRESULT; virtual; stdcall; abstract;
    function SwapTextureHandles(Para0: IDirect3DTexture; Para1: IDirect3DTexture): HRESULT; virtual; stdcall; abstract;
    function CreateExecuteBuffer(Para0: LPD3DEXECUTEBUFFERDESC; var Para1: IDirect3DExecuteBuffer;
	 Para2: IUnknown): HRESULT; virtual; stdcall; abstract;
    function GetStats(Para0: LPD3DSTATS): HRESULT; virtual; stdcall; abstract;
    function Execute(Para0: IDirect3DExecuteBuffer; Para1: IDirect3DViewport; Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function AddViewport(Para0: IDirect3DViewport): HRESULT; virtual; stdcall; abstract;
    function DeleteViewport(Para0: IDirect3DViewport): HRESULT; virtual; stdcall; abstract;
    function NextViewport(Para0: IDirect3DViewport; var Para1: IDirect3DViewport;
	 Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function Pick(Para0: IDirect3DExecuteBuffer; Para1: IDirect3DViewport; Para2: DWORD;
	 Para3: LPD3DRECT): HRESULT; virtual; stdcall; abstract;
    function GetPickRecords(Para0: PWORD; Para1: LPD3DPICKRECORD): HRESULT; virtual; stdcall; abstract;
    function EnumTextureFormats(Para0: LPD3DENUMTEXTUREFORMATSCALLBACK; Para1: Pointer): HRESULT; virtual; stdcall; abstract;
    function CreateMatrix(Para0: LPD3DMATRIXHANDLE): HRESULT; virtual; stdcall; abstract;
    function SetMatrix(Para0: D3DMATRIXHANDLE; const Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function GetMatrix(Para0: D3DMATRIXHANDLE; Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function DeleteMatrix(Para0: D3DMATRIXHANDLE): HRESULT; virtual; stdcall; abstract;
    function BeginScene: HRESULT; virtual; stdcall; abstract;
    function EndScene: HRESULT; virtual; stdcall; abstract;
    function GetDirect3D(var Para0: IDirect3D): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DDEVICE	= ^IDirect3DDevice;


  IDirect3DDevice2 = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DDevice2 methods ***)
    function GetCaps(Para0: LPD3DDEVICEDESC; Para1: LPD3DDEVICEDESC): HRESULT; virtual; stdcall; abstract;
    function SwapTextureHandles(Para0: IDirect3DTexture2; Para1: IDirect3DTexture2): HRESULT; virtual; stdcall; abstract;
    function GetStats(Para0: LPD3DSTATS): HRESULT; virtual; stdcall; abstract;
    function AddViewport(Para0: IDirect3DViewport2): HRESULT; virtual; stdcall; abstract;
    function DeleteViewport(Para0: IDirect3DViewport2): HRESULT; virtual; stdcall; abstract;
    function NextViewport(Para0: IDirect3DViewport2; var Para1: IDirect3DViewport2;
	 Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function EnumTextureFormats(Para0: LPD3DENUMTEXTUREFORMATSCALLBACK; Para1: Pointer): HRESULT; virtual; stdcall; abstract;
    function BeginScene: HRESULT; virtual; stdcall; abstract;
    function EndScene: HRESULT; virtual; stdcall; abstract;
    function GetDirect3D(var Para0: IDirect3D2): HRESULT; virtual; stdcall; abstract;
    function SetCurrentViewport(Para0: IDirect3DViewport2): HRESULT; virtual; stdcall; abstract;
    function GetCurrentViewport(var Para0: IDirect3DViewport2): HRESULT; virtual; stdcall; abstract;
    function SetRenderTarget(Para0: IDirectDrawSurface; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetRenderTarget(var Para0: IDirectDrawSurface): HRESULT; virtual; stdcall; abstract;
    function _Begin(Para0: D3DPRIMITIVETYPE; Para1: D3DVERTEXTYPE; Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function BeginIndexed(Para0: D3DPRIMITIVETYPE; Para1: D3DVERTEXTYPE; Para2: Pointer;
	 Para3: DWORD; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function Vertex(Para0: Pointer): HRESULT; virtual; stdcall; abstract;
    function Index(Para0: WORD): HRESULT; virtual; stdcall; abstract;
    function _End(Para0: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetRenderState(Para0: D3DRENDERSTATETYPE; Para1: PWORD): HRESULT; virtual; stdcall; abstract;
    function SetRenderState(Para0: D3DRENDERSTATETYPE; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetLightState(Para0: D3DLIGHTSTATETYPE; Para1: PWORD): HRESULT; virtual; stdcall; abstract;
    function SetLightState(Para0: D3DLIGHTSTATETYPE; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function SetTransform(Para0: D3DTRANSFORMSTATETYPE; Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function GetTransform(Para0: D3DTRANSFORMSTATETYPE; Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function MultiplyTransform(Para0: D3DTRANSFORMSTATETYPE; Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function DrawPrimitive(Para0: D3DPRIMITIVETYPE; Para1: D3DVERTEXTYPE; Para2: Pointer;
	 Para3: DWORD; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function DrawIndexedPrimitive(Para0: D3DPRIMITIVETYPE; Para1: D3DVERTEXTYPE;
	 Para2: Pointer; Para3: DWORD; Para4: PWORD; Para5: DWORD; Para6: DWORD): HRESULT; virtual; stdcall; abstract;
    function SetClipStatus(Para0: LPD3DCLIPSTATUS): HRESULT; virtual; stdcall; abstract;
    function GetClipStatus(Para0: LPD3DCLIPSTATUS): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DDEVICE2	= ^IDirect3DDevice2;


  IDirect3DDevice3 = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DDevice3 methods ***)
    function GetCaps(Para0: LPD3DDEVICEDESC; Para1: LPD3DDEVICEDESC): HRESULT; virtual; stdcall; abstract;
    function GetStats(Para0: LPD3DSTATS): HRESULT; virtual; stdcall; abstract;
    function AddViewport(Para0: IDirect3DViewport3): HRESULT; virtual; stdcall; abstract;
    function DeleteViewport(Para0: IDirect3DViewport3): HRESULT; virtual; stdcall; abstract;
    function NextViewport(Para0: IDirect3DViewport3; var Para1: IDirect3DViewport3; 
	 Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function EnumTextureFormats(Para0: LPD3DENUMPIXELFORMATSCALLBACK; Para1: Pointer): HRESULT; virtual; stdcall; abstract;
    function BeginScene: HRESULT; virtual; stdcall; abstract;
    function EndScene: HRESULT; virtual; stdcall; abstract;
    function GetDirect3D(var Para0: IDirect3D3): HRESULT; virtual; stdcall; abstract;
    function SetCurrentViewport(Para0: IDirect3DViewport3): HRESULT; virtual; stdcall; abstract;
    function GetCurrentViewport(var Para0: IDirect3DViewport3): HRESULT; virtual; stdcall; abstract;
    function SetRenderTarget(Para0: IDirectDrawSurface4; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetRenderTarget(var Para0: IDirectDrawSurface4): HRESULT; virtual; stdcall; abstract;
    function _Begin(Para0: D3DPRIMITIVETYPE; Para1: DWORD; Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function BeginIndexed(Para0: D3DPRIMITIVETYPE; Para1: DWORD; Para2: Pointer;
	 Para3: DWORD; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function Vertex(Para0: Pointer): HRESULT; virtual; stdcall; abstract;
    function Index(Para0: WORD): HRESULT; virtual; stdcall; abstract;
    function _End(Para0: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetRenderState(Para0: D3DRENDERSTATETYPE; Para1: PWORD): HRESULT; virtual; stdcall; abstract;
    function SetRenderState(Para0: D3DRENDERSTATETYPE; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetLightState(Para0: D3DLIGHTSTATETYPE; Para1: PWORD): HRESULT; virtual; stdcall; abstract;
    function SetLightState(Para0: D3DLIGHTSTATETYPE; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function SetTransform(Para0: D3DTRANSFORMSTATETYPE; Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function GetTransform(Para0: D3DTRANSFORMSTATETYPE; Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function MultiplyTransform(Para0: D3DTRANSFORMSTATETYPE; Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function DrawPrimitive(Para0: D3DPRIMITIVETYPE; Para1: DWORD; Para2: Pointer;
	 Para3: DWORD; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function DrawIndexedPrimitive(Para0: D3DPRIMITIVETYPE; Para1: DWORD; Para2: Pointer;
	 Para3: DWORD; Para4: PWORD; Para5: DWORD; Para6: DWORD): HRESULT; virtual; stdcall; abstract;
    function SetClipStatus(Para0: LPD3DCLIPSTATUS): HRESULT; virtual; stdcall; abstract;
    function GetClipStatus(Para0: LPD3DCLIPSTATUS): HRESULT; virtual; stdcall; abstract;
    function DrawPrimitiveStrided(Para0: D3DPRIMITIVETYPE; Para1: DWORD; Para2: LPD3DDRAWPRIMITIVESTRIDEDDATA;
	 Para3: DWORD; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function DrawIndexedPrimitiveStrided(Para0: D3DPRIMITIVETYPE; Para1: DWORD;
	 Para2: LPD3DDRAWPRIMITIVESTRIDEDDATA; Para3: DWORD; Para4: PWORD; Para5: DWORD; 
	 Para6: DWORD): HRESULT; virtual; stdcall; abstract;
    function DrawPrimitiveVB(Para0: D3DPRIMITIVETYPE; Para1: IDirect3DVertexBuffer;
	 Para2: DWORD; Para3: DWORD; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function DrawIndexedPrimitiveVB(Para0: D3DPRIMITIVETYPE; Para1: IDirect3DVertexBuffer;
	 Para2: PWORD; Para3: DWORD; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function ComputeSphereVisibility(Para0: LPD3DVECTOR; Para1: LPD3DVALUE; Para2: DWORD;
	 Para3: DWORD; Para4: PWORD): HRESULT; virtual; stdcall; abstract;
    function GetTexture(Para0: DWORD; var Para1: IDirect3DTexture2): HRESULT; virtual; stdcall; abstract;
    function SetTexture(Para0: DWORD; Para1: IDirect3DTexture2): HRESULT; virtual; stdcall; abstract;
    function GetTextureStageState(Para0: DWORD; Para1: D3DTEXTURESTAGESTATETYPE;
	 Para2: PWORD): HRESULT; virtual; stdcall; abstract;
    function SetTextureStageState(Para0: DWORD; Para1: D3DTEXTURESTAGESTATETYPE;
	 Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function ValidateDevice(Para0: PWORD): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DDEVICE3	= ^IDirect3DDevice3;


  IDirect3DDevice7 = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DDevice7 methods ***)
    function GetCaps(Para0: LPD3DDEVICEDESC7): HRESULT; virtual; stdcall; abstract;
    function EnumTextureFormats(Para0: LPD3DENUMPIXELFORMATSCALLBACK; Para1: Pointer): HRESULT; virtual; stdcall; abstract;
    function BeginScene: HRESULT; virtual; stdcall; abstract;
    function EndScene: HRESULT; virtual; stdcall; abstract;
    function GetDirect3D(var Para0: IDirect3D7): HRESULT; virtual; stdcall; abstract;
    function SetRenderTarget(Para0: IDirectDrawSurface7; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetRenderTarget(var Para0: IDirectDrawSurface7): HRESULT; virtual; stdcall; abstract;
    function Clear(Para0: DWORD; Para1: LPD3DRECT; Para2: DWORD; Para3: D3DCOLOR; 
	 Para4: D3DVALUE; Para5: DWORD): HRESULT; virtual; stdcall; abstract;
    function SetTransform(Para0: D3DTRANSFORMSTATETYPE; Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function GetTransform(Para0: D3DTRANSFORMSTATETYPE; Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function SetViewport(Para0: LPD3DVIEWPORT7): HRESULT; virtual; stdcall; abstract;
    function MultiplyTransform(Para0: D3DTRANSFORMSTATETYPE; Para1: LPD3DMATRIX): HRESULT; virtual; stdcall; abstract;
    function GetViewport(Para0: LPD3DVIEWPORT7): HRESULT; virtual; stdcall; abstract;
    function SetMaterial(Para0: LPD3DMATERIAL7): HRESULT; virtual; stdcall; abstract;
    function GetMaterial(Para0: LPD3DMATERIAL7): HRESULT; virtual; stdcall; abstract;
    function SetLight(Para0: DWORD; Para1: LPD3DLIGHT7): HRESULT; virtual; stdcall; abstract;
    function GetLight(Para0: DWORD; Para1: LPD3DLIGHT7): HRESULT; virtual; stdcall; abstract;
    function SetRenderState(Para0: D3DRENDERSTATETYPE; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetRenderState(Para0: D3DRENDERSTATETYPE; Para1: PWORD): HRESULT; virtual; stdcall; abstract;
    function BeginStateBlock: HRESULT; virtual; stdcall; abstract;
    function EndStateBlock(Para0: PWORD): HRESULT; virtual; stdcall; abstract;
    function PreLoad(Para0: IDirectDrawSurface7): HRESULT; virtual; stdcall; abstract;
    function DrawPrimitive(Para0: D3DPRIMITIVETYPE; Para1: DWORD; Para2: Pointer;
	 Para3: DWORD; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function DrawIndexedPrimitive(Para0: D3DPRIMITIVETYPE; Para1: DWORD; Para2: Pointer;
	 Para3: DWORD; Para4: PWORD; Para5: DWORD; Para6: DWORD): HRESULT; virtual; stdcall; abstract;
    function SetClipStatus(Para0: LPD3DCLIPSTATUS): HRESULT; virtual; stdcall; abstract;
    function GetClipStatus(Para0: LPD3DCLIPSTATUS): HRESULT; virtual; stdcall; abstract;
    function DrawPrimitiveStrided(Para0: D3DPRIMITIVETYPE; Para1: DWORD; Para2: LPD3DDRAWPRIMITIVESTRIDEDDATA;
	 Para3: DWORD; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function DrawIndexedPrimitiveStrided(Para0: D3DPRIMITIVETYPE; Para1: DWORD;
	 Para2: LPD3DDRAWPRIMITIVESTRIDEDDATA; Para3: DWORD; Para4: PWORD; Para5: DWORD; 
	 Para6: DWORD): HRESULT; virtual; stdcall; abstract;
    function DrawPrimitiveVB(Para0: D3DPRIMITIVETYPE; Para1: IDirect3DVertexBuffer7;
	 Para2: DWORD; Para3: DWORD; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function DrawIndexedPrimitiveVB(Para0: D3DPRIMITIVETYPE; Para1: IDirect3DVertexBuffer7;
	 Para2: DWORD; Para3: DWORD; Para4: PWORD; Para5: DWORD; Para6: DWORD): HRESULT; virtual; stdcall; abstract;
    function ComputeSphereVisibility(Para0: LPD3DVECTOR; Para1: LPD3DVALUE; Para2: DWORD;
	 Para3: DWORD; Para4: PWORD): HRESULT; virtual; stdcall; abstract;
    function GetTexture(Para0: DWORD; var Para1: IDirectDrawSurface7): HRESULT; virtual; stdcall; abstract;
    function SetTexture(Para0: DWORD; Para1: IDirectDrawSurface7): HRESULT; virtual; stdcall; abstract;
    function GetTextureStageState(Para0: DWORD; Para1: D3DTEXTURESTAGESTATETYPE;
	 Para2: PWORD): HRESULT; virtual; stdcall; abstract;
    function SetTextureStageState(Para0: DWORD; Para1: D3DTEXTURESTAGESTATETYPE;
	 Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function ValidateDevice(Para0: PWORD): HRESULT; virtual; stdcall; abstract;
    function ApplyStateBlock(Para0: DWORD): HRESULT; virtual; stdcall; abstract;
    function CaptureStateBlock(Para0: DWORD): HRESULT; virtual; stdcall; abstract;
    function DeleteStateBlock(Para0: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetInfo(Para0: DWORD; Para1: Pointer; Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function Load(Para0: IDirectDrawSurface7; Para1: PPoint; Para2: IDirectDrawSurface7;
	 Para3: PRect; Para4: DWORD): HRESULT; virtual; stdcall; abstract;
    function LightEnable(Para0: DWORD; Para1: BOOL): HRESULT; virtual; stdcall; abstract;
    function GetLightEnable(Para0: DWORD; var Para1: BOOL): HRESULT; virtual; stdcall; abstract;
    function SetClipPlane(Para0: DWORD; var Para1: D3DVALUE): HRESULT; virtual; stdcall; abstract;
    function GetClipPlane(Para0: DWORD; var Para1: D3DVALUE): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DDEVICE7	= ^IDirect3DDevice7;


(*
 * Execute Buffer interface
 *)

  IDirect3DExecuteBuffer = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DExecuteBuffer methods ***)
    function Initialize(Para0: IDirect3DDevice; Para1: LPD3DEXECUTEBUFFERDESC): HRESULT; virtual; stdcall; abstract;
    function Lock(Para0: LPD3DEXECUTEBUFFERDESC): HRESULT; virtual; stdcall; abstract;
    function Unlock: HRESULT; virtual; stdcall; abstract;
    function SetExecuteData(Para0: LPD3DEXECUTEDATA): HRESULT; virtual; stdcall; abstract;
    function GetExecuteData(Para0: LPD3DEXECUTEDATA): HRESULT; virtual; stdcall; abstract;
    function Validate(Para0: PWORD; Para1: LPD3DVALIDATECALLBACK; Para2: Pointer;
	 Para3: DWORD): HRESULT; virtual; stdcall; abstract;
    function Optimize(Para0: DWORD): HRESULT; virtual; stdcall; abstract;
  end;

  //LPDIRECT3DEXECUTEBUFFER	= ^IDirect3DExecuteBuffer;


(*
 * Light interfaces
 *)

  IDirect3DLight = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DLight methods ***)
    function Initialize(Para0: IDirect3D): HRESULT; virtual; stdcall; abstract;
    function SetLight(Para0: LPD3DLIGHT): HRESULT; virtual; stdcall; abstract;
    function GetLight(Para0: LPD3DLIGHT): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DLIGHT	= ^IDirect3DLight;


(*
 * Material interfaces
 *)

  IDirect3DMaterial = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DMaterial methods ***)
    function Initialize(Para0: IDirect3D): HRESULT; virtual; stdcall; abstract;
    function SetMaterial(Para0: LPD3DMATERIAL): HRESULT; virtual; stdcall; abstract;
    function GetMaterial(Para0: LPD3DMATERIAL): HRESULT; virtual; stdcall; abstract;
    function GetHandle(Para0: IDirect3DDevice; Para1: LPD3DMATERIALHANDLE): HRESULT; virtual; stdcall; abstract;
    function Reserve: HRESULT; virtual; stdcall; abstract;
    function Unreserve: HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DMATERIAL	= ^IDirect3DMaterial;


  IDirect3DMaterial2 = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DMaterial2 methods ***)
    function SetMaterial(Para0: LPD3DMATERIAL): HRESULT; virtual; stdcall; abstract;
    function GetMaterial(Para0: LPD3DMATERIAL): HRESULT; virtual; stdcall; abstract;
    function GetHandle(Para0: IDirect3DDevice2; Para1: LPD3DMATERIALHANDLE): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DMATERIAL2	= ^IDirect3DMaterial2;


  IDirect3DMaterial3 = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DMaterial3 methods ***)
    function SetMaterial(Para0: LPD3DMATERIAL): HRESULT; virtual; stdcall; abstract;
    function GetMaterial(Para0: LPD3DMATERIAL): HRESULT; virtual; stdcall; abstract;
    function GetHandle(Para0: IDirect3DDevice3; Para1: LPD3DMATERIALHANDLE): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DMATERIAL3	= ^IDirect3DMaterial3;


(*
 * Texture interfaces
 *)

  IDirect3DTexture = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DTexture methods ***)
    function Initialize(Para0: IDirect3DDevice; Para1: IDirectDrawSurface): HRESULT; virtual; stdcall; abstract;
    function GetHandle(Para0: IDirect3DDevice; Para1: LPD3DTEXTUREHANDLE): HRESULT; virtual; stdcall; abstract;
    function PaletteChanged(Para0: DWORD; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function Load(Para0: IDirect3DTexture): HRESULT; virtual; stdcall; abstract;
    function Unload: HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DTEXTURE	= ^IDirect3DTexture;


  IDirect3DTexture2 = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DTexture2 methods ***)
    function GetHandle(Para0: IDirect3DDevice2; Para1: LPD3DTEXTUREHANDLE): HRESULT; virtual; stdcall; abstract;
    function PaletteChanged(Para0: DWORD; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function Load(Para0: IDirect3DTexture2): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DTEXTURE2	= ^IDirect3DTexture2;


(*
 * Viewport interfaces
 *)

  IDirect3DViewport = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DViewport methods ***)
    function Initialize(Para0: IDirect3D): HRESULT; virtual; stdcall; abstract;
    function GetViewport(Para0: LPD3DVIEWPORT): HRESULT; virtual; stdcall; abstract;
    function SetViewport(Para0: LPD3DVIEWPORT): HRESULT; virtual; stdcall; abstract;
    function TransformVertices(Para0: DWORD; Para1: LPD3DTRANSFORMDATA; Para2: DWORD;
	 Para3: PWORD): HRESULT; virtual; stdcall; abstract;
    function LightElements(Para0: DWORD; Para1: LPD3DLIGHTDATA): HRESULT; virtual; stdcall; abstract;
    function SetBackground(Para0: D3DMATERIALHANDLE): HRESULT; virtual; stdcall; abstract;
    function GetBackground(Para0: LPD3DMATERIALHANDLE; Para1: PBOOL): HRESULT; virtual; stdcall; abstract;
    function SetBackgroundDepth(Para0: IDirectDrawSurface): HRESULT; virtual; stdcall; abstract;
    function GetBackgroundDepth(var Para0: IDirectDrawSurface; Para1: PBOOL): HRESULT; virtual; stdcall; abstract;
    function Clear(Para0: DWORD; Para1: LPD3DRECT; Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function AddLight(Para0: IDirect3DLight): HRESULT; virtual; stdcall; abstract;
    function DeleteLight(Para0: IDirect3DLight): HRESULT; virtual; stdcall; abstract;
    function NextLight(Para0: IDirect3DLight; var Para1: IDirect3DLight; Para2: DWORD): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DVIEWPORT	= ^IDirect3DViewport;



  IDirect3DViewport2 = class ( IDirect3DViewport )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DViewport methods ***)
    {
    function Initialize(Para0: IDirect3D): HRESULT; virtual; stdcall; abstract;
    function GetViewport(Para0: LPD3DVIEWPORT): HRESULT; virtual; stdcall; abstract;
    function SetViewport(Para0: LPD3DVIEWPORT): HRESULT; virtual; stdcall; abstract;
    function TransformVertices(Para0: DWORD; Para1: LPD3DTRANSFORMDATA; Para2: DWORD;
	 Para3: PWORD): HRESULT; virtual; stdcall; abstract;
    function LightElements(Para0: DWORD; Para1: LPD3DLIGHTDATA): HRESULT; virtual; stdcall; abstract;
    function SetBackground(Para0: D3DMATERIALHANDLE): HRESULT; virtual; stdcall; abstract;
    function GetBackground(Para0: LPD3DMATERIALHANDLE; Para1: PBOOL): HRESULT; virtual; stdcall; abstract;
    function SetBackgroundDepth(Para0: IDirectDrawSurface): HRESULT; virtual; stdcall; abstract;
    function GetBackgroundDepth(var Para0: IDirectDrawSurface; Para1: PBOOL): HRESULT; virtual; stdcall; abstract;
    function Clear(Para0: DWORD; Para1: LPD3DRECT; Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function AddLight(Para0: IDirect3DLight): HRESULT; virtual; stdcall; abstract;
    function DeleteLight(Para0: IDirect3DLight): HRESULT; virtual; stdcall; abstract;
    function NextLight(Para0: IDirect3DLight; var Para1: IDirect3DLight; Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    }
    function GetViewport2(Para0: LPD3DVIEWPORT2): HRESULT; virtual; stdcall; abstract;
    function SetViewport2(Para0: LPD3DVIEWPORT2): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DVIEWPORT2	= ^IDirect3DViewport2;


  IDirect3DViewport3 = class ( IDirect3DViewport2 )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DViewport2 methods ***)
    {
    function Initialize(Para0: IDirect3D): HRESULT; virtual; stdcall; abstract;
    function GetViewport(Para0: LPD3DVIEWPORT): HRESULT; virtual; stdcall; abstract;
    function SetViewport(Para0: LPD3DVIEWPORT): HRESULT; virtual; stdcall; abstract;
    function TransformVertices(Para0: DWORD; Para1: LPD3DTRANSFORMDATA; Para2: DWORD;
	 Para3: PWORD): HRESULT; virtual; stdcall; abstract;
    function LightElements(Para0: DWORD; Para1: LPD3DLIGHTDATA): HRESULT; virtual; stdcall; abstract;
    function SetBackground(Para0: D3DMATERIALHANDLE): HRESULT; virtual; stdcall; abstract;
    function GetBackground(Para0: LPD3DMATERIALHANDLE; Para1: PBOOL): HRESULT; virtual; stdcall; abstract;
    function SetBackgroundDepth(Para0: IDirectDrawSurface): HRESULT; virtual; stdcall; abstract;
    function GetBackgroundDepth(var Para0: IDirectDrawSurface; Para1: PBOOL): HRESULT; virtual; stdcall; abstract;
    function Clear(Para0: DWORD; Para1: LPD3DRECT; Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function AddLight(Para0: IDirect3DLight): HRESULT; virtual; stdcall; abstract;
    function DeleteLight(Para0: IDirect3DLight): HRESULT; virtual; stdcall; abstract;
    function NextLight(Para0: IDirect3DLight; var Para1: IDirect3DLight; Para2: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetViewport2(Para0: LPD3DVIEWPORT2): HRESULT; virtual; stdcall; abstract;
    function SetViewport2(Para0: LPD3DVIEWPORT2): HRESULT; virtual; stdcall; abstract;
    }
    function SetBackgroundDepth2(Para0: IDirectDrawSurface4): HRESULT; virtual; stdcall; abstract;
    function GetBackgroundDepth2(var Para0: IDirectDrawSurface4; Para1: PBOOL): HRESULT; virtual; stdcall; abstract;
    function Clear2(Para0: DWORD; Para1: LPD3DRECT; Para2: DWORD; Para3: D3DCOLOR;
	 Para4: D3DVALUE; Para5: DWORD): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DVIEWPORT3	= ^IDirect3DViewport3;


  IDirect3DVertexBuffer = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DVertexBuffer methods ***)
    function Lock(Para0: DWORD; var Para1: Pointer; Para2: PWORD): HRESULT; virtual; stdcall; abstract;
    function Unlock: HRESULT; virtual; stdcall; abstract;
    function ProcessVertices(Para0: DWORD; Para1: DWORD; Para2: DWORD; Para3: IDirect3DVertexBuffer;
	 Para4: DWORD; Para5: IDirect3DDevice3; Para6: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetVertexBufferDesc(Para0: LPD3DVERTEXBUFFERDESC): HRESULT; virtual; stdcall; abstract;
    function Optimize(Para0: IDirect3DDevice3; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DVERTEXBUFFER	= ^IDirect3DVertexBuffer;


  IDirect3DVertexBuffer7 = class ( IUnknown )
(*** IUnknown methods ***)
//    function QueryInterface(riid: TIID; var ppvObj: Pointer): HRESULT; virtual; stdcall; abstract;
//    function AddRef: ULONG; virtual; stdcall; abstract;
//    function Release: ULONG; virtual; stdcall; abstract;

(*** IDirect3DVertexBuffer7 methods ***)
    function Lock(Para0: DWORD; var Para1: Pointer; Para2: PWORD): HRESULT; virtual; stdcall; abstract;
    function Unlock: HRESULT; virtual; stdcall; abstract;
    function ProcessVertices(Para0: DWORD; Para1: DWORD; Para2: DWORD; Para3: IDirect3DVertexBuffer7;
	 Para4: DWORD; Para5: IDirect3DDevice7; Para6: DWORD): HRESULT; virtual; stdcall; abstract;
    function GetVertexBufferDesc(Para0: LPD3DVERTEXBUFFERDESC): HRESULT; virtual; stdcall; abstract;
    function Optimize(Para0: IDirect3DDevice7; Para1: DWORD): HRESULT; virtual; stdcall; abstract;
    function ProcessVerticesStrided(Para0: DWORD; Para1: DWORD; Para2: DWORD; Para3: LPD3DDRAWPRIMITIVESTRIDEDDATA;
	 Para4: DWORD; Para5: IDirect3DDevice7; Para6: DWORD): HRESULT; virtual; stdcall; abstract;
  end;

//  LPDIRECT3DVERTEXBUFFER7	= ^IDirect3DVertexBuffer7;



const
(****************************************************************************
 *
 * Flags for IDirect3DDevice::NextViewport
 *
 ****************************************************************************)

(*
 * Return the next viewport
 *)
  D3DNEXT_NEXT	= $00000001;

(*
 * Return the first viewport
 *)
  D3DNEXT_HEAD	= $00000002;

(*
 * Return the last viewport
 *)
  D3DNEXT_TAIL	= $00000004;


(****************************************************************************
 *
 * Flags for DrawPrimitive/DrawIndexedPrimitive
 *   Also valid for Begin/BeginIndexed
 *   Also valid for VertexBuffer::CreateVertexBuffer
 ****************************************************************************)

(*
 * Wait until the device is ready to draw the primitive
 * This will cause DP to not return DDERR_WASSTILLDRAWING
 *)
  D3DDP_WAIT	= $00000001;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

// Error :  #if ( DIRECT3D_VERSION == 0x0500 )
(*
 * Hint that it is acceptable to render the primitive out of order.
 *)
  D3DDP_OUTOFORDER	= $00000002;
//{$ENDIF}


// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
(*
 * Hint that the primitives have been clipped by the application.
 *)
  D3DDP_DONOTCLIP	= $00000004;

(*
 * Hint that the extents need not be updated.
 *)
  D3DDP_DONOTUPDATEEXTENTS	= $00000008;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

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

(*
 * Hint that the lighting should not be applied on vertices.
 *)

  D3DDP_DONOTLIGHT	= $00000010;

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

(*
 * Direct3D Errors
 * DirectDraw error codes are used when errors not specified here.
 *)
  D3D_OK	= DD_OK;
  D3DERR_BADMAJORVERSION	= $887602BC;
  D3DERR_BADMINORVERSION	= $887602BD;

// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
(*
 * An invalid device was requested by the application.
 *)
  D3DERR_INVALID_DEVICE	= $887602C1;
  D3DERR_INITFAILED	= $887602C2;

(*
 * SetRenderTarget attempted on a device that was
 * QI'd off the render target.
 *)
  D3DERR_DEVICEAGGREGATED	= $887602C3;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

  D3DERR_EXECUTE_CREATE_FAILED	= $887602C6;
  D3DERR_EXECUTE_DESTROY_FAILED	= $887602C7;
  D3DERR_EXECUTE_LOCK_FAILED	= $887602C8;
  D3DERR_EXECUTE_UNLOCK_FAILED	= $887602C9;
  D3DERR_EXECUTE_LOCKED	= $887602CA;
  D3DERR_EXECUTE_NOT_LOCKED	= $887602CB;

  D3DERR_EXECUTE_FAILED	= $887602CC;
  D3DERR_EXECUTE_CLIPPED_FAILED	= $887602CD;

  D3DERR_TEXTURE_NO_SUPPORT	= $887602D0;
  D3DERR_TEXTURE_CREATE_FAILED	= $887602D1;
  D3DERR_TEXTURE_DESTROY_FAILED	= $887602D2;
  D3DERR_TEXTURE_LOCK_FAILED	= $887602D3;
  D3DERR_TEXTURE_UNLOCK_FAILED	= $887602D4;
  D3DERR_TEXTURE_LOAD_FAILED	= $887602D5;
  D3DERR_TEXTURE_SWAP_FAILED	= $887602D6;
  D3DERR_TEXTURE_LOCKED	= $887602D7;
  D3DERR_TEXTURE_NOT_LOCKED	= $887602D8;
  D3DERR_TEXTURE_GETSURF_FAILED	= $887602D9;

  D3DERR_MATRIX_CREATE_FAILED	= $887602DA;
  D3DERR_MATRIX_DESTROY_FAILED	= $887602DB;
  D3DERR_MATRIX_SETDATA_FAILED	= $887602DC;
  D3DERR_MATRIX_GETDATA_FAILED	= $887602DD;
  D3DERR_SETVIEWPORTDATA_FAILED	= $887602DE;

// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  D3DERR_INVALIDCURRENTVIEWPORT	= $887602DF;
  D3DERR_INVALIDPRIMITIVETYPE	= $887602E0;
  D3DERR_INVALIDVERTEXTYPE	= $887602E1;
  D3DERR_TEXTURE_BADSIZE	= $887602E2;
  D3DERR_INVALIDRAMPTEXTURE	= $887602E3;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

  D3DERR_MATERIAL_CREATE_FAILED	= $887602E4;
  D3DERR_MATERIAL_DESTROY_FAILED	= $887602E5;
  D3DERR_MATERIAL_SETDATA_FAILED	= $887602E6;
  D3DERR_MATERIAL_GETDATA_FAILED	= $887602E7;

// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  D3DERR_INVALIDPALETTE	= $887602E8;

  D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY	= $887602E9;
  D3DERR_ZBUFF_NEEDS_VIDEOMEMORY	= $887602EA;
  D3DERR_SURFACENOTINVIDMEM	= $887602EB;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

  D3DERR_LIGHT_SET_FAILED	= $887602EE;
// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  D3DERR_LIGHTHASVIEWPORT	= $887602EF;
  D3DERR_LIGHTNOTINTHISVIEWPORT	= $887602F0;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

  D3DERR_SCENE_IN_SCENE	= $887602F8;
  D3DERR_SCENE_NOT_IN_SCENE	= $887602F9;
  D3DERR_SCENE_BEGIN_FAILED	= $887602FA;
  D3DERR_SCENE_END_FAILED	= $887602FB;

// Error :  #if ( DIRECT3D_VERSION >= 0x0500 )
  D3DERR_INBEGIN	= $88760302;
  D3DERR_NOTINBEGIN	= $88760303;
  D3DERR_NOVIEWPORTS	= $88760304;
  D3DERR_VIEWPORTDATANOTSET	= $88760305;
  D3DERR_VIEWPORTHASNODEVICE	= $88760306;
  D3DERR_NOCURRENTVIEWPORT	= $88760307;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0500 *)

// Error :  #if ( DIRECT3D_VERSION >= 0x0600 )
  D3DERR_INVALIDVERTEXFORMAT	= $88760800;

(*
 * Attempted to CreateTexture on a surface that had a color key
 *)
  D3DERR_COLORKEYATTACHED	= $88760802;

  D3DERR_VERTEXBUFFEROPTIMIZED	= $8876080C;
  D3DERR_VBUF_CREATE_FAILED	= $8876080D;
  D3DERR_VERTEXBUFFERLOCKED	= $8876080E;
  D3DERR_VERTEXBUFFERUNLOCKFAILED	= $8876080F;

  D3DERR_ZBUFFER_NOTPRESENT	= $88760816;
  D3DERR_STENCILBUFFER_NOTPRESENT	= $88760817;

  D3DERR_WRONGTEXTUREFORMAT	= $88760818;
  D3DERR_UNSUPPORTEDCOLOROPERATION	= $88760819;
  D3DERR_UNSUPPORTEDCOLORARG	= $8876081A;
  D3DERR_UNSUPPORTEDALPHAOPERATION	= $8876081B;
  D3DERR_UNSUPPORTEDALPHAARG	= $8876081C;
  D3DERR_TOOMANYOPERATIONS	= $8876081D;
  D3DERR_CONFLICTINGTEXTUREFILTER	= $8876081E;
  D3DERR_UNSUPPORTEDFACTORVALUE	= $8876081F;
  D3DERR_CONFLICTINGRENDERSTATE	= $88760821;
  D3DERR_UNSUPPORTEDTEXTUREFILTER	= $88760822;
  D3DERR_TOOMANYPRIMITIVES	= $88760823;
  D3DERR_INVALIDMATRIX	= $88760824;
  D3DERR_TOOMANYVERTICES	= $88760825;
  D3DERR_CONFLICTINGTEXTUREPALETTE	= $88760826;

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

// Error :  #if ( DIRECT3D_VERSION >= 0x0700 )
  D3DERR_INVALIDSTATEBLOCK	= $88760834;
  D3DERR_INBEGINSTATEBLOCK	= $88760835;
  D3DERR_NOTINBEGINSTATEBLOCK	= $88760836;
//{$ENDIF}(* DIRECT3D_VERSION >= 0x0700 *)




implementation

end.
