Topic: I am stuck with setup and compilation of the irrlicht modules, please

Hi,

Hope you are doing well. Thank you for providing us the wrapper modules for irrlicht.

I am trying to get started with the irrlicht module and blitzmax and blitz3D.

I was able to set up the latest wrapper for irrlicht available as binary form from your site. But when I try to get the XEffects module
to work it compiles without errors but fails to show up any rendering window while the process still shows up in the task manager.

I then tried older version of the irrlicht module to work with XEffects module, but this it showed memory access exception at run-time.

1. So my question is how can I get the latest irrlicht module and the X-Effects reloaded module to work together ?

2. I also tried to re-build the irrlicht module but got compilation error stating - type rect not defined.
    Can you please tell me what I am doing wrong here ? I am using MINGW - GCC and G++ version 4.7.2

Here is the compilation output log for irrlicht -

Compiling:irrlicht.cpp
In file included from C:/BlitzMax/mod/irrlicht.mod/core.mod/irrlicht.cpp:164:0:
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:57:11: error: 'rect' does not name a type
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:57:11: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:57:15: error: expected ',' or '...' before '<' token
C:/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)':
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:60:48: error: 'clip' was not declared in this scope
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h: At global scope:
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:76:11: error: 'rect' does not name a type
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:76:11: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:76:15: error: expected ',' or '...' before '<' token
C:/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)':
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:79:103: error: 'clip' was not declared in this scope
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:79:109: error: 'checkClientArea' was not declared in this scope
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h: At global scope:
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:85:11: error: 'rect' does not name a type
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:85:11: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:85:15: error: expected ',' or '...' before '<' token
C:/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)':
C:/BlitzMax/mod/irrlicht.mod/core.mod/gui/iguiskin_wrap.h:88:39: error: 'clip' was not declared in this scope
Build Error: failed to compile C:/BlitzMax/mod/irrlicht.mod/core.mod/irrlicht.cpp
Process complete


3. How do I use the blitz3D module bundled within irrlicht module from within the blitz3D IDE ? All the files within the blitz3D module have .bmx extensions, so how do I set the whole thing up so that I can use the functions from within blitz3D ?


4. What do I use for sound in blitzmax and blitz3D while using the irrlicht modules ? Will the inbuilt sound functions available in
    blitzmax and blitz3D work with the irrlicht renderer ? Or are there any better alternatives ?

5. What do I use for PHYSICS in blitzmax and blitz3D while using irrlicht modules ? Is there anything well featured available with
    docs and tutorials ?

Thanks,

Re: I am stuck with setup and compilation of the irrlicht modules, please

greetings!  my apologies for the delayed response. 


1) i tried running XEffects as well and couldnt get it to go.  I will see if i can find where it is crashing. 

3) my apologies for the confusion.  The B3D mod is meant to run under BlitzMax only but provide a command set similar to Blitz3D.  Note it is unfortunately not complete but is quite functional and a great way to see how B3D commands can be translated to Irrlicht.

4) BlitzMax comes with sound support.  check on TSound and TChannel in the manual

5) I'm not sure if anyone has a mod out there for physics or not.  I would check on the BMAX forums.

2) currently there is an error in one of the wrapper files.  to rebuild the Irrlicht module please replace the contents of iguiskin_wrap.h with the following code:

//------------------------------------------------------------------------------------
// irr::gui::IGUISkin wrappers
// do not delete a pointer to this
//------------------------------------------------------------------------------------

