IrrlichtPas: Pascal bindings for Irrlicht

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
Stoney
Posts: 7
Joined: Sun Oct 25, 2009 8:20 pm
Location: Koenigsbrunn, Germany
Contact:

IrrlichtPas: Pascal bindings for Irrlicht

Post by Stoney »

This is yet another attempt to enable using Irrlicht with FreePascal or Delphi.

I know, there are already two existing pascal/Delphi bindings, but both of them have their disadvantages:
- Irr4Delphi: Uses Irrlicht 1.5; Not open-source, not supporting Linux or Mac OS X
- IrrPascal: Uses Irrlicht 1.3; developement halted; not supporting Linux or Mac OS X

I felt the need to create IrrlichtPas primarily for two reasons:
- My main development system is a MacBook Pro with Mac OS X, so I want to use Irrlicht on Mac OS X and the existing Irrlicht bindings do not cover that area
- I had a lot of problems getting SDL to work with Mac OS X Snow Leopard and converting my existing projects. Most of the problems are gone when SDL 1.2.14 was released, but new problems with SDL_gfx came up. That's when I began experimenting with Irrlicht, IrrlichtWrapper and FreePascal.


First of all, I'm actually quite lazy, that's why I didn't write my own Wrapper library, I'm using a slightly modified version of Frank Dodd's excellent IrrlichtWrapper for FreeBasic. I added support for Irrlicht 1.6 and expanded 2D functionality with three procedures (IrrDrawImageElementColor, IrrDraw2DRectangle, IrrSetColorKeyPos). There are still some major issues at the moment like the First-Person-Shooter-Camera not working correctly.


IrrlichtPas has been sucessfully tested on Windows, Linux and Mac OS X.
There are no classes at the moment, just a bunch of functions and procedures.

Here is a screenshot of IrrlichtPas working on Mac OS X Snow Leopard:
Image
Click on the image to enlarge.

Project Homepage: http://sourceforge.net/projects/irrlichtpas/
There is already an early alpha version for Win32 available which also works on Linux and Mac OS X if you compile the Irrlicht and IrrlichtWrapper libraries yourself. I will try to upload Linux and Mac OS X packages in the next few days.
tinhtoitrangtay
Posts: 70
Joined: Tue Oct 28, 2008 12:59 pm

Post by tinhtoitrangtay »

it can't unzip file
Stoney
Posts: 7
Joined: Sun Oct 25, 2009 8:20 pm
Location: Koenigsbrunn, Germany
Contact:

Post by Stoney »

Works for me on Mac OS X with standard unzip utility and Windows XP and 7 with WinRAR.
Which OS and zip/unzip tool are you using? Have you tried unzipping with WinRAR?
Edit: You could to try to download the file again and unzip with it with WinRAR.
panoramic
Posts: 6
Joined: Fri Jul 31, 2009 7:35 pm

Post by panoramic »

I'm very interested by your adaptation to pascal (Delphi).
I downloaded your software and I tried to run the examples with Delphi6.

First of all, in the file IrrlichtWrapper.pas, I had to change in function IrrAddTiledTerrain the line smoothing: integer = 0.0; by:
smoothing: integer = 0; and it compiles.

I have a problem with 04_Example_3DModel: the character appears and the executable crashes.

I'm interested by your work to provide my software (http://www.panoramic-language.com) with true 3D-game capabilities.
Stoney
Posts: 7
Joined: Sun Oct 25, 2009 8:20 pm
Location: Koenigsbrunn, Germany
Contact:

Post by Stoney »

panoramic wrote: I downloaded your software and I tried to run the examples with Delphi6.

First of all, in the file IrrlichtWrapper.pas, I had to change in function IrrAddTiledTerrain the line smoothing: integer = 0.0; by:
smoothing: integer = 0; and it compiles.

I have a problem with 04_Example_3DModel: the character appears and the executable crashes.
Thank you for testing IrrlichtPas with Delphi 6.
Are the other examples except for 04_Example_3DModel working?
Unfortunately I don't have Delphi 6 myself, I only have Delphi 3 / Delphi 7 Personal Edition and Turbo Delphi 2006 and haven't had time to test IrrlichtPas yet, because I've been using FreePascal for the last couple years.
IrrDelphi
Posts: 32
Joined: Tue Oct 13, 2009 10:59 am

Post by IrrDelphi »

If it is interesting, later I shall upload pas-headers for direct work with Irrlicht without wrappers
panoramic
Posts: 6
Joined: Fri Jul 31, 2009 7:35 pm

Post by panoramic »

I shall upload pas-headers for direct work with Irrlicht without wrappers
I'm very interested for that !
I intend to upgrade my software (written in Delphi) to a tool able to build 3D games with Irrlicht.
Stoney
Posts: 7
Joined: Sun Oct 25, 2009 8:20 pm
Location: Koenigsbrunn, Germany
Contact:

Post by Stoney »

IrrDelphi wrote:If it is interesting, later I shall upload pas-headers for direct work with Irrlicht without wrappers
I am really interested in how you achieved that, are you using a modified version of Irrlicht? Could you please provide some more information on the technical side?
panoramic
Posts: 6
Joined: Fri Jul 31, 2009 7:35 pm

Post by panoramic »

To work with Irrlicht without wrapper and using the pascal language is a dream for me.
How can you reach that?
IrrDelphi
Posts: 32
Joined: Tue Oct 13, 2009 10:59 am

Post by IrrDelphi »

I have written headers for this purpose and I shall upload them tomorrow. Also translated about 15 examples from original SDK

About tech. I try to explain that in English...

For classes c++ used thiscall call conversion, but delphi not supported them.
I write proc. for emulate this in delphi and write headers for use. That all)
And yes - I used original 1.6 (Earlier 1.5.1) library without modification.

ps. Minimal requires it's 2005 (recomended Turbo or higher) delphi. And I do not know about FPC.. These restrictions are because i used records with methods and overriding class(records) operators. example:

Code: Select all

...
class operator Positive(a: vector3df): vector3df;
class operator Negative(a: vector3df): vector3df;
...
var
 aa: vector3df;
 bb: vector3df;
...
 aa := aa + bb;
and etc..
Stoney
Posts: 7
Joined: Sun Oct 25, 2009 8:20 pm
Location: Koenigsbrunn, Germany
Contact:

Post by Stoney »

IrrDelphi wrote:I have written headers for this purpose and I shall upload them tomorrow. Also translated about 15 examples from original SDK
I'm looking forward to it. If it really works as you say, that's really a major step. :)

Operator overloading is supported with FreePascal. Well, trying to get it work with FreePascal will be one of the first thing I will do after you've uploaded you work.
IrrDelphi
Posts: 32
Joined: Tue Oct 13, 2009 10:59 am

Post by IrrDelphi »

Yes it real :wink: look http://irrlicht.sourceforge.net/phpBB2/ ... 334#211334

ps. about fpc: I have begun portation, but it is not finished yet.
At present examples not compile because of mistakes with operators overloading and many fpc lacks =\
Post Reply