PDA

View Full Version : DXCore 3D Engine(Irr4Delphi)



djoker
01-02-2009, 12:17 PM
hi folks .
irr4delphi now is not the wrapper is a full 3d engine for Delphi .
i modify the irrlicht to render just directx 9
this way i have full control of the render and i put same extra stuff like shaders with .fx files and hardware occlude
the engine is not ready i release this just 4 the feedback .
I’m working on extra stuff ;)
The new api is more simple and clean, the pack have 30 demos.

Best Regards: Luis Santos AKA Djoker


http://www.box.net/shared/zc92042efo


PARTICLES
http://f.imagehost.org/0846/screenshot_11302034.jpg
http://f.imagehost.org/t/0180/screenshot_11338027.jpg (http://f.imagehost.org/view/0180/screenshot_11338027)

PARTICLES AND LIGHT
http://f.imagehost.org/t/0890/screenshot_11378042.jpg (http://f.imagehost.org/view/0890/screenshot_11378042)
http://f.imagehost.org/t/0480/screenshot_11358920.jpg (http://f.imagehost.org/view/0480/screenshot_11358920)
http://f.imagehost.org/t/0887/screenshot_11363659.jpg (http://f.imagehost.org/view/0887/screenshot_11363659)
http://f.imagehost.org/t/0194/screenshot_11372203.jpg (http://f.imagehost.org/view/0194/screenshot_11372203)
http://f.imagehost.org/t/0785/screenshot_11382629.jpg (http://f.imagehost.org/view/0785/screenshot_11382629)

SIMPLE CAMERA AND MESH
http://f.imagehost.org/t/0187/screenshot_16085677.jpg (http://f.imagehost.org/view/0187/screenshot_16085677)
ANIMATED MESH
http://f.imagehost.org/t/0992/screenshot_16210687.jpg (http://f.imagehost.org/view/0992/screenshot_16210687)
QUAKE BSP WITH SHADERS
http://f.imagehost.org/t/0893/screenshot_16267566.jpg (http://f.imagehost.org/view/0893/screenshot_16267566)
http://f.imagehost.org/t/0243/screenshot_16285088.jpg (http://f.imagehost.org/view/0243/screenshot_16285088)
http://f.imagehost.org/t/0872/screenshot_16313134.jpg (http://f.imagehost.org/view/0872/screenshot_16313134)
PIXEL AND VERTEX SHADERS
http://f.imagehost.org/t/0165/screenshot_16353387.jpg (http://f.imagehost.org/view/0165/screenshot_16353387)
MESHBUILDER(CREATE WORLDS BY CODE)
http://f.imagehost.org/t/0574/screenshot_16394643.jpg (http://f.imagehost.org/view/0574/screenshot_16394643)
http://f.imagehost.org/t/0480/screenshot_16404620.jpg (http://f.imagehost.org/view/0480/screenshot_16404620)
CREATE MESH BY CODE(FULL CONTROL OF VERTEX)
http://f.imagehost.org/t/0876/screenshot_16428833.jpg (http://f.imagehost.org/view/0876/screenshot_16428833)
http://f.imagehost.org/t/0672/screenshot_16447744.jpg (http://f.imagehost.org/view/0672/screenshot_16447744)
SHADER BY FX FILE (TEXTURE MODEL AND BLEND)
http://f.imagehost.org/t/0573/screenshot_16485192.jpg (http://f.imagehost.org/view/0573/screenshot_16485192)
SCREEN SHADER EFECTS
http://f.imagehost.org/t/0512/screenshot_16505217.jpg (http://f.imagehost.org/view/0512/screenshot_16505217)
http://f.imagehost.org/t/0828/screenshot_16531710.jpg (http://f.imagehost.org/view/0828/screenshot_16531710)
http://f.imagehost.org/t/0723/screenshot_16551809.jpg (http://f.imagehost.org/view/0723/screenshot_16551809)
http://f.imagehost.org/t/0623/screenshot_16572172.jpg (http://f.imagehost.org/view/0623/screenshot_16572172)
SHADOWS
http://f.imagehost.org/t/0932/screenshot_16594810.jpg (http://f.imagehost.org/view/0932/screenshot_16594810)
http://f.imagehost.org/t/0229/screenshot_16608528.jpg (http://f.imagehost.org/view/0229/screenshot_16608528)
http://f.imagehost.org/t/0131/screenshot_16622362.jpg (http://f.imagehost.org/view/0131/screenshot_16622362)
WATER SHADER
http://f.imagehost.org/t/0440/screenshot_16646957.jpg (http://f.imagehost.org/view/0440/screenshot_16646957)
http://f.imagehost.org/t/0052/screenshot_16670661.jpg (http://f.imagehost.org/view/0052/screenshot_16670661)
COLIDER
http://f.imagehost.org/t/0643/screenshot_21278200.jpg (http://f.imagehost.org/view/0643/screenshot_21278200)
http://f.imagehost.org/t/0836/screenshot_21272391.jpg (http://f.imagehost.org/view/0836/screenshot_21272391)
TERRAINMESH WITH PRESISION LEVEL AND GEOMIPMAP
http://f.imagehost.org/t/0013/screenshot_15130412.jpg (http://f.imagehost.org/view/0013/screenshot_15130412)
http://f.imagehost.org/t/0976/screenshot_15142608.jpg (http://f.imagehost.org/view/0976/screenshot_15142608)








unit DXCore;

interface
uses windows,DXCoreTypes;

procedure Engine_Start(const caption:pwidechar;w,h,bits:integer;fullscreen:bool ean=false;vsync:boolean=false;stencilbuffer:boolea n=false;AntiAlias:boolean=false;HighPrecisionFPU:b oolean=false);cdecl ;external DX_DLL;
procedure Engine_Drop;cdecl ;external DX_DLL;


function Engine_Run:boolean;cdecl ;external DX_DLL;
procedure Engine_Close;cdecl ;external DX_DLL;

function Engine_Clear(color:dword; backBuffer:boolean=true;zBuffer:boolean=true):bool ean;cdecl ;external DX_DLL;
function Engine_BeginScene:boolean;cdecl ;external DX_DLL;
function Engine_EndScene:boolean;cdecl ;external DX_DLL;
function Engine_Flip(SourceRect:prect):boolean;cdecl ;external DX_DLL;

function Engine_GetFPS:integer;cdecl ;external DX_DLL;
function Engine_GetMaterialRender:integer;cdecl ;external DX_DLL;
function Engine_GetPrimitivesDraw:integer;cdecl ;external DX_DLL;
function Engine_GetVBODraw:integer;cdecl ;external DX_DLL;
function Engine_GetSOFDraw:integer;cdecl ;external DX_DLL;

procedure Engine_SetTextureCreationFlag(flag:TEXTURE_CREATIO N_FLAG; enabled:boolean);cdecl ;external DX_DLL;


//************************************************** ****
//*
//************************************************** ****
function LoadZipFile(const filename:pchar;ignoreCase:boolean=true;ignorePaths :boolean=true ):boolean;cdecl ;external DX_DLL;
function LoadPackFile(const filename:pchar;ignoreCase:boolean=true;ignorePaths :boolean=true ):boolean;cdecl ;external DX_DLL;
function GetWorkingDirectory:pchar;cdecl ;external DX_DLL;
function SetWorkingDirectory(const newDirectory:pchar):boolean;cdecl ;external DX_DLL;
procedure SetCursorVisible(value:boolean);cdecl ;external DX_DLL;
procedure LogWrite(const text:pchar;LEVEL:LOGLEVEL);cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****


//************************************************** ****
//*
//************************************************** ****
procedure RenderWorld;cdecl ;external DX_DLL;

procedure SetActiveCamera(ID:Void);cdecl ;external DX_DLL;
procedure SetView(Position,LookAt:vector3);cdecl ;external DX_DLL;
procedure SetCamera(Position,LookAt,UpVector:vector3);cdecl ;external DX_DLL;

procedure SetCullMeshBuffer(value:boolean);cdecl ;external DX_DLL;

function GetVideoModeCount:integer;cdecl ;external DX_DLL;
procedure GetVideeoModeResolution (index:integer;var x:integer;var y:integer);cdecl ;external DX_DLL;
procedure GetVideoModeDepth (index:integer;var d:integer);cdecl ;external DX_DLL;

procedure TakeScreenShot( dir:pchar);cdecl ;external DX_DLL;
procedure TakeScreenShotEx( filename:pchar);cdecl ;external DX_DLL;

