Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Delphi .Net and Irrlicht

  1. #1

    Delphi .Net and Irrlicht

    Hello all,

    Its a rather simple question i have, Irrlicht http://irrlicht.sourceforge.net claims to support Delphi via the .net versions and the usage of the irrlicht.net.dll

    Now here's the question has anyone actually got this to work from delphi?

    I can get the IDE to pickup the namespaces etc but when i try to compile anything with the DLL in the references Delphi just throws strange errors like
    [Fatal Error] F1026 File not found: '.dll'
    [Fatal Error] E2202 Required package '' not found

    or

    [Fatal Error] F1026 File not found: '<.dll'
    [Fatal Error] E2202 Required package '<' not found

    just seems to be random.

    Im using Delphi 2005 for this and the irrlicht.net works with C# from within delphi 2005.

  2. #2

    Delphi .Net and Irrlicht

    You are venturing into unfamiliar territory there. You're the first I've heard using Irrlicht with Delphi .NET.

  3. #3

    Delphi .Net and Irrlicht

    Where does you irrlicht.net.dll exist? It could be that it needs to exist in your GAC. The other possibility is to checkl that the irrlicht assembly is for the version of .NET you have installed on your machine.

    So much for gettting rid of DLL hell .
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  4. #4

    Delphi .Net and Irrlicht

    Honestly im not sure what you mean by GAC.

    But i have the assembly imported as local copy and the DLL exists in the same dir as the source and also a copy in the 'bin\Debug\' Dir for the project

    It imports fine, no errors at all. i can browse the clr interface for the DLL all that works fine, The ide will even work with the DLL showing procedures functions etc in the Code Completion.

    Its just when you actually try to compile that it throws a slight fit with the above errors.

    Same DLL used works with the C# builder built into Delphi 2005 so its kinda a stumping problem.

  5. #5

    Delphi .Net and Irrlicht

    GAC should be Global Assembly Cache.

    I can test it out this evening. What do I need to try it out with Delphi 2005 ( a special Irrlicht installation )??
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  6. #6

    Delphi .Net and Irrlicht

    Erm you dont, you could try it in Delphi 8, i just have Delphi 2005 is all

  7. #7

    Delphi .Net and Irrlicht

    Did you use something simialar to the following program to test it...
    Code:
    program HelloWorld;
    
    &#123;$APPTYPE CONSOLE&#125;
    
    &#123;%DelphiDotNetAssemblyCompiler '$&#40;SystemRoot&#41;\microsoft.net\framework\v1.1.4322\System.dll'&#125;
    &#123;%DelphiDotNetAssemblyCompiler '$&#40;SystemRoot&#41;\microsoft.net\framework\v1.1.4322\System.Data.dll'&#125;
    &#123;%DelphiDotNetAssemblyCompiler '$&#40;SystemRoot&#41;\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll'&#125;
    &#123;%DelphiDotNetAssemblyCompiler '..\..\bin\delphi 2005\Irrlicht.NET.dll'&#125;// You will probably have to change this path.
    
    
    uses
      System.Windows.Forms,
      Irrlicht,
      Irrlicht.Video,
      Irrlicht.Core,
      Irrlicht.Scene;
    
    var
      device &#58; IrrlichtDevice;
      texSydney, texWall, texLogo &#58; ITexture;
      mesh &#58; Irrlicht.Scene.IAnimatedMesh;
      cam &#58; ICameraSceneNode;
      node &#58; ISceneNode;
      fps &#58; integer;
    begin
      // start up the engine
      device &#58;= IrrlichtDevice.Create&#40;DriverType.OPENGL&#41;;
    
      device.ResizeAble &#58;= true;
      device.WindowCaption &#58;= 'Irrlicht.NET Delphi.NET example 01 - Hello World';
    
      // load some textures 
    
      texSydney &#58;= device.VideoDriver.GetTexture&#40;'..\..\media\sydney.bmp'&#41;;
      texWall &#58;= device.VideoDriver.GetTexture&#40;'..\..\media\wall.bmp'&#41;;
      texLogo &#58;= device.VideoDriver.GetTexture&#40;'..\..\media\irrlichtlogoaligned.jpg'&#41;;
    
      // load the animated mesh of sydney
    
      mesh &#58;= device.SceneManager.GetMesh&#40;'..\..\media\sydney.md2'&#41;;
    
      if &#40;mesh = nil&#41; then
      begin
        System.Windows.Forms.MessageBox.Show&#40;
          'Could not load mesh ..\..\media\sydney.md2, exiting.',
          'Problem starting program'&#41;;
        exit;
      end;
    
      // add a camera, a test scene node and the animated mesh to the scene	
    
      cam &#58;= device.SceneManager.AddCameraSceneNodeFPS&#40;nil, 100, 100, -1&#41;;
      cam.Position &#58;= Vector3D.Create&#40;20,0,-50&#41;;
    
    
      node &#58;= device.SceneManager.AddTestSceneNode&#40;15, nil, -1, Vector3D.Create&#40;30,-15,0&#41;&#41;;
      node.SetMaterialTexture&#40;0, texWall&#41;;
    
      node &#58;= device.SceneManager.AddAnimatedMeshSceneNode&#40;mesh, nil, -1&#41;;
      node.SetMaterialTexture&#40;0, texSydney&#41;;
      node.SetMaterialFlag&#40;MaterialFlag.LIGHTING, false&#41;;
    
      // make cursor invisible
      device.CursorControl.Visible &#58;= false;
    
      // start drawing loop
    
      fps &#58;= 0;
    
      while&#40; device.Run &#41; do
      begin
        if &#40;device.WindowActive&#41; then
        begin
          device.VideoDriver.BeginScene&#40; true, true, Color.Create&#40; 0, 100, 100, 100 &#41; &#41;;
    
          device.SceneManager.DrawAll&#40;&#41;;
    				
          // draw the logo
          device.VideoDriver.Draw2DImage&#40;
            texLogo, Position2D.Create&#40; 10, 10 &#41;,
            Rect.Create&#40; 0,0,88,31 &#41;,
            Rect.Create&#40; Position2D.Create&#40; 0, 0 &#41;,device.VideoDriver.ScreenSize&#41;,
            Color.Create&#40;$ffffff&#41;, false&#41;;
    
          device.VideoDriver.EndScene&#40;&#41;;
    
          if &#40;fps <> device.VideoDriver.FPS&#41; then
          begin
            fps &#58;= device.VideoDriver.FPS;
            device.WindowCaption &#58;= 'Irrlicht.NET Delphi.NET example 01 - Hello World &#91;'+ device.VideoDriver.Name + '&#93; fps&#58;' + fps.ToString;
          end;
        end;
      end; // end drawing-loop
    end.
    I can confirm that the problem occurs in Delphi 8 ( with all the patches ) as well (. I have sent the assembly to Borland in the hope that it will help them fix the problem.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  8. #8

    Delphi .Net and Irrlicht

    no i went for something simple like just creating the irrlicht device.

    But i tried your code there and same thing With Delphi 2005 as with my own code.

    I'll await any news you hear and continue to use GLScene atm.

  9. #9

    Delphi .Net and Irrlicht

    GOOD NEWS!! It appears that Borland have already fixed the problem in Delphi 20005 Service Pack 2 which was released on March the 8th. I have just tested it and it works perfectly with the code I ported and posted earlier.

    I hope this helps.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  10. #10

    Delphi .Net and Irrlicht

    Nice

    Had'nt even looked at Delphi 2005 again since trying that

    Got it working nice to have Directx 9 without having to write everything yourself

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •