Ogre4Delphi (UP 30/11/08) - All files

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
LuisSantosAKADjoker
Gnoblar
Posts: 5
Joined: Sat Nov 29, 2008 8:56 pm

Ogre4Delphi (UP 30/11/08) - All files

Post by LuisSantosAKADjoker » Sat Nov 29, 2008 9:19 pm

hi ppl this is my fist attempt 2 create a framework 4 delphi, still mutch to do.
the next version will initiate the engine by code and or dialog.

sorry my english :oops:

full working version and better with all files(media ,source and binary)

http://www.mediafire.com/file/mzmmkytagyy/Ogre4D.zip
plz report any problem.

Image
Image

Image
Image

Code: Select all

program teste2;

{$APPTYPE CONSOLE}

uses
  SysUtils,mmsystem,math,
  dialogs,
  Ogre4D in 'Ogre4D.pas',
  OgreTypes in 'OgreTypes.pas';

var
  camera:ocamera;
  vp:OViewPort;
  plane,Mesh:OEntity;
  l2,Light:OLight;
  AnimNode,PlaneNode,Ogre:OSceneNode;
   bbs:OBillboards;
  trail:ORibbonTrail;
  mRotX,mRotY:single;
  mMoveSpeed:single=800;
  mSpeedLimit , mMoveScale:single;
  mTranslateVector:vector3;
  animupdate,animupdate2:OAnimationState;

anim:OAnimation;
track:OAnimationTrack;
kf:OKeyFrame;

dir:vector3;


procedure RenderEvent(timeSinceLastEvent,timeSinceLastFrame:single);stdcall;
begin
AnimState_AddTime(animupdate,timeSinceLastFrame);
AnimState_AddTime(animupdate2,timeSinceLastFrame);

mTranslateVector:=vector(0,0,0);
mSpeedLimit := mMoveScale * timeSinceLastFrame;
mMoveScale := mMoveSpeed * timeSinceLastFrame;

if Window_isKeyDown(KC_F12) then Window_TakeShot;  

if Window_isKeyDown(KC_A) then  		mTranslateVector.x := -mMoveScale;	// Move camera left
if Window_isKeyDown(KC_D) then    	mTranslateVector.x := mMoveScale;	// Move camera RIGHT

		if(Window_isKeyDown(KC_UP) or (Window_isKeyDown(KC_W))) then
			mTranslateVector.z := -mMoveScale;	// Move camera forward

		if(Window_isKeyDown(KC_DOWN) or (Window_isKeyDown(KC_S))) then
			mTranslateVector.z := mMoveScale;	// Move camera backward

		if(Window_isKeyDown(KC_PGUP)) then	mTranslateVector.y := mMoveScale;	// Move camera up

		if(Window_isKeyDown(KC_PGDOWN)) then  mTranslateVector.y := -mMoveScale;	// Move camera down

	    mRotX := -Window_MouseX * 0.13;
			mRotY := -Window_MouseY * 0.13;

Camera_SetYaw(camera,mRotX);
Camera_SetPitch(camera,mRotY);
Camera_MoveRelative(camera,mTranslateVector);

Node_Yaw(ogre,0.10);


Engine_DrawDebugPanel;
end;

begin

Engine_CreateRoot(LL_NORMAL,'plugins.cfg','ogre.cfg');


Engine_SelectRenderSystem(DV_DIRECT3D9);
engine_SetConfigOption('VSync','No');
engine_SetConfigOption('Full Screen','No');
engine_SetConfigOption('Video Mode','800 x 600 @ 16-bit colour');
Engine_Init('OGRE4D');


Engine_SetFrameListner(RenderEvent);



camera:=Scene_AddCamera('mycamera');


Camera_SetDistanceClip(camera,1.0,20000.0);
vp:=Camera_SetViewPort(Camera);
ViewPort_SetColor(vp,0,0,0.4);

Camera_SetPosition(camera,vector(0,20,500));
Camera_SetLookAt(camera,vector(0,0,300));

