IrrlichtPas: Pascal bindings for Irrlicht
IrrlichtPas: Pascal bindings for Irrlicht
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:
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.
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:
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.
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.
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.
Thank you for testing IrrlichtPas with Delphi 6.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.
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.
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:
and etc..
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;
I'm looking forward to it. If it really works as you say, that's really a major step.IrrDelphi wrote:I have written headers for this purpose and I shall upload them tomorrow. Also translated about 15 examples from original SDK
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.
Yes it real 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 =\
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 =\