Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 43

Thread: irrPascal :: Irrlicht for Pascal

  1. #21

    irrPascal :: Irrlicht for Pascal

    There is something strange in Pascal

    I finished almost all basic functions and then testing started but... everything is working nice when wrapper functions are called from C++, but Pascal code generates division by zero runtime error whenever some mesh is added to scene. I guess there is something wrong with parameter types (size of types are different in Pascal and C++ or something like that) or with precision (Set8087CW...)?

    I uploaded mini version of wrapper and C++ and Pascal program that uses it. I can't figure what is wrong... maybe someone else can?

    Download: http://www.geocities.com/srki_82/Mini.zip

  2. #22

    irrPascal :: Irrlicht for Pascal

    Never mind... I found solution... Set8087CW($133f) fixed everything.

  3. #23

    irrPascal :: Irrlicht for Pascal

    Pascal has compiled Irrlicht HelloWorld tutorial

    For now all calls are made directly to wrapper, but basic classes will be completed soon so HelloWorld will look like original one written in C++ (no need for temp. vars, using classes for calls,...).

  4. #24

    irrPascal :: Irrlicht for Pascal

    why you actually need a wrapper dll? I thought irrlicht exports functions using interfaces, does it not? if that's the case I see no reason for a wrapper dll, you just need correct interface declarations and use those.....if I'm wrong please correct me....

  5. #25

    irrPascal :: Irrlicht for Pascal

    Well... classes like vector3d<T>, SColor, SMaterial, etc. are not interfaces so I have to write wrapper dll to create and use that classes.

    If there is solution that doesn't require wrapper dll, I will be happy to hear how to do that.

    I tried to use exported abstract classes for device, video driver and scene manager but I never get them working in Pascal.

  6. #26

    irrPascal :: Irrlicht for Pascal

    look at the .NET wrapper for irrlicht, that's all I can say

    EDIT:
    so no, it's not as cool as I thought marshalling is required for these non-interface types...

  7. #27

    irrPascal :: Irrlicht for Pascal

    For now, we need this wrapper dll. Flatten version of Irrlicht classes in this wrapper can be used in almost any compiler that supports dynamic loading libraries... it would be useful for Pascal, VB, GameMaker, C and many ther programmers

    BTW this article helped me in the begging: http://www.rvelthuis.de/articles/articles-cppobjs.html

  8. #28

    irrPascal :: Irrlicht for Pascal

    I'm having trouble compiling latest version with GCC, here's what errors I get when I try to build irrPascal wrapper in CodeBlocks:
    IrrAttributes.cpp:710: error: 'class irr::io::IAttributes' has no member named 'addUserPointer'
    IrrAttributes.cpp:722: error: 'class irr::io::IAttributes' has no member named 'getAttributeAsUserPointer'
    IrrAttributes.cpp:728: error: 'class irr::io::IAttributes' has no member named 'getAttributeAsUserPointer'

  9. #29

    irrPascal :: Irrlicht for Pascal

    I used the latest Irrlich sources for building IrrPascal. Download the latest version from SVN or simply remove functions that do not exists in your header files.

  10. #30

    irrPascal :: Irrlicht for Pascal

    Classes are updated so HelloWorld tutorial is almost identical to C++ version.

    BTW FPC/Laz make difference between PChar and Pointer so I can overload functions with that types, but to Delphi PChar is the same as Pointer and it cann't overload functions like:
    Code:
    function A&#40;a&#58; PChar&#41;&#58; Boolean; overload;
    function B&#40;b&#58; Pointer&#41;&#58; Boolean; overload;
    Is there some switch to disable that?

Page 3 of 5 FirstFirst 12345 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
  •