Scene_SetAmbientLight(1.0,1.0,0.5);






 

Engine_AddResourceLocation('media','FileSystem');
Engine_AddResourceLocation('media/fonts','FileSystem');
Engine_AddResourceLocation('media/overlays','FileSystem');
Engine_AddResourceLocation('media/models','FileSystem');

Engine_AddResourceLocation('media/materials/scripts','FileSystem');
Engine_AddResourceLocation('media/materials/textures','FileSystem');

Engine_AddResourceLocation('media/packs/ogrecore.zip','Zip');
Engine_AddResourceLocation('media/packs/skybox.zip','Zip');



Engine_UpdateAllResourceGroups;






Scene_AddSkyBox('Examples/SpaceSkyBox');
//Scene_AddSkyPlane('Examples/SpaceSkyPlane');
//Scene_SetSkyDome('Examples/CloudySky',5,8);



Mesh:=Scene_AddEntity('axes', 'axes.mesh');
Scene_AttachObject(mesh);


Mesh:=Scene_AddEntity('head', 'ogrehead.mesh');
ogre:=Scene_AddChildSceneNode( 'head');
Node_AttachObject(ogre,mesh);
Node_ShowBoundigBox(ogre,true);



MeshManager_CreatePlane('plane',1000,1000);
plane:=Scene_AddEntity('floor','plane');
Entity_SetMaterialName(plane,'Examples/RustySteel');
PlaneNode:=Scene_AddChildSceneNode( 'plane');
Node_AttachObject(planenode,plane);

dir:=vector(-1, -1, 0.5);
dir:=VNormalize(dir);

Light:=Scene_AddLight('light1',LT_DIRECTIONAL);
Light_SetDirection(light,dir);




trail:=Scene_AddRibbonTrail('l','RibbonTrail');
RibbonTrail_SetMaterialName(trail,'Examples/LightRibbonTrail');
RibbonTrail_SetTrailLength(trail,400);
Scene_AttachObject(trail);

animnode:=Scene_AddChildSceneNode('anim1');
Node_SetPosition(animnode,vector(50,30,0));

anim:=Scene_AddAnimation('an1',14);
Animation_SetInterpolationMode(anim,IM_SPLINE);
track:=Animation_CreateNodeTrackTOnNode(anim,1,animnode);
kf:=Track_CreateNodeKeyFrame(track,0);

KeyFrame_SetTranslate(kf,Vector(50,30,0));
kf:=Track_CreateNodeKeyFrame(track,2);
KeyFrame_SetTranslate(kf,Vector(100, -30, 0));
kf:=Track_CreateNodeKeyFrame(track,4);
KeyFrame_SetTranslate(kf,Vector(120, -100, 150));
kf:=Track_CreateNodeKeyFrame(track,6);
KeyFrame_SetTranslate(kf,Vector(30, -100, 50));
kf:=Track_CreateNodeKeyFrame(track,8);
KeyFrame_SetTranslate(kf,Vector(-50, 30, -50));
kf:=Track_CreateNodeKeyFrame(track,10);
KeyFrame_SetTranslate(kf,Vector(-150, -20, -100));
kf:=Track_CreateNodeKeyFrame(track,12);
KeyFrame_SetTranslate(kf,Vector(-50, -30, 0));
kf:=Track_CreateNodeKeyFrame(track,14);
KeyFrame_SetTranslate(kf,Vector(50,30,0));

animupdate:=Scene_AddAnimationState('an1');


RibbonTrail_SetInitialColour(trail,0, color(1.0, 0.8, 0,0));
RibbonTrail_SetColourChange(trail,0,color( 0.5, 0.5, 0.5, 0.5));
RibbonTrail_SetInitialWidth(trail,0, 5);
RibbonTrail_AddNode(trail,animNode);