function LockFrameRate(fps:integer):boolean;cdecl ;external DX_DLL;
function GetFrameTime:single;cdecl ;external DX_DLL;
function GetTime:integer;cdecl ;external DX_DLL;

function GetTicks:integer;cdecl ;external DX_DLL;

procedure SetTransform(state:TRANSFORMATION_STATE;const Matrix:PCMatrix4);cdecl ;external DX_DLL;
procedure GetTransform(state:TRANSFORMATION_STATE; Matrix:PCMatrix4);cdecl ;external DX_DLL;
//************************************************** ****
//* CREATE ENTITYS
//************************************************** ****
function CreateAndStripMesh(const filename:pchar;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateCamera(id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateCameraEx(Position,LookAt:vector3;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateFpsCamera(rotateSpeed:single=100.0;moveSpeed :single=0.1;jumpSpeed:single=1.0;noVerticalMovemen t:boolean=false;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateMaysCamera(rotateSpeed:single= -1500.0;zoomSpeed:single=200.0;translationSpeed:sin gle=1500.0;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreatePivot(id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateParticleSystem(withDefaultEmitter:boolean;id :integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateEntity(AnimatedMesh:Void;VBO:boolean=false;i d:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateEntityEx(const filename:pchar;VBO:boolean=false;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateStaticEntity(StaticMesh:Void;VBO:boolean=fal se;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateOctree(AnimatedMesh:Void;minimalPolysPerNode :integer=512;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateStaticOctree(StaticMesh:Void;minimalPolysPer Node:integer=512;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateQaudTree(AnimatedMesh:Void;minimalPolysPerNo de:integer=512;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateStaticQaudTree(StaticMesh:Void;minimalPolysP erNode:integer=512;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateBspTree(AnimatedMesh:Void;MaxVertex:integer; CullFrustum:boolean;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateStaticBspTree(Mesh:Void;MaxVertex:integer;Cu llFrustum:boolean;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateCube(size:single=1.0;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateSphere(radius:single=1;segments:integer=16;i d:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateCone (radius,length:single;colorTop,colorBottom:DWord;t esselation:integer=16;oblique:single=0.0;id:intege r=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateCylinder (radius,length:single;color:DWord;CloseTop:boolean =true;tesselation:integer=8;oblique:single=0.0;id: integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreatePlane ( Width, Height:single;tilesx,tilesy:integer;tu,tv:single;i d:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateHills (hillHeight:integer;countHillsX,countHillsY:single ;Width, Height:single;tilesx,tilesy:integer;tu,tv:single;i d:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateArrow (vtxColor0,vtxColor1:DWord;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateSkyBox(top,bottom,left,right,front,back:pcha r;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateSkyDome(const texture:pchar;horiRes:integer=16;vertRes:integer=8 ;texturePercentage:double=0.9;spherePercentage:dou ble=2.0;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateSkyCurve(const texture:pchar;divisions:integer=15;PlanetRadius:si ngle=500.0;AtmosphereRadius:single=900.0;hTile:sin gle=1.0; vTile:single=1.0):Void;cdecl ;external DX_DLL;
function CreateWaterSurface(mesh:Void;waveHeight:single=2.0 ;waveSpeed:single=300.0;waveLength:single=10.0;id: integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateBillboard(w,h:single;pos:vector3;color:dword ;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function Create3DText(font:Void;const text:pwidechar;w,h:single;pos:vector3;color:dword; id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateBoidFromCamera(Texture:Void;w,h:single):Void ;cdecl ;external DX_DLL;
function CreateBoid(Vbegin,VEnd:vector3;Texture:Void;w,h:si ngle):Void;cdecl ;external DX_DLL;
function CreateVolumeLight (FootColor,TailColor:DWORD;subdivU:integer=32;subd ivV:integer=32;id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
function CreateScreenQuad(id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;

//************************************************** ****
//* WATER PLANE MATRIX
//************************************************** ****

//*** bugs
function CreateWaterPlane(numx,numy:integer;h:single;id:int eger=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
procedure AddForce(id:Void;numx,numy:integer;force:single)cd ecl ;external DX_DLL;
procedure RemoveForce(id:Void;numx,numy:integer)cdecl ;external DX_DLL;
procedure AddForceCube(id:Void;beginx,beginy,endx,endy:integ er;force:single)cdecl ;external DX_DLL;
procedure RemoveForceCube(id:Void;beginx,beginy,endx,endy:in teger)cdecl ;external DX_DLL;

//************************************************** ****
//* QUAKE BSP SHADERS
//************************************************** ****
function LoadBspMesh(const filename:pchar):Void;cdecl ;external DX_DLL;
function CreateBspEntity(Mesh:Void;minimalPolysPerNode:inte ger=512 ):Void;cdecl ;external DX_DLL;

//************************************************** ****
//* LENSFLARE
//************************************************** ****

function CreateLensFlare(
const BaseTexture:pchar;
Position:vector3;
size:single;
isStatic:boolean=true;
selector:Void=nil;
id:integer=-1;parent:Void=nil):Void;cdecl ;external DX_DLL;
procedure AddRing(ID:Void;const texture:pchar;index:integer; size:single;color:dword=$FFFFFFFF);cdecl ;external DX_DLL;

//************************************************** ****
//* SAHDER WATER
//************************************************** ****

function CreateShaderWater(
const Texture:Pchar;
pos:vector3;
color:Dword;
width,
height,
renderTargetSizeWidth,
renderTargetSizeHeight:single;
id:integer=-1):Void;cdecl ;external DX_DLL;
procedure SetBlendFactor(water:Void;value:single=0.2);cdecl ;external DX_DLL;
procedure SetWaterColor(water:Void;color:dword);cdecl ;external DX_DLL;
procedure SetWindForce(water:Void;value:single=10.0);cdecl ;external DX_DLL;
procedure SetWindDirection(water:Void;x:single=0.0;y:single= 1.0);cdecl ;external DX_DLL;
procedure SetWaveHeight(water:Void;value:single=0.3);cdecl ;external DX_DLL;

//************************************************** ****
//* CREATE AND LOADMESHS
//************************************************** ****
function LoadMesh(const filename:pchar):Void;cdecl ;external DX_DLL;

function CreateTerrainMesh(MeshName:pchar;texture:pchar;hei ghtMapFileName:pchar;stretchSizex:single=10;stretc hSizey:single=10;maxHeight:single=20.0;defaultVert exBlockSizex:integer=64;defaultVertexBlockSizey:in teger=64):Void;cdecl ;external DX_DLL;
function CreateLandscapeMesh(MeshName:pchar;heightMapFileNa me:pchar;Precision:single=16;YFactor:single=0.1):V oid;cdecl ;external DX_DLL;
function CreateHillsMesh(const name:pchar;
hillHeight:integer;
countHillsX,countHillsY:single;
Width, Height:single;
tilesx,tilesy:integer;
tu,tv:single):Void;cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
procedure ShadowColor (SColor:dword);cdecl ;external DX_DLL;
procedure AmbientColor (SColor:dword);cdecl ;external DX_DLL;


function CreateLight (LIGHT_TYPE:LIGHT_TYPE;id:integer=-1;Parent:Void=nil):Void;cdecl ;external DX_DLL;
procedure LightRange (LID:Void;range:single);cdecl ;external DX_DLL;
procedure LightColorf (LID:Void;r,g,b:single);cdecl ;external DX_DLL;
procedure LightColor (LID:Void;r,g,b:integer);cdecl ;external DX_DLL;
procedure LightConeAngles (LID:Void;inner_angle,outer_angle:single);cdecl ;external DX_DLL;
procedure LightFallof (LID:Void;Falloff:single);cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
procedure PlanarTextureMapping(mesh:Void;resolution:single); cdecl ;external DX_DLL;
procedure FlipMeshSurfaces(mesh:Void);cdecl ;external DX_DLL;
procedure SetMeshVertexColors(mesh:Void;color:Dword);cdecl ;external DX_DLL;
procedure SetMeshVertexColorAlpha(mesh:Void;alpha:single);cd ecl ;external DX_DLL;

procedure ScaleMeshTCoords(mesh:Void;factorx,factory:single; layer:integer=1);cdecl ;external DX_DLL;
procedure ScaleBufferTCoords(mesh:Void;factorx,factory:singl e;layer:integer=1);cdecl ;external DX_DLL;

procedure ScaleBuffer(Buffer:Void;factor:vector3);cdecl ;external DX_DLL;
procedure ScaleMesh(mesh:Void;factor:vector3);cdecl ;external DX_DLL;

procedure RecalculateBufferNormals(mesh:Void);cdecl ;external DX_DLL;
procedure RecalculateMeshNormals(mesh:Void);cdecl ;external DX_DLL;


procedure TransformMesh(mesh:Void;matrix:PCMatrix4);cdecl ;external DX_DLL;
procedure TransformBuffer(buffer:Void;matrix:PCMatrix4);cdec l ;external DX_DLL;

procedure RotateMesh(mesh:Void;factor:vector3);cdecl ;external DX_DLL;
procedure RotateBuffer(mesh:Void;factor:vector3);cdecl ;external DX_DLL;


procedure TranslateMesh(mesh:Void;factor:vector3);cdecl ;external DX_DLL;
procedure TranslateBuffer(mesh:Void;factor:vector3);cdecl ;external DX_DLL;

//************************************************** ****
//*
//************************************************** ****
function FontCreate(const filename:pchar):Void;cdecl ;external DX_DLL;
procedure PrintText(FontID:Void;const text:pchar;x, y:integer;color:integer);cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
//Scene Entity
function EntityRoot:Void;cdecl ;external DX_DLL;

procedure EntityDrop(ID:Void);cdecl ;external DX_DLL;

//if not on scene
procedure EntityDraw(ID:Void);cdecl ;external DX_DLL;
procedure EntityAnimate(ID:Void;time:integer);cdecl ;external DX_DLL;

procedure NameEntity(ID:Void;const name:pchar);cdecl ;external DX_DLL;
function EntityName(ID:Void):pchar;cdecl ;external DX_DLL;

procedure AddEntityToDeletionQueue(ID:Void);cdecl ;external DX_DLL;

procedure AddEntityToScene(child:Void);cdecl ;external DX_DLL;

procedure PositionEntity (ID:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure PositionEntityEx (ID:Void;vector:vector3);cdecl ;external DX_DLL;
procedure EntityMove (ID:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure EntityMoveRelative(ID:Void;Front,Up,Strafe:single) ;cdecl ;external DX_DLL;
procedure EntityMoveAddSpeed(ID:Void;Trasvector:vector3;spee d:single);cdecl ;external DX_DLL;
procedure ScaleEntity (ID:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure ScaleEntityEx (ID:Void;vector:vector3);cdecl ;external DX_DLL;
procedure RotateEntity (ID:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure RotateEntityEx (ID:Void;vector:vector3);cdecl ;external DX_DLL;
procedure TurnEntity (ID:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure TurnEntityEx (ID:Void;vector:vector3);cdecl ;external DX_DLL;
procedure EntityYawPitchRoll(ID:Void;yaw,pitch,roll:single); cdecl ;external DX_DLL;
procedure EntityYaw(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityAddYaw(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityPitch(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityAddPitch(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityRoll(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityAddRoll(ID:Void;value:single);cdecl ;external DX_DLL;
procedure EntityGetRotateEx(ID:Void;var x,y,z:single);cdecl ;external DX_DLL;
function EntityGetRotate(ID:Void):vector3;cdecl ;external DX_DLL;
function EntityGetScale(ID:Void):vector3;cdecl ;external DX_DLL;
function EntityGetPosition(ID:Void):vector3;cdecl ;external DX_DLL;
procedure PointEntity(A,B:Void);cdecl ;external DX_DLL;
procedure EntityPoint(A:Void;target:vector3);cdecl ;external DX_DLL;
procedure EntityMoveToNode(A,B:Void;speed:single);cdecl ;external DX_DLL;
function EntityDistance(A,B:Void):single;cdecl ;external DX_DLL;
function EntityBoxHit(A,B:Void):boolean;cdecl ;external DX_DLL;
function EntityRadius(A:Void):vector3;cdecl ;external DX_DLL;

function MeshEntity(A:Void):Void;cdecl ;external DX_DLL;
procedure EntityMesh(ID:Void;mesh:Void);cdecl ;external DX_DLL;

procedure EntitySetShadow(ID:Void;zfailmethod:boolean=true;i nfinity:single=10000.0);cdecl ;external DX_DLL;

procedure EntityDebug(ID:Void;visible:DEBUG_SCENE_TYPE);cdec l ;external DX_DLL;

procedure VisibleEntity(id:void;value:boolean);cdecl ;external DX_DLL;
function EntityVisible(id:void):boolean;cdecl ;external DX_DLL;

function EntityTransformPoint(ID:Void;point:vector3):vector 3;cdecl ;external DX_DLL;
function EntityTransformPointEx(ID:Void;point:vector3):vect or3;cdecl ;external DX_DLL;

function EntityGetVertexPosition(ID:void;NumVertex,nMeshBuf fer:integer):vector3;cdecl ;external DX_DLL;

procedure EntityMaterialFlag(ID:Void; flag:MATERIAL_FLAG;value:boolean);cdecl ;external DX_DLL;
procedure EntityMaterialType(ID:Void;newType:MATERIAL_TYPE;n umMat:integer=0);cdecl ;external DX_DLL;
procedure EntityAllMaterialType(ID:Void; newType:MATERIAL_TYPE);cdecl ;external DX_DLL;

procedure EntityWireFrame(ID:Void;value:boolean);cdecl ;external DX_DLL;
procedure EntityLighting (ID:Void;value:boolean);cdecl ;external DX_DLL;
procedure EntityMaterialTypeParam(ID:Void;value:single);cdec l ;external DX_DLL;

procedure EntityAddString(ID:Void;Font:Void;text:pchar;color :dword);cdecl ;external DX_DLL;

procedure EntityRotateTexture(ID:Void;angle:single;index:int eger=0);cdecl ;external DX_DLL;
procedure EntityMoveTexture(ID:Void;x,y:single;index:integer =0);cdecl ;external DX_DLL;
procedure EntityScaleTexture(ID:Void;x,y:single;index:intege r=0);cdecl ;external DX_DLL;


procedure EntitySetTexture(ID:Void;layer:integer; const filename:pchar);cdecl ;external DX_DLL;
procedure EntitySetTextureEx(ID:Void;layer:integer;texture:V oid);cdecl ;external DX_DLL;

procedure EntitySetMaterialTexture(ID:Void;const filename:pchar;layer:integer=0;Material:integer=0) ;cdecl ;external DX_DLL;
procedure EntitySetMaterialTextureEx(ID:Void;texture:Void;la yer:integer=0;Material:integer=0);cdecl ;external DX_DLL;

procedure EntityAddAnimator(ID,Ani:Void);cdecl ;external DX_DLL;
procedure EntityRemoveAnimator(ID,Ani:Void);cdecl ;external DX_DLL;

procedure EntityAddChilld(ID,Child:Void);cdecl ;external DX_DLL;
function EntityRemoveChilld(ID,Child:Void):boolean;cdecl ;external DX_DLL;
function EntityGetChilld(ID:Void;Num:integer):Void;cdecl ;external DX_DLL;

procedure EntitySetEffect(ID:Void;FX:Void);cdecl ;external DX_DLL;
procedure EntitySetShader(node:Void;shader:integer);cdecl ;external dx_DLL;
procedure EntitySetShaderLayer(node:Void;layer:integer;shade r:integer);cdecl ;external dx_DLL;


//************************************************** ****
//* 3D ENTITY BEAVERS ANIMATORS
//************************************************** ****
function CreateRotationAnimator(rotationPerSecond:vector3): Void;cdecl ;external DX_DLL;
function CreateFlyCircleAnimator(center, direction:vector3;radius,speed:single):Void;cdecl ;external DX_DLL;
function CreateFlyStraightAnimator( startPoint, endPoint:vector3;timeForWay:single; loop:boolean):Void;cdecl ;external DX_DLL;
function CreateDeleteAnimator(time:integer):Void;cdecl ;external DX_DLL;
function CreateFollowSplineAnimator(NPoints:integer;Vectors :pointer;time:integer;speed,tightness:single ):Void;cdecl ;external DX_DLL;
function CreateTextureAnimator(NumTextures:integer;Textures :pointer;timePerFrame:integer;loop:boolean):Void;c decl ;external DX_DLL;
procedure DropAnimator(anim:Void)cdecl ;external DX_DLL;
//************************************************** ****
//* MODEL ANIMATIONS
//************************************************** ****
procedure SetMD2Animation(AID:Void;anim:MD2_ANIMATION_TYPE); cdecl ;external dx_DLL;
procedure SetMD2AnimationEx(AID:Void;const animationName:pchar);cdecl ;external dx_DLL;
procedure SetAnimationSpeed(AID:Void;framesPerSecond:single) ;cdecl ;external dx_DLL;
procedure SetCurrentFrame (AID:Void;frame:single);cdecl ;external dx_DLL;
procedure SetFrameLoop (AID:Void;FBegin,FEnd:integer);cdecl ;external dx_DLL;
procedure SetLoopMode (AID:Void;playAnimationLooped:boolean);cdecl ;external dx_DLL;
procedure SetTransitionTime (AID:Void;time:single);cdecl ;external dx_DLL;
function GetFrameNr (AID:Void):integer;cdecl ;external dx_DLL;
function GetStartFrame (AID:Void):integer;cdecl ;external dx_DLL;
function GetEndFrame (AID:Void):integer;cdecl ;external dx_DLL;
//************************************************** ****
//*
//************************************************** ****
function CreateCollisionResponse(TrianglesSelector:Void;Ent ity:Void;ellipsoidRadius,gravityPerSecond,ellipsoi dTranslation:vector3;slidingValue:single):Void;cde cl ;external DX_DLL;
function CreateCollisionResponseEx(TrianglesSelector:Void;E ntity:Void;gravityPerSecond,ellipsoidTranslation:v ector3;slidingValue:single):Void;cdecl ;external DX_DLL;
procedure DropColider(ID:Void);cdecl ;external DX_DLL;
procedure SetGravity(ID:Void;v:vector3);cdecl ;external DX_DLL;
procedure EllipsoidRadius (ID:Void;v:vector3);cdecl ;external DX_DLL;
procedure EllipsoidTranslation (ID:Void;V:vector3);cdecl ;external DX_DLL;
function IsFalling (ID:Void):boolean;cdecl ;external DX_DLL;
procedure SetJump(ID:Void;speed:single);cdecl ;external DX_DLL;
function GetCollisionResponse(ITriangleSelector:Void;
slidingSpeed:single;
outFalling:boolean;
ellipsoidPosition,
ellipsoidRadius,
ellipsoidDirectionAndSpeed,
gravityDirectionAndSpeed:vector3;
var triout:XTriangle):vector3;cdecl ;external DX_DLL;

//************************************************** ****
//*
//************************************************** ****
function CreateOctTreeTriangleSelector(mesh:Void;Entity:Voi d;minimalPolysPerNode:integer=32):Void;cdecl ;external DX_DLL;
function CreateTerrainTriangleSelector(TerrainEntity:Void;L OD:integer=0):Void;cdecl ;external DX_DLL;
function CreateBoxTriangleSelector(Entity:Void):Void;cdecl ;external DX_DLL;
procedure DropSelector(Selector:Void);cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
function CreateSelectorList():Void;cdecl ;external DX_DLL;
procedure DropSelectorList(SelectorList:Void);cdecl ;external DX_DLL;
procedure AddSelector(SelectorList,Selector:Void );cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
function ScreenRay(x,y:integer):XRAY;cdecl ;external dx_DLL;
function CameraRay(dist:integer):XRAY;cdecl ;external dx_DLL;
function VectorRay(Position, Target:vector3;dist:integer):XRay;cdecl ;external dx_DLL;
function Pick(line:XRAY;idBitMask:integer=0):Void;cdecl ;external DX_DLL;
function CameraPick(idBitMask:integer=0):Void;cdecl ;external DX_DLL;
function ScreenPick(x,y:integer;idBitMask:integer=0):Void;c decl ;external DX_DLL;
function RayPickTriangles(ray:XRay;Selector:Void;var outCollisionPoint:vector3;var outTriangle:XTriangle):boolean;cdecl ;external DX_DLL;
function CameraPickTriangles(Selector,Camera:Void;var outCollisionPoint:vector3;var outNormal:vector3;var outTriangle:XTriangle;dist:single=1000.0):boolean; cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
function LoadEffect(SrcFile:pchar):Void;cdecl ;external DX_DLL;
function SetEffectTexture(FXID:Void;SrcFile:pchar;texture:V oid):boolean;cdecl ;external DX_DLL;
function SetEffectTechnique(FXID:Void;name:pchar):boolean;c decl ;external DX_DLL;

//************************************************** ****
//*
//************************************************** ****
function CreateMeshBuilder:Void;cdecl ;external DX_DLL;
procedure FreeMeshBuilder(MeshBuilder:Void);cdecl ;external DX_DLL;
function AddFloor(MeshBuilder:Void;VBotomLeft,VTopRight:vec tor3; texture:Void;tu:single=1;tv:single=1):integer;cdec l ;external DX_DLL;
function AddRoof(MeshBuilder:Void;VBotomLeft,VTopRight:vect or3; texture:Void;tu:single=1;tv:single=1):integer;cdec l ;external DX_DLL;
function AddLeftWall(MeshBuilder:Void;VBotomLeft,VTopRight: vector3; texture:Void;tu:single=1;tv:single=1):integer;cdec l ;external DX_DLL;
function AddRightWall(MeshBuilder:Void;VBotomLeft,VTopRight :vector3; texture:Void;tu:single=1;tv:single=1):integer;cdec l ;external DX_DLL;
function AddWallFront(MeshBuilder:Void;VBotomLeft,VTopRight :vector3; texture:Void;tu:single=1;tv:single=1):integer;cdec l ;external DX_DLL;
function AddWallBack(MeshBuilder:Void;VBotomLeft,VTopRight: vector3; texture:Void;tu:single=1;tv:single=1):integer;cdec l ;external DX_DLL;
function AddWall(MeshBuilder:Void;position,rotation,scale:v ector3;texture:Void;tu:single=1;tv:single=1):integ er;cdecl ;external DX_DLL;

procedure SetBufferType(Mesh:Void;index:integer;mtype:MATERI AL_TYPE)cdecl ;external DX_DLL;
procedure SetBufferTexture(Mesh:Void;index:integer;texture:V oid)cdecl ;external DX_DLL;

function AddRoom(MeshBuilder:Void;VBotomLeft,VTopRight:vect or3;
TextureIDLeft:Void;
TextureIDRight:Void;
TextureIDTop:Void;
TextureIDBottom:Void;
TextureIDFront:Void;
TextureIDBack:Void;
tu:single=1;tv:single=1):integer;cdecl ;external DX_DLL;
function AddPilar(MeshBuilder:Void;pos:vector3;radius,lengt h:single;texture:Void;tu:single=1;tv:single=1;qual ity:integer=8;curve:single=0):integer;cdecl ;external DX_DLL;
function AddSurface(MeshBuilder:Void;Surface:Void;dropsurfa ce:boolean=true):integer;cdecl ;external DX_DLL;
function CreateMeshFromBuilder(MeshName:pchar;MeshBuilder:V oid;DropMesh:boolean=true):Void;cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
function CreateSurface():Void;cdecl ;external DX_DLL;
procedure SurfaceDrop (surface:Void);cdecl ;external DX_DLL;
procedure PaintSurface(surface,Brush:Void;dropBrush:boolean= true);cdecl ;external DX_DLL;
function AddVertex (surface:Void;x,y,z,u,v:single):integer;cdecl ;external DX_DLL;
function AddTriangle (surface:Void;v1,v2,v3:integer):integer;cdecl ;external DX_DLL;
procedure VertexCoords(surface:Void;index:integer;x,y,z:sing le);cdecl ;external DX_DLL;
procedure VertexNormal(surface:Void;index:integer;nx,ny,nz:s ingle);cdecl ;external DX_DLL;
procedure VertexColor (surface:Void;index:integer;r,g,b,a:integer);cdecl ;external DX_DLL;
procedure VertexTexCoords (surface:Void;index:integer;u,v:single;coord_set:i nteger=0);cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
function CreateBrush (r:integer=255;g:integer=255;b:integer=255;a:integ er=255):Void;cdecl ;external DX_DLL;
function LoadBrush (layer:integer;const texture:pchar):Void;cdecl ;external DX_DLL;
procedure BrushType (brush:Void;newType:MATERIAL_TYPE );cdecl ;external DX_DLL;
procedure BrushFlag (brush:Void;flag:MATERIAL_FLAG ;value:boolean)cdecl ;external DX_DLL;
procedure BrushDrop (brush:Void);cdecl ;external DX_DLL;
procedure BrushTexture (brush:Void;layer:integer;Textue:Void);cdecl ;external DX_DLL;
procedure BrushAlphaRef(brush:Void;value:single)cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
function CreatMeshBuffer:Void;cdecl ;external DX_DLL;
procedure DropBuffer(buffer:Void);cdecl ;external DX_DLL;
procedure RebuildBufferBBox (buffer:Void);cdecl ;external DX_DLL;
procedure DrawBuffer (buffer:Void);cdecl ;external DX_DLL;
function VertexPushBack (buffer:Void;v:S3DVertex):integer;cdecl ;external DX_DLL;
function IndicesPushBack (buffer:Void;indice:smallint):integer;cdecl ;external DX_DLL;
procedure AddBrush (buffer:Void;Brush:Void;dropbrush:boolean=true);cd ecl ;external DX_DLL;
function NumVertex(buffer:Void):integer;cdecl ;external DX_DLL;
function NumIndices(buffer:Void):integer;cdecl ;external DX_DLL;
procedure GetBufferIndices(buffer:Void;indices:pointer)cdecl ;external DX_DLL;
procedure GetBufferVertices(buffer:Void;vertices:pointer);cd ecl ;external DX_DLL;
function GetBufferBBox(buffer:Void):XBOX;cdecl ;external DX_DLL;
procedure SetBufferBBox(buffer:Void;bbox:XBOX);cdecl ;external DX_DLL;
procedure AppendVertices(Mesh:Void;vetices:pointer;numvertic es:integer;indices:p16;numindices:integer)cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
function CreatMesh ():Void;cdecl ;external DX_DLL;
procedure AddMeshBuffer (Mesh,MeshBuffer:Void;dropbuffer:boolean=true);cde cl ;external DX_DLL;
function GetBuffer (SMesh:Void;num:integer):Void;cdecl ;external DX_DLL;
function GetBBox(Mesh:Void):XBOX;cdecl ;external DX_DLL;
procedure SetBBox(Mesh:Void;bbox:XBOX);cdecl ;external DX_DLL;
function NumBuffers(Mesh:Void):integer;cdecl ;external DX_DLL;
procedure MeshUpdateBBox(Mesh:Void);cdecl ;external DX_DLL;
procedure MeshUpdateBuffers(Mesh:Void);cdecl ;external DX_DLL;
procedure MeshDrop (Mesh:Void);cdecl ;external DX_DLL;
//************************************************** ****
//* NEXT RENDER MATERIAL
//************************************************** ****
procedure NextRenderDefaults(
Wireframe:boolean=false;
PointCloud:boolean=false;
GouraudShading:boolean=false;
Lighting:boolean=false;
ZBuffer:boolean=true;
ZWriteEnable:boolean=true;
BackfaceCulling:boolean=true;
FogEnable:boolean=false;
NormalizeNormals:boolean=false);cdecl ;external DX_DLL;


procedure SetRenderTexture(tex:Void;layer:integer);cdecl ;external DX_DLL;
procedure SetRenderLighting(Lighting:boolean);cdecl ;external DX_DLL;
procedure SetRenderBackfaceCulling( BackfaceCulling:boolean);cdecl ;external DX_DLL;
procedure SetRenderType(newType:MATERIAL_TYPE);cdecl ;external DX_DLL;
procedure SetRenderFlag(flag:MATERIAL_FLAG;value:boolean);cd ecl ;external DX_DLL;
procedure SetRenderTypeParam(value:single);cdecl ;external DX_DLL;
procedure ApplyNextRender();cdecl ;external DX_DLL

//************************************************** ****
//*
//************************************************** ****
procedure Draw2DLine(x,y,x2,y2:integer;color:dword);cdecl ;external DX_DLL;
procedure DrawImage(texture:Void;x,y:integer;Color:dword;Use Alpha:boolean=true)cdecl ;external DX_DLL;
procedure DrawImagePart(texture:Void;x,y:integer;SourceRect: Trect;Color:dword;UseAlpha:boolean=true)cdecl ;external DX_DLL;
procedure DrawImageRotate(texture:Void;x,y:integer; w, h:single;rot:single;color:dword;UseAlpha:boolean=t rue)cdecl ;external DX_DLL;
procedure Draw3DGrid( countx,county,Size:integer);cdecl ;external DX_DLL;
procedure Draw3DRect(Position:vector3;Width,Deph:single);cde cl ;external DX_DLL;
procedure DrawTriangle(triangle:XTriangle;Color:dword);cdecl ;external DX_DLL;
procedure DrawCube(x,y,z,w,h,d:single;Color:DWord=$FFFFFFFF) ;cdecl ;external DX_DLL;
procedure DrawSphere(x,y,z,r:single;Color:DWord=$FFFFFFFF);c decl ;external DX_DLL;

procedure DrawVertexIndexList(vertices:pointer;vertexcount:i nteger;indices:pointer;primCount:integer;vType:VER TEX_TYPE;pType:PRIMITIVE_TYPE;iType:INDEX_TYPE);cd ecl ;external DX_DLL;
procedure DrawVertexList(vertices:pointer;vertexcount:intege r;primCount:integer;vType:VERTEX_TYPE;pType:PRIMIT IVE_TYPE);cdecl ;external DX_DLL;

//************************************************** ****
//*
//************************************************** ****
procedure TextureFree(id:Void);cdecl ;external DX_DLL;
procedure MakeTextureColorKey(id:Void;Color:dword);cdecl ;external DX_DLL;
function CreateRenderTargetTexture(w,h:integer):Void;cdecl ;external DX_DLL;
function RenderTarget(texture:Void;color:DWord=0;clearBackB uffer:boolean=true;clearZBuffer:boolean=true):bool ean;cdecl ;external DX_DLL;
procedure ResetRenderTarget;cdecl ;external DX_DLL;
procedure RenderQuad(id:Void);cdecl ;external DX_DLL;
function LoadTexture(const filetoload:pchar):Void;cdecl ;external DX_DLL;
function GetTexture(index:integer):Void;cdecl ;external DX_DLL;


//************************************************** ****
//* GEOMIPMAP TERRAIN
//************************************************** ****
function CreateTerrain(const heightMapFileName:pchar;maxLOD:integer=5;smoothFac tor:integer=0;patchSize:TERRAIN_PATCH_SIZE=ETPS_17 ;VBO:boolean=true;id:integer=-1;Parent:Void=nil):Void;cdecl ;external DX_DLL;
function GetHeight(Terrain:Void;x,y:integer):single;cdecl ;external DX_DLL;
procedure ScaleTexture(Terrain:Void;x,y:single);cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
function XBegin(primitiveType:PRIMITIVE_TYPE ):boolean;cdecl ;external DX_DLL;
procedure XVertex3f(x,y,z:single);cdecl ;external DX_DLL;
procedure XNormal3f(x,y,z:single);cdecl ;external DX_DLL;
procedure XTexCoord2f(tu,tv:single);cdecl ;external DX_DLL;
procedure XColor3f(r,g,b:single);cdecl ;external DX_DLL;
procedure XColor4f(a,r,g,b:single);cdecl ;external DX_DLL;
procedure XColor4i(a,r,g,b:integer);cdecl ;external DX_DLL;
procedure XColor3i(r,g,b:integer);cdecl ;external DX_DLL;
function XEnd():boolean;cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
procedure XApplyMatrix;cdecl ;external DX_DLL;
procedure XLoadIdentity;cdecl ;external DX_DLL;
procedure XTranslatef(x,y,z:single);cdecl ;external DX_DLL;
procedure XRotatef(a,x,y,z:single);cdecl ;external DX_DLL;
procedure XScalef(x,y,z:single);cdecl ;external DX_DLL;
function XPushMatrix:boolean;cdecl ;external DX_DLL;
function XPopMatrix:boolean;cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
procedure SetFarValue (CameraNode:Void;fFar:single);cdecl ;external DX_DLL;
procedure SetNearValue (CameraNode:Void;fNear:single);cdecl ;external DX_DLL;
procedure SetAspectRatio(CameraNode:Void;faspect:single);cde cl ;external DX_DLL;
procedure SetFOV (CameraNode:Void;fFovy:single);cdecl ;external DX_DLL;

procedure TurnRight(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure TurnLeft(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure TurnUp(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure TurnDown(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure MoveForward(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure MoveBack(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure MoveRight(camera:Void;acc:single);cdecl ;external DX_DLL;
procedure MoveLeft(camera:Void;acc:single);cdecl ;external DX_DLL;

function GetViewBox(camera:Void):XBOX;cdecl ;external DX_DLL;

procedure SetTarget(CameraNode:Void;x,y,z:single);cdecl ;external DX_DLL;
procedure SetTargetEx(CameraNode:Void;vec:vector3);cdecl ;external DX_DLL;


function GetActiveCamera():Void;cdecl ;external DX_DLL;
function GetTarget(Camera:Void):vector3;cdecl ;external DX_DLL;
function GetUpVector(Camera:Void):vector3;cdecl ;external DX_DLL;
function GetRotation(Camera:Void):vector3;cdecl ;external DX_DLL;

procedure FollowingNode(IDCamera,IDTargetNod:Void;Distance,A ltitudeCamera,DeltaCible:single);cdecl ;external DX_DLL;
procedure CockpitFollowing(IDCamera,IDTargetNod:Void;offset: vector3);cdecl ;external DX_DLL;
procedure FollowingNodeWithSpring(IDCamera,IDTargetNod:Void;
offset:vector3;
offsetDistance,dampingConstant,springConstant,elap sedTimeSec:single);cdecl ;external DX_DLL;

//************************************************** ****
//*
//************************************************** ****

function CreateFadeOutAffector(Par:Void;TargetColor:dword;t imeNeededToFadeOut:integer=1000):Void;cdecl ;external dx_DLL;
function CreateAttractionAffector(Par:Void;point:VECTOR3;
speed:single=1.0;
attract:boolean=true;
affectX:boolean=true;
affectY:boolean=true;
affectZ:boolean=true):Void;cdecl ;external dx_DLL;
function CreateGravityAffector( Par:Void;gravity:VECTOR3;timeForceLost:integer=100 0):Void;cdecl ;external dx_DLL;
function CreateRotationAffector(Par:Void; speed,pivotPoint:VECTOR3):Void;cdecl ;external dx_DLL;
function CreateScaleAffector(Par:Void;scaletoX,scaleToY:sin gle):Void;cdecl ;external dx_DLL;
function CreateUserAffector(Par:Void;Userdata:TParticleCall Bak):Void;cdecl ;external dx_DLL;
function CreateDroperAffector(Par:Void;when:integer):Void;c decl ;external dx_DLL;

procedure SetMinParticlesPerSecond(EM:Void;minPPS:integer);c decl ;external dx_DLL;
procedure SetMaxParticlesPerSecond(EM:Void;maxPPS:integer);c decl ;external dx_DLL;
procedure SetMinStartColor(EM:Void;Color:dword);cdecl ;external dx_DLL;
procedure SetMaxStartColor(EM:Void;Color:dword);cdecl ;external dx_DLL;
procedure SetMaxStartSize(EM:Void;mw,mh:single);cdecl ;external dx_DLL;
procedure SetMinStartSize(EM:Void;mw,mh:single);cdecl ;external dx_DLL;

procedure ParticlesSize(ParticlID:void;w,h:single);cdecl ;external dx_DLL;

procedure DropEmitter(Emitter:Void);cdecl ;external dx_DLL;
procedure DropAffector(Affector:Void);cdecl ;external dx_DLL;

procedure SetEmitter(System,Emitter:void);cdecl ;external dx_DLL;
procedure AddAffector(System,Affector:void);cdecl ;external dx_DLL;

function CreateBoxEmitter(Par:Void;
BoxXMin,
BoxYMin,
BoxZMin,
BoxXMax,
BoxYMax,
BoxZMax:single;
direction:VECTOR3;
minStartColor:dword=$FF;
maxStartColor:dword=$FFFFFFFF;
minParticlesPerSecond:integer=5;
maxParticlesPerSecond:integer=10;
lifeTimeMin:integer=2000;
lifeTimeMax:integer=4000;
maxAngleDegrees:double=0;
minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
maxStartSizeX:single=5.0;maxStartSizeY:single=5.0) :Void;cdecl ;external dx_DLL;





function CreateMeshEmitter(Par:Void;
Node:Void;
direction:VECTOR3;
minStartColor:dword=$FF;
maxStartColor:dword=$FFFFFFFF;
normalDirectionModifier:single=100.0;
mbNumber:integer=-1;
everyMeshVertex:boolean=false;
useNormalDirection:boolean=true;
minParticlesPerSecond:integer=100;
maxParticlesPerSecond:integer=200;
lifeTimeMin:integer=800;
lifeTimeMax:integer=2000;
maxAngleDegrees:double=0;
minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
maxStartSizeX:single=5.0;maxStartSizeY:single=5.0) :Void;cdecl ;external dx_DLL;



function CreateCylinderEmitter(
Par:Void;
Center:VECTOR3;
radius:single;
Normal:VECTOR3;
length:single;
Direction:VECTOR3;
minStartColor:dword=$FF;
maxStartColor:dword=$FFFFFFFF;
outlineOnly:boolean=false;
minParticlesPerSecond:integer=15;
maxParticlesPerSecond:integer=20;
lifeTimeMin:integer=2000;
lifeTimeMax:integer=4000;
maxAngleDegrees:double=0;
minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
maxStartSizeX:single=5.0;maxStartSizeY:single=5.0) :Void;cdecl ;external dx_DLL;





function CreatePointEmitter(
Par:Void;
Direction:VECTOR3;
minStartColor:dword=$FF;
maxStartColor:dword=$FFFFFFFF;
minParticlesPerSecond:integer=25;
maxParticlesPerSecond:integer=30;
lifeTimeMin:integer=2000;
lifeTimeMax:integer=4000;
maxAngleDegrees:double=0;
minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
maxStartSizeX:single=5.0;maxStartSizeY:single=5.0) :Void;cdecl ;external dx_DLL;




function CreateRingEmitter(
Par:Void;
center:VECTOR3;
radius:single;
ringThickness:single;
Direction:VECTOR3;
minStartColor:dword=$FF;
maxStartColor:dword=$FFFFFFFF;

minParticlesPerSecond:integer=25;
maxParticlesPerSecond:integer=30;
lifeTimeMin:integer=2000;
lifeTimeMax:integer=4000;
maxAngleDegrees:double=0;
minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
maxStartSizeX:single=5.0;maxStartSizeY:single=5.0) :Void;cdecl ;external dx_DLL;



function CreateSphereEmitter( Par:Void;
center:VECTOR3;
radius:single;
Direction:VECTOR3;
minStartColor:dword=$FF;
maxStartColor:dword=$FFFFFFFF;
minParticlesPerSecond:integer=5;
maxParticlesPerSecond:integer=10;
lifeTimeMin:integer=2000;
lifeTimeMax:integer=4000;
maxAngleDegrees:double=0;
minStartSizeX:Single=5.0;minStartSizeY:single=5.0;
maxStartSizeX:single=5.0;maxStartSizeY:single=5.0) :Void;cdecl ;external dx_DLL;


//************************************************** ****
//*
//************************************************** ****

function Matrix_GetScale(const Matrix:PCMatrix4):vector3;cdecl ;external dx_DLL;
function Matrix_GetTranslation(const Matrix:PCMatrix4):vector3;cdecl ;external dx_DLL;
function Matrix_GetRotationDegrees(const Matrix:PCMatrix4):vector3;cdecl ;external dx_DLL;
procedure Matrix_GetTranformations(const Matrix:PCMatrix4;var Pos,Rot,Scale:vector3);cdecl ;external dx_DLL;
function Matrix_TransformVect(const Matrix:PCMatrix4;const vect:vector3):vector3;cdecl ;external dx_DLL;
procedure Matrix_SetTrasform(Matrix:PCMatrix4;Traslate:vecto r3 ;Rotation:vector3 ;Scale:vector3 );cdecl ;external dx_DLL;
procedure Matrix_SetTrasformXMat(Matrix:PCMatrix4;const newMatrix:PCMatrix4 ;Traslate:vector3 ;Rotation:vector3 ;Scale:vector3 );cdecl ;external dx_DLL;
procedure Matrix_GetAbsTransformNode(node:Void; Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_GetTransformNode(node:Void; Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_SeByNode(node:Void);cdecl ;external dx_DLL;
procedure Matrix_GetAbsTransformCamera(node:Void; Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_GetTransformCamera(node:Void; Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_MultWithCamera(Matrix:PCMatrix4;node:Void;c onst OutMatrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_SetTransformNode(node:Void;const Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_Traslate( Matrix:PCMatrix4; x , y,z:single);cdecl ;external dx_DLL;
procedure Matrix_RotateInDegrees( Matrix:PCMatrix4; x , y,z:single);cdecl ;external dx_DLL;
procedure Matrix_RotateInRadians( Matrix:PCMatrix4; x , y,z:single);cdecl ;external dx_DLL;
procedure Matrix_Scale( Matrix:PCMatrix4; x , y,z:single);cdecl ;external dx_DLL;
procedure Matrix_Mult(Matrix:PCMatrix4;const AMat:PCMatrix4;const BMat:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_Add(Matrix, AMat ,BMat:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_Sub(Matrix, AMat ,BMat:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_MakeIdentity(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure Matrix_BuildShadowMatrix(Matrix:PCmatrix4;light:ve ctor3;plane:XPlane;point:single=1.0000);cdecl ;external dx_DLL;
procedure Matrix_TextureScale(Matrix:PCMatrix4;sx,sy:single) ;cdecl ;external dx_DLL;
procedure Matrix_TextureRotationCenter(Matrix:PCMatrix4;radA ngle:single);cdecl ;external dx_DLL;
procedure Matrix_TextureScaleCenter(Matrix:PCMatrix4;sx,sy:s ingle);cdecl ;external dx_DLL;
procedure Matrix_TextureTranslate(Matrix:PCMatrix4;x,y:singl e);cdecl ;external dx_DLL;
procedure Matrix_Inverse(OutMatrix:PCMatrix4;matrix:PCMatrix 4);cdecl ;external dx_DLL;
procedure Matrix_Transposed(OutMatrix:PCMatrix4;matrix:PCMat rix4);cdecl ;external dx_DLL;
procedure Matrix_LookAtLH(Matrix:PCMatrix4;position,target,u pVector:vector3);cdecl ;external dx_DLL;
//************************************************** ****
//*
//************************************************** ****
function Input_Init(mouseExclusive:boolean ):boolean;cdecl ;external DX_DLL;
function Input_Update():boolean;cdecl ;external DX_DLL;
function Input_KeyPressed(Key:integer):boolean;cdecl ;external DX_DLL;
function Input_KeyReleased(Key:integer):boolean;cdecl ;external DX_DLL;
function Input_MousePressed(But:integer):boolean;cdecl ;external DX_DLL;
function Input_MouseReleased(But:integer):boolean;cdecl ;external DX_DLL;
function Input_MouseX:integer;cdecl ;external DX_DLL;
function Input_MouseY:integer;cdecl ;external DX_DLL;
function Input_MouseAbsX:integer;cdecl ;external DX_DLL;
function Input_MouseAbsY:integer;cdecl ;external DX_DLL;
function Input_MouseAbsWheel:integer;cdecl ;external DX_DLL;
procedure Input_Free;cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
function Sound_Init(scale:single):boolean;cdecl ;external DX_DLL;
function Sound_SetVolume(volume:integer):boolean;cdecl ;external DX_DLL;
function Sound_UpdateListener( VLook,Vposition, Vvelocity,VUp:Vector3 ):boolean;cdecl ;external DX_DLL;
procedure Sound_Close();cdecl ;external DX_DLL;
function Sound_Load(filename:pchar;is3d:boolean):Void;cdecl ;external DX_DLL;
procedure Sound_Free(sound:Void);cdecl ;external DX_DLL;
procedure Sound_Play(sound:Void;Loop:boolean);cdecl ;external DX_DLL;
procedure Sound_Stop(sound:Void);cdecl ;external DX_DLL;
function Sound_IsPlaying(sound:Void):boolean;cdecl ;external DX_DLL;
procedure Sound_Set3DPosition(sound:Void;position:vector3);c decl ;external DX_DLL;
procedure Sound_Set3DVelocity( sound:Void;velocity:Vector3 );cdecl ;external DX_DLL;
procedure Sound_Set3DMaxDistance( sound:Void;dist:single );cdecl ;external DX_DLL;
procedure Sound_Set3DMinDistance( sound:Void;dist:single );cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
function Music_Load(filename:pchar):Void;cdecl ;external DX_DLL;
procedure Music_Free(music:Void);cdecl ;external DX_DLL;
function Music_Play(music:Void):boolean;cdecl ;external DX_DLL;
function Music_Stop(music:Void):boolean;cdecl ;external DX_DLL;
function Music_Pause(music:Void):boolean;cdecl ;external DX_DLL;
function Music_SetVolume(music:Void;value:integer):boolean; cdecl ;external DX_DLL;
function Music_SetBalance(music:Void;value:integer):boolean ;cdecl ;external DX_DLL;
function Music_SetPlayRate(music:Void;value:single):boolean ;cdecl ;external DX_DLL;
function Music_SetPosition(music:Void;pstar,send:integer):b oolean;cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
procedure Net_End;cdecl ;external DX_DLL;
function Net_Start(DPLAYAPP:TGUID;msg:PTMESSAGEHANDLER):int eger;cdecl ;external DX_DLL;
function NET_HostGame(PlayerName,SessionName:pchar;Port,Max Players:dword):integer;cdecl ;external DX_DLL;
function Net_FindSessions(playername:pchar;Port:dword;Hostd dr:pchar):integer;cdecl ;external DX_DLL;
function Net_ConectToHost(Playername:pchar;Port:dword;HostA ddr:pchar):integer;cdecl ;external DX_DLL;
function Net_JoinSession(Session:integer;PlayerName:pchar): integer;cdecl ;external DX_DLL;
procedure Net_CloseConection;cdecl ;external DX_DLL;
function Net_SendData(Const Players:dword;data:pointer;size:integer):integer;c decl ;external DX_DLL;
function Net_GetNumPlayers:integer;cdecl ;external DX_DLL;
function Net_GetPlayer( DPNID :dword ):TPlayerInfo;cdecl ;external DX_DLL;
function Net_GetPlayerByID( index:integer ):TPlayerInfo;cdecl ;external DX_DLL;
function Net_GetNumSessions:integer;cdecl ;external DX_DLL;
function Net_GetSession(index:integer;var SessionInfo :TSessionInfo ):boolean;cdecl ;external DX_DLL;
function Net_KickPlayer( dpnid:dword ):integer;cdecl ;external DX_DLL;
//************************************************** ****
//*
//************************************************** ****
procedure Shader_InitGPU;cdecl ;external dx_DLL;

function Shader_AddHighLevelShaderMaterialFromFiles(
vertexShaderProgram:pchar; vertexShaderEntryPointName:pchar;vsCompileTarget: E_VERTEX_SHADER_TYPE;
pixelShaderProgram:pchar; pixelShaderEntryPointName:pchar; psCompileTarget:E_PIXEL_SHADER_TYPE;
baseMaterial:MATERIAL_TYPE;CallBack:TShaderCallBac k;userData:integer=0):integer;cdecl ;external dx_DLL;



function Shader_AddHighLevelShaderMaterial(
vertexShaderProgram:pchar; vertexShaderEntryPointName:pchar;vsCompileTarget: E_VERTEX_SHADER_TYPE;
pixelShaderProgram:pchar; pixelShaderEntryPointName:pchar; psCompileTarget:E_PIXEL_SHADER_TYPE;
baseMaterial:MATERIAL_TYPE;CallBack:TShaderCallBac k;userData:integer=0):integer;cdecl ;external dx_DLL;


function Shader_AddShaderMaterialFromFiles(
vertexShaderProgramFileName:pchar; pixelShaderProgramFileName:pchar;
baseMaterial:MATERIAL_TYPE;CallBack:TShaderCallBac k;userData:integer=0):integer;cdecl ;external dx_DLL;
function Shader_AddShaderMaterial(
vertexShaderProgramFileName:pchar; pixelShaderProgramFileName:pchar;
baseMaterial:MATERIAL_TYPE;CallBack:TShaderCallBac k;userData:integer=0):integer;cdecl ;external dx_DLL;









//high level vertex shader
procedure VShader_SetHLSMatrixView(Service:Void;name:pchar); cdecl ;external dx_DLL;
procedure VShader_SetHLSMatrixWorldInversse(Service:Void;nam e:pchar);cdecl ;external dx_DLL;
procedure VShader_SetHLSMatrixWorldViewProj(Service:Void;nam e:pchar);cdecl ;external dx_DLL;
procedure VShader_SetHLSMatrixTransposed(Service:Void;name:p char);cdecl ;external dx_DLL;
procedure VShader_SetHLSMatrixWorldReflectionViewProj(Servic e:Void;const name:pchar);cdecl ;external dx_DLL;
procedure VShader_SetHLSVector(Service:Void;name:pchar;vect: vector3);cdecl ;external dx_DLL;
procedure VShader_SetHLSColor(Service:Void;name:pchar;r,g,b, a:single);cdecl ;external dx_DLL;
procedure VShader_SetHLSMatrix(Service:Void;name:pchar;const Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure VShader_SetHLSTexture(Service:Void;const name:pchar;tex:Void);cdecl ;external dx_DLL;
//high level pixel shader
procedure PShader_SetHLSMatrixView(Service:Void;name:pchar); cdecl ;external dx_DLL;
procedure PShader_SetHLSMatrixWorldInversse(Service:Void;nam e:pchar);cdecl ;external dx_DLL;
procedure PShader_SetHLSMatrixWorldViewProj(name:pchar);cdec l ;external dx_DLL;
procedure PShader_SetHLSMatrixTransposed(Service:Void;name:p char);cdecl ;external dx_DLL;
procedure PShader_SetHLSMatrixWorldReflectionViewProj(Servic e:Void;const name:pchar);cdecl ;external dx_DLL;
procedure PShader_SetHLSVector(Service:Void;name:pchar;vect: vector3);cdecl ;external dx_DLL;
procedure PShader_SetHLSColor(Service:Void;name:pchar;r,g,b, a:single);cdecl ;external dx_DLL;
procedure PShader_SetHLSMatrix(Service:Void;name:pchar;const Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure PShader_SetHLSTexture(Service:Void;const name:pchar;tex:Void);cdecl ;external dx_DLL;



// vertex shader
procedure VShader_SetMatrixView(Service:Void);cdecl ;external dx_DLL;
procedure VShader_SetMatrixWorldInversse(Service:Void);cdecl ;external dx_DLL;
procedure VShader_SetMatrixWorldViewProj(Service:Void);cdecl ;external dx_DLL;
procedure VShader_SetMatrixTransposed(Service:Void);cdecl ;external dx_DLL;
procedure VShader_SetMatrixWorldReflectionViewProj(Service:V oid);cdecl ;external dx_DLL;
procedure VShader_SetVector(Service:Void;vect:vector3);cdecl ;external dx_DLL;
procedure VShader_SetColor(Service:Void;r,g,b,a:single);cdec l ;external dx_DLL;
procedure VShader_SetMatrix(Service:Void;const Matrix:PCMatrix4);cdecl ;external dx_DLL;
//pixel shader
procedure PShader_SetMatrixView(Service:Void);cdecl ;external dx_DLL;
procedure PShader_SetMatrixWorldInversse(Service:Void);cdecl ;external dx_DLL;
procedure PShader_SetMatrixWorldViewProj(Service:Void);cdecl ;external dx_DLL;
procedure PShader_SetMatrixTransposed(Service:Void);cdecl ;external dx_DLL;
procedure PShader_SetMatrixWorldReflectionViewProj(Service:V oid);cdecl ;external dx_DLL;
procedure PShader_SetVector(Service:Void;vect:vector3);cdecl ;external dx_DLL;
procedure PShader_SetColor(Service:Void;r,g,b,a:single);cdec l ;external dx_DLL;
procedure PShader_SetMatrix(Service:Void;const Matrix:PCMatrix4);cdecl ;external dx_DLL;


function Shader_SetHLSVertexShaderConstant(Service:Void;con st name:pchar;const floats:PSingle;count:integer):boolean;cdecl ;external dx_DLL;
procedure Shader_SetVertexShaderConstant(Service:Void;const data:psingle;startRegister:integer;constantAmount: integer=1);cdecl ;external dx_DLL;

function Shader_SetHLSPixelShaderConstant(Service:Void;cons t name:pchar;const floats:PSingle;count:integer):boolean;cdecl ;external dx_DLL;
procedure Shader_SetPixelShaderConstant(Service:Void;const data:psingle;startRegister:integer;constantAmount: integer=1);cdecl ;external dx_DLL;

//************************************************** ****
//* MATRIX UTIL
//************************************************** ****
procedure GetMatrixWorld(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure GetMatrixView(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure GetMatrixProjection(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure GetMatrixWorldInversse(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure GetMatrixWorldViewProj(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure GetMatrixWorldTransposed(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure GetMatrixWorldInverseTranspose(Matrix:PCMatrix4);c decl ;external dx_DLL;
procedure GetMatrixViewInversse(Matrix:PCMatrix4);cdecl ;external dx_DLL;
procedure GetMatrixViewTranspose(Matrix:PCMatrix4);cdecl ;external dx_DLL;

detvog
02-02-2009, 08:18 AM
Cool.....

bigsofty
03-02-2009, 03:48 PM
Excellent work, well done! :D

Vinzvega
03-02-2009, 06:38 PM
Hey, very impressive work Djoker !

let me understand well : dxCore.dll is an irrlicht modified (originaly in c++, no ?), or a whole new engine wrote in Pascal ?

I see your demo, that's work well, and the corresponding source code is very simple :)
I'm curious to see what do you prepare. :)

Regards,

Vinz

loriendesign
03-02-2009, 10:03 PM
Excellent work again !!! First in Dreamotion 3D and now in Irrlicht :thumbup:

djoker
07-02-2009, 04:12 PM
Hey, very impressive work Djoker !

let me understand well : dxCore.dll is an irrlicht modified (originaly in c++, no ?), or a whole new engine wrote in Pascal ?

I see your demo, that's work well, and the corresponding source code is very simple :)
I'm curious to see what do you prepare. :)

Regards,

Vinz

irr super modified ;)

djoker
07-02-2009, 04:20 PM
Excellent work again !!! First in Dreamotion 3D and now in Irrlicht :thumbup:

DreamMotion ??


thank you guys .. your replays make my continue my project ;)

i make the new system particles with callbacks this way we can control particles one by one i think
is very good ;)

im trying new landscape improve the AI system modified steering beavers and extra stuff ;)

i see lots of orthographic errors on the api :S im working very fast and miss same of theme

tank you 4 the replays its great ;)

loriendesign
07-02-2009, 08:07 PM
djoker wrote:


DreamMotion ??

I mean your work to make Delphi wrapper of Dreamotion3d engine http://www.dreamotion3d.com/ :)

detvog
13-02-2009, 11:17 AM
Hi DJoker,

i have a ?

what have you make with your old DarkGdK-Wrapper ?
Can you give me the source code or work you with this thing?





Sorry 4my english

djoker
14-02-2009, 08:41 PM
Hi DJoker,

i have a ?

what have you make with your old DarkGdK-Wrapper ?
Can you give me the source code or work you with this thing?





Sorry 4my english


ok my friend..
all c++ and delphi source code
if you have problems plz report i think i dont make the bests options 4 the dll on vc express


http://www.box.net/shared/lfuq7ah3rj

detvog
15-02-2009, 08:08 AM
Thanks DJoker.


Now i can see as a wrapper work.


Greatly.


What make your other work ?



Sorry.....engl..

djoker
15-02-2009, 08:53 AM
Thanks DJoker.

What make your other work ?


???

detvog
15-02-2009, 12:06 PM
?Ñhhh sorry,

i mean your dxcore and what is with the ogre wrapper ?

djoker
15-02-2009, 12:35 PM
?Ñhhh sorry,

i mean your dxcore and what is with the ogre wrapper ?
wat you want?

detvog
15-02-2009, 01:02 PM
?Ñhhh sorry,

i mean your dxcore and what is with the ogre wrapper ?
wat you want?




make you sometime an new update ?

djoker
15-02-2009, 01:42 PM
?Ñhhh sorry,

i mean your dxcore and what is with the ogre wrapper ?
wat you want?


make you sometime an new update ?

i don't like ogre .
im working on dxcore but my time is short :S

Chien
31-05-2009, 05:42 AM
really excellent work! :D

ebucco
31-05-2009, 10:15 AM
Is it possible to override the control keys on ADWS? And how to create FOG? please help me. Sorry for my bad english

panoramic
29-05-2010, 06:39 AM
Sorry to up this old topic, but I'm very interrested by the work done by Djoker and I just want to know if he intends to share the source code for his super library DXCore.dll
Thanks in advance.
The source could improve the language I wrote in Delphi which has 3D features:
http://www.panoramic-language.com