PDA

View Full Version : IrrlichtPas: Pascal bindings for Irrlicht



Stoney
26-10-2009, 03:35 PM
I also posted this on the Irrlicht forums (http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=35655):

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 (http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=12416). 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:
http://freeze-dev.de/blog/wp-content/uploads/2009/10/irrpasmacos-300x187.jpg (http://freeze-dev.de/blog/wp-content/uploads/2009/10/irrpasmacos.jpg)
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.

loriendesign
30-10-2009, 11:41 AM
This is very good news. I use Irr4Delphi (it is excellent) but it was not updated for a long time. We have not received any news from Djoker - creator of Irr4Delphi.

And...

I tested you wrapper. I have problem in most examples, when i press the arrow keys the scene disappears. Please gain support for DirectX8 and DirectX9 for your wrapper.I switched the necessary dll files from Frank Dodd wrapper and i have support of DirectX8 and DirectX9, but without you custom 2d functions. All the examples work excellent еven arrow keys problem disapear. Only 02_Example_2DImages.exe not work. I suppose this example use your 2D custom functions.

Sorry for my bad English :(

Stoney
03-11-2009, 07:18 AM
I have problem in most examples, when i press the arrow keys the scene disappears.

I'm aware of that problem. This is what I meant with "major issues at the moment like First-Person-Camera not working correctly" in the original post.
The problem is that Frank Dodd added a lot of Irrlicht extensions and custom stuff like tiled terrain etc. which are not compatible with Irrlicht 1.6.



Please gain support for DirectX8 and DirectX9 for your wrapper.

I will probably distribute it like Frank Dodd does. One DLL compiled with GCC with just OpenGL support and one compiled with Visual Studio 2008 with support for DirectX8 and DirectX9.

dazappa
16-11-2009, 05:15 AM
I'd thought I bump this up and share my thoughts.
1. FPC needs some good 3D support.
2. In your skybox demo, the seams are quite visible. This example is also quite laggy.
3. Most of these demos don't seem too efficient/fast yet. Looks like what could be a <200 poly model is using 40% of my CPU? Seems a bit much... but as this is a wrapper I suppose it isn't necessarily your fault.

This project is off to a good start so far.