l2:=Scene_AddLight('l2',LT_POINT);
Light_SetColor(l2,1.0,0.8,0);
Node_AttachObject(animnode,l2);


  bbs:=Scene_AddBillBoards('bb',1);
  BillBoard_AddBillBoard(bbs,vector(0,0,0),color(1.0,0.8,0,0));
  BillBoard_SetMaterial(bbs,'Examples/Flare');
  Node_AttachObject(animnode,bbs);




animnode:=Scene_AddChildSceneNode('anim2');
Node_SetPosition(animnode,vector(-50,100,0));

anim:=Scene_AddAnimation('an2',10);
Animation_SetInterpolationMode(anim,IM_SPLINE);
track:=Animation_CreateNodeTrackTOnNode(anim,1,animnode);
kf:=Track_CreateNodeKeyFrame(track,0);
KeyFrame_SetTranslate(kf,Vector(-50,100,0));
kf:=Track_CreateNodeKeyFrame(track,2);
KeyFrame_SetTranslate(kf,Vector(-200, 150, -30));
kf:=Track_CreateNodeKeyFrame(track,4);
KeyFrame_SetTranslate(kf,Vector(-200, 0, 40));
kf:=Track_CreateNodeKeyFrame(track,6);
KeyFrame_SetTranslate(kf,Vector(0, -150, 70));
kf:=Track_CreateNodeKeyFrame(track,8);
KeyFrame_SetTranslate(kf,Vector(50, 0, 30));
kf:=Track_CreateNodeKeyFrame(track,10);
KeyFrame_SetTranslate(kf,Vector(-50, 100, 0));

animupdate2:=Scene_AddAnimationState('an2');

RibbonTrail_SetInitialColour(trail,1, color(0.0, 1.0, 0.4,0));
RibbonTrail_SetColourChange(trail,1,color( 0.5, 0.5, 0.5, 0.5));
RibbonTrail_SetInitialWidth(trail,1, 5);
RibbonTrail_AddNode(trail,animNode);


l2:=Scene_AddLight('l3');
Light_SetColor(l2,0.0,1.0,0.4);
Node_AttachObject(animnode,l2);


  bbs:=Scene_AddBillBoards('bb2',1);
  BillBoard_AddBillBoard(bbs,vector(0,0,0),color(0.0,1.0,0.4,0));
  BillBoard_SetMaterial(bbs,'Examples/Flare');
  Node_AttachObject(animnode,bbs);
         

Engine_BeginLoop;

Engine_Shutdown;



end.

Code: Select all

unit Ogre4D;

interface
uses windows,ogretypes;




//*********************************************************
//*                 OGRE MAIN                             *
//*********************************************************
function Engine_CreateRoot(OLoggingLevel:OLoggingLevel;pluginFileName,configFileName:pchar):bool;cdecl;external ogredll;
function Engine_RootLoadPlugin(pluginFileName:pchar):bool;cdecl;external ogredll;

function   Engine_InitFromDialog(caption:pchar;SceneType:OSceneType=ST_GENERIC):bool;cdecl;external ogredll;

function Engine_SelectRenderSystem(Devide:ODeviceType):bool;cdecl;external ogredll;
function Engine_SetConfigOption(name,value:pchar):bool;cdecl;external ogredll;
function Engine_Init(windowTitle:pchar;SceneType:OSceneType=ST_GENERIC):bool;stdcall;external ogredll;

//function Engine_SelectRenderSystemByCode(windowTitle:pchar):bool;cdecl;external ogredll;

function   Engine_BeginLoop:bool;cdecl;external ogredll;
procedure  Engine_SetFrameListner(OgreRenderCallBack:ORenderEvent);cdecl;external ogredll;
procedure  Engine_Shutdown();cdecl;external ogredll;
procedure Engine_RenderOneFrame;cdecl;external ogredll;
procedure Engine_AddResourceLocation( Path, LocType:pchar; recursive:boolean=false);cdecl;external ogredll;
procedure Engine_AddResourceLocationFromFile(filename:pchar);cdecl;external ogredll;
procedure Engine_UpdateAllResourceGroups;cdecl;external ogredll;
procedure  Engine_DrawDebugPanel;cdecl;external ogredll;