extern "C" 
{
    s32 IrrGUI_IGUISkin_getSize(IGUISkin* skin,EGUI_DEFAULT_SIZE which)
    {
        if (skin)
            return skin->getSize(which);
        else return 0;
    }
    
    void IrrGUI_IGUISkin_setSize(IGUISkin* skin,EGUI_DEFAULT_SIZE which, s32 size)
    {
        if (skin)
            skin->setSize(which,size);
    }
    
    SColor* IrrGUI_IGUISkin_getColor(IGUISkin* skin,EGUI_DEFAULT_COLOR which)
    {
        if (skin)
            return new SColor(skin->getColor(which));
        else return 0;
    }
    
    void IrrGUI_IGUISkin_setColor(IGUISkin* skin,EGUI_DEFAULT_COLOR which,SColor* newColor)
    {
        if (skin)
            skin->setColor(which,*newColor);
    }
            
    const c8* IrrGUI_IGUISkin_getDefaultText(IGUISkin* skin,EGUI_DEFAULT_TEXT which)
    {
        if (skin) {
            stringc* text=new stringc(skin->getDefaultText(which));
            return text->c_str();
        } else return 0;
    }
    
    void IrrGUI_IGUISkin_setDefaultText(IGUISkin* skin,EGUI_DEFAULT_TEXT which, const c8* newText)
    {
        stringw w_text = newText;
        if (skin)
            skin->setDefaultText(which,w_text.c_str());
    }
    
    void IrrGUI_IGUISkin_draw3DButtonPaneStandard(IGUISkin* skin,IGUIElement* element,const core::rect<s32>* rect,const core::rect<s32>* clip=0)
    {
        if (skin)
            skin->draw3DButtonPaneStandard(element,*rect,clip);
    }
    
    void IrrGUI_IGUISkin_draw3DButtonPanePressed(IGUISkin* skin,IGUIElement* element, 
                const core::rect<s32>* rect,
                const core::rect<s32>* clip=0)
    {
        if (skin)
            skin->draw3DButtonPanePressed(element,*rect,clip);
    }
    
    void IrrGUI_IGUISkin_draw3DSunkenPane(IGUISkin* skin,IGUIElement* element,
                video::SColor* bgcolor, bool flat, bool fillBackGround,
                const core::rect<s32>* rect,
                const core::rect<s32>* clip=0)
    {
        if (skin)
            skin->draw3DSunkenPane(element,*bgcolor,flat,fillBackGround,*rect,clip);
    }
    
    // must delete return value
    rect<s32>* IrrGUI_IGUISkin_draw3DWindowBackground(IGUISkin* skin,IGUIElement* element,
                bool drawTitleBar, SColor* titleBarColor,
                const core::rect<s32>* rect,
                const core::rect<s32>* clip = 0, core::rect<s32>* checkClientArea = 0)
    {
        if (skin)
            return new core::rect<s32>(skin->draw3DWindowBackground(element,drawTitleBar,*titleBarColor,*rect, clip, checkClientArea));
        else return 0;
    }
    
    void IrrGUI_IGUISkin_draw3DMenuPane(IGUISkin* skin,IGUIElement* element,
                const core::rect<s32>* rect,
                const core::rect<s32>* clip=0)
    {
        if (skin)
            skin->draw3DMenuPane(element,*rect,clip);
    }
    
    void IrrGUI_IGUISkin_draw3DToolBar(IGUISkin* skin,IGUIElement* element,
                const core::rect<s32>* rect,
                const core::rect<s32>* clip=0)
    {
        if (skin)
            skin->draw3DToolBar(element,*rect,clip);
    }
        
    // do not delete
    IGUISpriteBank* IrrGUI_IGUISkin_getSpriteBank(IGUISkin* skin)
    {
        if (skin)
            return skin->getSpriteBank();
        else return 0;
    }
    
    void IrrGUI_IGUISkin_setSpriteBank(IGUISkin* skin,IGUISpriteBank* bank)
    {
        if (skin)
            skin->setSpriteBank(bank);
    }
    
    u32 IrrGUI_IGUISkin_getIcon(IGUISkin* skin,EGUI_DEFAULT_ICON icon)
    {
        if (skin)
            return skin->getIcon(icon);
        else return 0;
    }
    
    void IrrGUI_IGUISkin_setIcon(IGUISkin* skin,EGUI_DEFAULT_ICON icon, u32 index)
    {
        if (skin)
            skin->setIcon(icon,index);
    }
    
    s32 IrrGUI_IGUISkin_getType(IGUISkin* skin)
    {
        if (skin)
            return skin->getType();
        else return -1;
    }
    
    void IrrGUI_IGUISkin_drawIcon(IGUISkin* skin,IGUIElement* element, EGUI_DEFAULT_ICON icon,
        position2di* position, u32 starttime=0, u32 currenttime=0, 
        bool loop=false, recti* clip=0)
    {
        if (skin)
            skin->drawIcon(element,icon,*position,starttime,currenttime,loop,clip);
    }

    // do not delete
    IGUIFont* IrrGUI_IGUISkin_getFont(IGUISkin* skin,EGUI_DEFAULT_FONT which=EGDF_DEFAULT)
    {
        if (skin)
            return skin->getFont(which);
        else return 0;
    }

    void IrrGUI_IGUISkin_setFont(IGUISkin* skin,IGUIFont* font, EGUI_DEFAULT_FONT which=EGDF_DEFAULT)
    {
        if (skin)
            skin->setFont(font,which);
    }

    void IrrGUI_IGUISkin_draw2DRectangle(IGUISkin* skin, IGUIElement* element, SColor* color, rect<s32>* pos, rect<s32>* clip = 0)
    {
        if (skin)
            skin->draw2DRectangle(element, *color, *pos, clip);
    }
    
    void IrrGUI_IGUISkin_draw3DTabButton(IGUISkin* skin, IGUIElement* element, bool active, const core::rect<s32>* rect, const core::rect<s32>* clip=0, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT)
    {
        if (skin)
            skin->draw3DTabButton(element, active, *rect, clip, alignment);
    }

    void IrrGUI_IGUISkin_draw3DTabBody(IGUISkin* skin, IGUIElement* element, bool border, bool background, const core::rect<s32>* rect, const core::rect<s32>* clip=0, s32 tabHeight=-1, gui::EGUI_ALIGNMENT alignment=EGUIA_UPPERLEFT )
    {
        if (skin)
            skin->draw3DTabBody(element, border, background, *rect, clip, tabHeight, alignment); 
    }
}

