Building the Irrlicht mod?

BlitzMax Forums/BlitzMax Programming/Building the Irrlicht mod?

zcbeaton(Posted 2012) [#1]
Hey,

I'm using gman's Irrlicht wrapper (or trying to) on Linux, and struggling with certain errors while building. I'm using Ubuntu 12.04 in 64-bit, which is already going to cause trouble, no doubt, but I've come fairly far. I've downloaded the engine itself, created a 32-bit binary, but building the mod itself with BMK gives me these errors:

Compiling:irrlicht.cpp
In file included from /home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/irrlicht.cpp:164:0:
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:57:11: error: ‘rect’ does not name a type
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:57:11: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:57:15: error: expected ‘,’ or ‘...’ before ‘<’ token
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h: In function ‘void IrrGUI_IGUISkin_draw3DButtonPanePressed(irr::gui::IGUISkin*, irr::gui::IGUIElement*, const irr::core::rect<int>*, int)’:
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:60:48: error: ‘clip’ was not declared in this scope
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h: At global scope:
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:76:11: error: ‘rect’ does not name a type
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:76:11: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:76:15: error: expected ‘,’ or ‘...’ before ‘<’ token
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h: In function ‘irr::core::rect<int>* IrrGUI_IGUISkin_draw3DWindowBackground(irr::gui::IGUISkin*, irr::gui::IGUIElement*, bool, irr::video::SColor*, const irr::core::rect<int>*, int)’:
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:79:103: error: ‘clip’ was not declared in this scope
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:79:109: error: ‘checkClientArea’ was not declared in this scope
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h: At global scope:
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:85:11: error: ‘rect’ does not name a type
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:85:11: error: ISO C++ forbids declaration of ‘parameter’ with no type [-fpermissive]
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:85:15: error: expected ‘,’ or ‘...’ before ‘<’ token
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h: In function ‘void IrrGUI_IGUISkin_draw3DMenuPane(irr::gui::IGUISkin*, irr::gui::IGUIElement*, const irr::core::rect<int>*, int)’:
/home/connor/Downloads/blitzmax/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:88:39: error: ‘clip’ was not declared in this scope


And then, unsurprisingly, building the mod fails. I tried to leave out iguiskin_wrap altogether by removing its include in the rest of the mod, but it doesn't want to build any example code without this bit, so I guess I have to solve this problem.

Any suggestions?


zcbeaton(Posted 2012) [#2]
Fixed it! And I'm very glad about it, too.

Seems the problem was to do with namespaces. I went through iguiskin_wrap.h and made sure all references to 'rect' were actually 'core::rect', and the problem went away. No errors whatsoever. I'm quite surprised (and pleased). Hope this helps someone else!


Hardcoal(Posted 2013) [#3]
How is the irrlicht engine compering to xors and does it fully supported in blitzmax?


UNZ(Posted 2013) [#4]
I don't know xors so I have no comparision.

As far as I know gman wrapped the whole irrlicht engine v1.7.3. I know that it works on win and linux (dont have a mac). The current version of irrlicht is 1.8 though.
IMO it is a very nice render engine with easy to understand oop design. I decided to use irrlicht with BMax over minib3d (not oop enough and too much oriented at b3d. I wanted to improve) and orge (I read it has more power but it is a harder to learn as well and the BMax examples were not as good explained as the irrlicht ones)

I choosed irrlicht 'cause the wrapper seems very complete and irrlicht can open a lot of 3d files (including .b3d and .ms3d) and has a gui system and a particle system integrated. What I wanted were nice shadows (check), antialiasing (check) and per pixel lightning (check). Plus there is also a b3d.mod which wraps irrlicht in a b3d oriented style. Thats good to learn from if you know b3d.
At the moment I try to wrap newton game dynamics to use with irrlicht and I am advancing. Could become cool.


Hardcoal(Posted 2013) [#5]
what about phyics i didnt see anything about that..


UNZ(Posted 2013) [#6]
Irrlicht itself has only a small collision system (its more a renderer). Physics have to be added extern. Bullet physics looks awesome but I coudn't find a BMax wrapper and it is over the top for me. Newton Game Dynamics is another physics engine. There is no wrapper (at least for 3d I think) for this too but the api is very easy to use. I tested simple primitive collision with linux and windows -> works. It may not be the fastes engine but a few hundred primitives are possible.
I'm wrapping the dll functions a little bit to be more oop and easy to use with the irrlicht mod. WIP


Hardcoal(Posted 2013) [#7]
I only wish for physx engine i only know it well but good work UNZ and god luck.
Thanks for answering me


IcemanBln(Posted 2013) [#8]
@zcbeaton Thanks for finding the FIX.
I have had the same problem.