procedure Engine_SetDefaultTextureFiltering( fo:OTextureFilterOptions);cdecl;external ogredll;
procedure Engine_SetDefaultTextureFilteringMinMag(minFilter, magFilter, mipFilter:OFilterOptions);cdecl;external ogredll;
procedure Engine_SetDefaultTextureFilteringType( ftype:OFilterType; opts:OFilterOptions);cdecl;external ogredll;
procedure Engine_SetDefaultAnisotropy(maxAniso:integer);cdecl;external ogredll;
//*********************************************************
//*                 OGRE WINDOW                           *
//*********************************************************
procedure Window_Close;cdecl;external ogredll;
procedure Window_TakeShot;cdecl;external ogredll;
function Window_isKeyDown(key:OKeyCode):bool;cdecl;external ogredll;
function Window_isMouseDown( button:integer):boolean;cdecl;external ogredll;
function Window_MouseX:integer;cdecl;external ogredll;
function Window_MouseY:integer;cdecl;external ogredll;
function Window_MouseZ:integer;cdecl;external ogredll;
function Window_MouseXAbs:integer;cdecl;external ogredll;
function Window_MouseYAbs:integer;cdecl;external ogredll;
function Window_MouseZAbs:integer;cdecl;external ogredll;

//*********************************************************
//*                 OGRE SCENE                           *
//*********************************************************
procedure  Scene_SetAmbientLight(r,g,b:single);cdecl;external ogredll;

procedure  Scene_AddSkyBox(MatName:pchar;distance :single= 5000; drawFirst:boolean = true);cdecl;external ogredll;
function   Scene_AddBillBoards(Name:pchar;poolSize:integer = 20):OBillBoards;cdecl;external ogredll;
procedure  Scene_AddSkyDome(Name:pchar; curvature:single = 10;tiling:single = 8; distance:single = 4000;drawFirst:boolean = true)cdecl;external ogredll;
procedure  Scene_AddSkyPlane(Name:pchar; dist:single=5000; scale:single = 1000; tiling:single = 10; drawFirst:boolean = true; bow:single = 0)cdecl;external ogredll;
function   Scene_AddCamera(Name:pchar):OCamera;cdecl;external ogredll;
function   Scene_AddEntity(Name,Filename:pchar):OEntity;cdecl;external ogredll;
function   Scene_AddLight(Name:pchar;LightTypes:OLightTypes=LT_POINT):OLight;cdecl;external ogredll;


function   Scene_AddRibbonTrail(Name,TypeName:pchar; NumberOfChains:integer=2; maxElement:integer=80):ORibbonTrail;cdecl;external ogredll;
function   Scene_AddChildSceneNode(Name:pchar):OSceneNode;cdecl;external ogredll;
function   Scene_AddAnimation(Name:pchar;length:single):OAnimation;cdecl;external ogredll;
function   Scene_AddAnimationState(Name:pchar):OAnimationState;cdecl;external ogredll;
procedure  Scene_AttachObject(obj:TMovableObject);cdecl;external ogredll;

//*********************************************************
//*                 OGRE CAMERAS                          *
//*********************************************************
procedure Camera_SetAspectRatio(camera:OCamera;Ratio:single);cdecl;external ogredll;
procedure Camera_SetFOVy(camera:OCamera;fov:single);cdecl;external ogredll;
procedure Camera_SetDistanceClip(camera:OCamera;distNear,distFar:single);cdecl;external ogredll;
function Camera_SetViewPort(Camera:OCamera;ZOrder:integer=0;left:single=0.0;Top:single=0.0;width:single= 1.0;height:single= 1.0):OViewPort;cdecl;external ogredll;
procedure Camera_SetPolygonMode(Camera:Ocamera;value:OPolygonMode);cdecl;external ogredll;
procedure Camera_SetPosition(Camera:OCamera;vec:Vector3);cdecl;external ogredll;
procedure Camera_SetLookAt(Camera:OCamera; vec:Vector3);cdecl;external ogredll;
procedure Camera_MoveRelative(Camera:OCamera; vec:Vector3);cdecl;external ogredll;
procedure Camera_Move(Camera:OCamera; vec:Vector3);cdecl;external ogredll;
procedure Camera_SetDirection(Camera:OCamera; vec:Vector3);cdecl;external ogredll;
procedure Camera_SetYaw(Camera:OCamera;angle:single);cdecl;external ogredll;
procedure Camera_SetPitch(Camera:OCamera;angle:single);cdecl;external ogredll;
procedure Camera_SetRoll(Camera:OCamera;angle:single);cdecl;external ogredll;
//*********************************************************
//*                 OGRE VIEWPORT                         *
//*********************************************************
procedure ViewPort_SetColor(vp:OViewport;r,g,b:single);cdecl;external ogredll;
function ViewPort_GetWidth(vp:OViewport):single;cdecl;external ogredll;
function ViewPort_GetHeight(vp:OViewport):single;cdecl;external ogredll;
//*********************************************************
//*                 OGRE ENTITYS                          *
//*********************************************************
procedure  Entity_SetMaterialName(Entity:OEntity;MatName:pchar);cdecl;external ogredll;
//*********************************************************
//*                 OGRE LIGHTS                           *
//*********************************************************
procedure  Light_SetPosition(Light:Olight; vec:Vector3);cdecl;external ogredll;
procedure  Light_SetDirection(Light:Olight; vec:Vector3);cdecl;external ogredll;
procedure  Light_SetColor(Light:OLight;r,g,b:single);cdecl;external ogredll;
//*********************************************************
//*                 OGRE NODES                             *
//*********************************************************
procedure   Node_AttachObject(Node:OSceneNode;obj:OMovableObject);cdecl;external ogredll;
procedure   Node_AttachChilld(Node,Chilld:OSceneNode);cdecl;external ogredll;
procedure   Node_SetPosition(SceneNode:OSceneNode; vec:Vector3);cdecl;external ogredll;
procedure   Node_SetDirection(SceneNode:OSceneNode; vec:Vector3);cdecl;external ogredll;
procedure   Node_Scale(SceneNode:OSceneNode; vec:Vector3);cdecl;external ogredll;
procedure   Node_Rotate(SceneNode:OSceneNode; vec:Vector3; angle:single);cdecl;external ogredll;
procedure   Node_ShowBoundigBox(SceneNode:OSceneNode;bShow:boolean);cdecl;external ogredll;
procedure   Node_SetDebugDisplayEnabled(SceneNode:OSceneNode;bShow:boolean);cdecl;external ogredll;
procedure   Node_Yaw(Node:OSceneNode;angle:single);cdecl;external ogredll;
procedure   Node_Pitch(Node:OSceneNode;angle:single);cdecl;external ogredll;
procedure   Node_Roll(Node:OSceneNode;angle:single);cdecl;external ogredll;

procedure  Node_YawPitchRollInRadian(Node:OSceneNode; yaw, pitch,roll:single);cdecl;external ogredll;
procedure  Node_YawPitchRollInDegree(Node:OSceneNode; yaw, pitch,roll:single);cdecl;external ogredll;

function     Node_GetChilldByIndex(Node:OSceneNode;index:integer):OSceneNode;cdecl;external ogredll;
function     Node_GetChilldByName(Node:OSceneNode;name:pchar):OSceneNode;cdecl;external ogredll;

//*********************************************************
//*                 OGRE MESHMANAGER                      *
//*********************************************************

procedure MeshManager_CreatePlane(Name:pchar; width, height:single;xsegments:integer = 1;ysegments:integer = 1;
             normals:boolean = true; numTexCoordSets:integer = 1;
             uTile:single = 1.0; vTile :single= 1.0);cdecl;external ogredll;
