Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 43

Thread: irrPascal :: Irrlicht for Pascal

  1. #11

    irrPascal :: Irrlicht for Pascal

    I made some modifications to Pascal units and wrapper and now test project forks with Lazarus and Delphi.

    Also... instead of using records to hold position, dimension, vectors, etc... I'll use original Irrlicht classes. Position and dimension already works (cursor controller use new position class).

  2. #12

    irrPascal :: Irrlicht for Pascal

    I still get an empty window with Delphi 7 PE and have not a slight idea what might be wrong. Compiling as console application shows that input works correctly - characters and mouse position are echoed in console window. It might be something wrong with device creation function in Delphi, but this is just my guess, because when I change driver type in Lazarus to EDT_NULL- only console window pops up, but when I try to do same thing in Delphi - device window is created, and it even handles input (shows mouse position in console). Maybe it's a sign that I should move on to Lazarus permanently? But I just can't drop Delphi and its unbelievably fast compile times.

  3. #13

    irrPascal :: Irrlicht for Pascal

    I updated code a little and Delphi problem still exists... the weirdest thing is that when you use just wrapper functions (no classes or something else... just device_xxxxx, video_xxxxx from Irrlicht.pas every thing is working fine on Delphi.

    I'll try debugging IrrPascal.dll and maybe I'll see what exactly is passed to it by Delphi and Lazarus.

    For now... Lazarus is only FPC/Lazarus is only choice.

  4. #14

    irrPascal :: Irrlicht for Pascal

    It seams that Delphi instead of EDT_XXXXX enums sends something else to IrrPascal.dll

    Something that I don't understand... if I write code like this
    Code:
    constructor TIrrDevice.Create(driverType: VIDEO_DRIVER_TYPE; Width: Integer;
      Height: Integer; bits: Integer; fullscreen: Boolean; stencilbuffer: Boolean;
      vsync: Boolean; reciver: IIrrEventReceiver);
    begin
      inherited Create(device_createDevice(EDT_OPENGL, Width, Height, bits,
        fullscreen, stencilbuffer, vsync), False, False);
    
      if GetIrrObject = nil then
        raise Exception.Create('Error creating Irrlicht Device');
        
      EventReceiver := reciver;
      FResizeAble := False;
      FWindowCaption := '';
    end;
    notice that EDT_OPENGL is set as the first parameter to device_createDevice function, everything is working just right but if I write driverType wrong value is passed to IrrPascal.dll

    I really don't know what to do. Does Delphi requires some special way of sending and receiving enums to and from dlls with cdecl calling convention?

  5. #15

    irrPascal :: Irrlicht for Pascal

    There is a problem with enum type sizes. Just put {$MINENUMSIZE 4} to irlicht.inc and it will work (tested in Delphi 2007).
    Vampyre Imaging Library
    Earth Under Fire (PGD Big Boss 3rd place)
    Domains Of Chaos (PGD Multiplexity 5th place)

  6. #16

    irrPascal :: Irrlicht for Pascal

    Thanks Galfar, that was IT

    Now I can continue working on wrapper

  7. #17

    irrPascal :: Irrlicht for Pascal

    Great, finally it works on Delphi 7.

  8. #18

    irrPascal :: Irrlicht for Pascal

    Everything is going smoothly

    Change of plan... first things that we will see on irrlicht device will be gui elements. Wrapper dll already (SVN revision 15) contains functions for creating gui elements, code for modifying gui elements is not yet there.

    I'll try to finish IImage, ITexture, IGUISkin and IGUIFont and to complete IGUIEnviroment. Next things are gui elements.

    BTW when finished, could this wrapper be used in competitions?

  9. #19

    irrPascal :: Irrlicht for Pascal

    Quote Originally Posted by Srki_82
    BTW when finished, could this wrapper be used in competitions?
    I would say yes as long as the main game code is in Pascal.
    <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. #20
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    irrPascal :: Irrlicht for Pascal

    Yeah, it's just like .NET or any other API really...
    Jason McMillen
    Pascal Game Development
    Co-Founder





Page 2 of 5 FirstFirst 1234 ... 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
  •