Author Topic: Irrlicht wrapper  (Read 2920 times)

0 Members and 1 Guest are viewing this topic.

Offline Guilect

  • Jr. Member
  • **
  • Posts: 86
Irrlicht wrapper
« on: June 07, 2010, 05:41:55 PM »
Irrlicht is a free 3D graphics engine.  It supports Software, DirectX 8, DirectX 9, and OpenGL.

Here is a port of Frank Dodd's FreeBasic Irrlicht Wrapper for you to play with.

You should get the complete Freebasic package HERE for all of the documentation.

The IWB package, HERE, (~8 Meg), provides 75 examples.
(Remember to create the import library for IrrlichtWrapper.dll; Tools->Create Import Library)
Use ALT+F4 to exit any demo.


To Do:
1.)  Particles : I need someone to help on this.  Can you get particles working?
2.)  Shaders : my graphics card does not support shaders.   :P




Offline sapero

  • Senior Developer
  • Hero Member
  • *****
  • Posts: 1291
Re: Irrlicht wrapper
« Reply #1 on: June 08, 2010, 04:00:33 AM »
Guilect,

I have found and fixed some bugs in your IrrlichtWrapper.inc. Some structures should passed by value, and somewhere you had string instead wstring.
I've started porting the original FB files (if there was no .eba file), but after a hour I just noticed that you have renamed all the files.

Attached the include file and 15 22 more samples.
« Last Edit: June 08, 2010, 04:19:49 AM by sapero »

Offline Guilect

  • Jr. Member
  • **
  • Posts: 86
Re: Irrlicht wrapper
« Reply #2 on: June 08, 2010, 05:32:41 AM »
Hi Sapero,

thanks for fixing the bugs.

As for renaming the files; yes and no. (It is a long story)
I starting porting an older version of the wrapper.
In this release the original files are miss labled themselves; starting somewhere around example #43-44?.
e.g. Frank Dodd calls the actual file "example 44" but in the source it would be called "example 45" (or something like like, just for illustrative purposes).
So I started to make the file names match the source code example numbers, seemed like the thing to do.
Later on, the file names matched up again with the source code numbers..
Then Frank comes out with newer versions of his wrapper, latest is v076.  Somewhere between the 2 releases he fixes all of the numberings.

I just saw that you got particles working!  Cool.
I will do a document compare between your .inc and mine inc. to see what was changed.
Appreciate your help.

Regards,
Guilect
« Last Edit: June 08, 2010, 06:51:08 AM by Guilect »

Offline Guilect

  • Jr. Member
  • **
  • Posts: 86
Re: Irrlicht wrapper
« Reply #3 on: June 08, 2010, 06:18:06 AM »
Quick question for you Sapero,

In your  include file you use 'string' for variable type when ever a file name is a parameter, for example.
I used a wstring.
Educated me here.
My thinking has always been that if you can use Unicode to do so.
That way your program should run on more PCs that use different character sets.
What is the flaw in my thinking?

Thanks,
Guilect
« Last Edit: June 08, 2010, 06:23:01 AM by Guilect »

Offline sapero

  • Senior Developer
  • Hero Member
  • *****
  • Posts: 1291
Re: Irrlicht wrapper
« Reply #4 on: June 08, 2010, 06:41:25 AM »
I just have read FB help to find out what is a zstring - null terminated string.
If you replace all "wstring" in both files (inc, bi) you'll see that 15 entries was found and replaced.
If you replace zstring to string in the .bi file, and then replace all "string" in both files, the editor will replace 51 entries in .bi, and 52 in .inc file. Huh? where is the additional string?
I have used the new IWBasic compiler to compile the examples. It showed me multiple "unable to convert string to wstring" warnings, so I started validating your translation, and found, that you have translated zstring to wstring.

Take care when passing a pointer variable to "pointer byref" function argument. Our current parser is ignoring the ByRef attribute, you need to pass a reference manually:
Code: [Select]
pointer p
declare function(pointer p byref)
function(&p)
Example: "60 Getting Node Children.eba", line 83. The new IWBasic compiler will do it automatically.



By the way, examples 100 and 101 are ultra slow on my 1.8 GHz mobile machine with Ati x600 graphic chip -> IrrDrawScene()
« Last Edit: June 08, 2010, 06:46:59 AM by sapero »

Offline Techno

  • Paid Subscriber
  • Full Member
  • *****
  • Posts: 238
Re: Irrlicht wrapper
« Reply #5 on: June 02, 2015, 11:24:43 AM »
Guilect,

I have found and fixed some bugs in your IrrlichtWrapper.inc. Some structures should passed by value, and somewhere you had string instead wstring.
I've started porting the original FB files (if there was no .eba file), but after a hour I just noticed that you have renamed all the files.

Attached the include file and 15 22 more samples.


Dear support

This file is corrupt. Can you please recent a new one?

Offline Bill-Bo

  • Full Member
  • ***
  • Posts: 236
Re: Irrlicht wrapper
« Reply #6 on: June 02, 2015, 04:06:00 PM »
Techno,

Do you purposely look for corrupted zips that are 5 or 6 years old? You're becoming a downright pain. This site normally deals with either cbasic or iwbasic; not fbasic. The IWBasic link at the top of the page downloads the "Irrlicht.zip" file just fine. AND, would believe it's not corrupted?. Why worry about the FreeBasic zip. Like Brian commented on a different post, you aught to start doing some things on your own. You're not going to learn to wipe your ass if you want everybody else does it for you.

Bill