//*********************************************************
//*                 OGRE RibbonTrail                      *
//*********************************************************
procedure RibbonTrail_SetTrailLength(trail:ORibbonTrail; lean:single);cdecl;external ogredll;
procedure RibbonTrail_SetMaterialName(trail:ORibbonTrail; Name:pchar);cdecl;external ogredll;
procedure RibbonTrail_SetInitialColour(Trail:ORibbonTrail;chainIndex:integer;color:OColor);cdecl;external ogredll;
procedure RibbonTrail_SetColourChange(Trail:ORibbonTrail;chainIndex:integer;color:OColor);cdecl;external ogredll;
procedure RibbonTrail_SetInitialWidth(Trail:ORibbonTrail;chainIndex:integer;size:single);cdecl;external ogredll;
procedure RibbonTrail_AddNode(Trail:ORibbonTrail;cNode:OSceneNode);cdecl;external ogredll;
//*********************************************************
//*                 OGRE ANIMATION                        *
//*********************************************************
procedure  Animation_SetInterpolationMode(anim:OAnimation;im:OInterpolationMode);cdecl;external ogredll;
function   Animation_CreateNodeTrack(anim:OAnimation;handle:integer):OAnimationTrack;cdecl;external ogredll;
function  Animation_CreateNodeTrackTOnNode(anim:OAnimation;handle:integer;Node:OSceneNode):OAnimationTrack;cdecl;external ogredll;
//*********************************************************
//*                 OGRE ANIMATION  STATES                *
//*********************************************************
procedure  AnimState_AddTime(state:OAnimationState;offset:single)cdecl;external ogredll;
//*********************************************************
//*                 OGRE KEYFRAME                         *
//*********************************************************
procedure KeyFrame_SetTranslate(keyframe:Okeyframe;vect:vector3);cdecl;external ogredll;
procedure KeyFrame_SetScale(keyframe:Okeyframe;vect:vector3);cdecl;external ogredll;
procedure KeyFrame_SetRotation(keyframe:Okeyframe;vect:vector3);cdecl;external ogredll;
//*********************************************************
//*                 OGRE TRACK                         *
//*********************************************************
function Track_CreateNodeKeyFrame(anim:OAnimationTrack; timePos:single):OKeyFrame;cdecl;external ogredll;
//*********************************************************
//*                 OGRE BILLBOARD                         *
//*********************************************************
function   BillBoard_AddBillBoard(Bils:OBillboards;pos:vector3;color:OColor ):OBillBoard;cdecl;external ogredll;
procedure  BillBoard_SetMaterial(Bils:OBillboards;name:pchar);cdecl;external ogredll;
Last edited by LuisSantosAKADjoker on Mon Dec 01, 2008 5:05 pm, edited 3 times in total.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Sat Nov 29, 2008 9:33 pm

I love Delphi - was my main development environment before I found C++ and Ogre.
Extremely cool! :D

Are you able to make Ogre be a control ?

Would be awesome for making tools. :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

LuisSantosAKADjoker
Gnoblar
Posts: 5
Joined: Sat Nov 29, 2008 8:56 pm

Post by LuisSantosAKADjoker » Sat Nov 29, 2008 9:53 pm

jacmoe wrote:I love Delphi - was my main development environment before I found C++ and Ogre.
Extremely cool! :D

Are you able to make Ogre be a control ?

Would be awesome for making tools. :)
i dont understand the question ?
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Post by jacmoe » Sat Nov 29, 2008 10:07 pm