Re: I am stuck with setup and compilation of the irrlicht modules, please

Gman,

I can't tell how happy I am to hear from you. It is good to know that you are still there to help us out.  Thank you for providing the
needed replacement code for proper re-compilation of the BlitzMAX Irrlicht module and also many thanks for pointing out the TSound and TChannel class of BlitzMAX.

I will wait for further update from your end about getting the Xeffects module working and also please do not forget a to suggest a proper well-featured PHYSICS module that can be used with BlitzMAX Irrlicht module ?

Lastly is there a BlitzMAX wrapper available for the SPARK particle engine http://sourceforge.net/projects/sparkengine/ to be used with the BlitzMAX Irrlicht module ? Or anything else similar available ?

Thanks,

Re: I am stuck with setup and compilation of the irrlicht modules, please

Any update Sir ?

Re: I am stuck with setup and compilation of the irrlicht modules, please

greetings Juggernaut.  My sincere apologies on the delay.  I have been unable to get v1.8 to talk to BMAX.  I will continue to work on it as I have time.  I have not changed my setup so there is something with the new Irrlicht release causing it.

Re: I am stuck with setup and compilation of the irrlicht modules, please

Hello gman!
I'm glad you're willing to update the irrlicht mod!
As said here:http://www.gprogs.com/viewtopic.php?id=481
I would add doc comments to the module if you will upload it afterwards.

bye

7 (edited by unz 2014-01-21 18:43:00)

Re: I am stuck with setup and compilation of the irrlicht modules, please

any updates?

I'm having issues using the addons.mod.
The application does nothing or crashes. sucks...
You only need to import the module.

EDIT:
Nevermind. I'm using Unity3D now.