Do you have an Ogre render control (I can't remember what you call it in Delphi) that you can drop on a form?
Like GLScene?
Imagine how easy it would be to make tools. :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
romulo
Halfling
Posts: 82
Joined: Tue Jun 17, 2003 6:37 pm
Contact:

Post by romulo » Sat Nov 29, 2008 10:38 pm

Very cool =D
Wouldnt be possible to wrap the camera like an object class? Looks like you are calling stuff like Camera_Position(Camera, x, y, z)
but it should be camera.setPosition(x, y, z)?
0 x

LuisSantosAKADjoker
Gnoblar
Posts: 5
Joined: Sat Nov 29, 2008 8:56 pm

Post by LuisSantosAKADjoker » Sat Nov 29, 2008 11:52 pm

jacmoe wrote:Do you have an Ogre render control (I can't remember what you call it in Delphi) that you can drop on a form?
Like GLScene?
Imagine how easy it would be to make tools. :)
yes i can but i prefer 1 clean api



render_init;
render_draw;

mymeh:=admesh('filename');

rendermesh(mymesh)


blitz3d ,blitzmax style
0 x

LuisSantosAKADjoker
Gnoblar
Posts: 5
Joined: Sat Nov 29, 2008 8:56 pm

Post by LuisSantosAKADjoker » Sat Nov 29, 2008 11:58 pm

romulo wrote:Very cool =D
Wouldnt be possible to wrap the camera like an object class? Looks like you are calling stuff like Camera_Position(Camera, x, y, z)
but it should be camera.setPosition(x, y, z)?
yes .. you can create classes with API like


camera=class
private
mCamera:OCamera;
public
procedure Initcamera(name:string)
procedure SetPosition(x,y,z:single);
end;

procedure camera.Initcamera(name:string)
begin
mCamera:=Scene_AddCamera(name);
end;

procedure camera.setposition(x,y,z:single);
begin
Camera_SetPosition(mCamera,vector(x,y,z));
end;

and call


var
micamera:camera;

micamera.Initcamera('micamera');

micamera.setposition(0,10,0);


if the class is componente you can drop on form
0 x

User avatar
romulo
Halfling
Posts: 82
Joined: Tue Jun 17, 2003 6:37 pm
Contact:

Post by romulo » Sun Nov 30, 2008 2:15 am

yeah that what i tough. I messed with pascal/delphi too many years ago to actually remember how the implementation details work =]
keep up the good work.
0 x

Jeanbono
Gnoblar
Posts: 12
Joined: Sun Sep 14, 2008 7:44 am

Post by Jeanbono » Sun Nov 30, 2008 10:05 am

Good work!!

I learned c++ since 3 month cause Ogre3d is better than glscene or delphix :D

I love delphi's syntax code (sorry for c++ dev's users :p).

I can't launch 'teste.exe' cause I have an error with OIS.dll...

http://imagik.fr/view-rl/167129

I'm so happy to see Ogre3d on delphi ;)
0 x

LuisSantosAKADjoker
Gnoblar
Posts: 5
Joined: Sat Nov 29, 2008 8:56 pm

Post by LuisSantosAKADjoker » Sun Nov 30, 2008 4:09 pm

Jeanbono wrote:Good work!!

I learned c++ since 3 month cause Ogre3d is better than glscene or delphix :D

I love delphi's syntax code (sorry for c++ dev's users :p).

I can't launch 'teste.exe' cause I have an error with OIS.dll...

http://imagik.fr/view-rl/167129

I'm so happy to see Ogre3d on delphi ;)
i love delphi ;)

the new version have all media and bin.

hasta ;)
0 x

gasdeveloper
Gnoblar
Posts: 3
Joined: Mon Mar 30, 2009 2:12 am

Re: Ogre4Delphi (UP 30/11/08) - All files

Post by gasdeveloper » Mon Mar 30, 2009 2:52 am

I was just wondering If this project has made any headway or is just a one hit wonder. I love Delphi and I love Ogre3D So, I would like to see this project live and thrive. So, if someone could post a reply with the current status that would be awesome.
0 x

mike30
Gnoblar
Posts: 3
Joined: Fri Jul 02, 2010 3:00 am

Re: Ogre4Delphi (UP 30/11/08) - All files

Post by mike30 » Fri Jul 02, 2010 3:08 am

which Delphi version is supported?
0 x

User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US

Re: Ogre4Delphi (UP 30/11/08) - All files

Post by xavier » Fri Jul 02, 2010 3:11 am

A year and a half later! Stop it!
0 x
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.

Post Reply