A short video of Irrlicht working with other libs
-
- Posts: 33
- Joined: Fri Mar 01, 2013 1:26 am
A short video of Irrlicht working with other libs
I just wanted to share what I've done lately with Irrlicht : http://www.youtube.com/watch?v=NOFQQBR3Nug
Nothing amazing but I thought that it'd be cool show it off
The libs I used are in the description.
Nothing amazing but I thought that it'd be cool show it off
The libs I used are in the description.
-
- Competition winner
- Posts: 688
- Joined: Mon Sep 10, 2012 8:51 am
Re: A short video of Irrlicht working with other libs
What? Nothing amazing? Aww.... Just kidding.
You've certainly tackled integration. Good job
You've certainly tackled integration. Good job
-
- Posts: 33
- Joined: Fri Mar 01, 2013 1:26 am
Re: A short video of Irrlicht working with other libs
Thanks. I said that because all the libs are pretty well coded (and most of them are known to be working well alongside Irrlicht) so I just had to tweak the examples. The only thing that is quite annoying is when a problem or a bug is linked to many libs, it's hard to debug because there are not that much information about libs working together.chronologicaldot wrote:What? Nothing amazing? Aww.... Just kidding.
You've certainly tackled integration. Good job
-
- Posts: 1010
- Joined: Mon Oct 24, 2011 10:03 pm
- Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d
Re: A short video of Irrlicht working with other libs
Certainly a nice integration, I was just about to tackle CEGUI myself :3
"this is not the bottleneck you are looking for"
-
- Posts: 33
- Joined: Fri Mar 01, 2013 1:26 am
Re: A short video of Irrlicht working with other libs
Just to spare you some pain, don't try to implement the tooltips with the last version of CEGUI. They don't work (at least for me and another guy from the CEGUI forum).aaammmsterdddam wrote:Certainly a nice integration, I was just about to tackle CEGUI myself :3
-
- Posts: 1010
- Joined: Mon Oct 24, 2011 10:03 pm
- Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d
Re: A short video of Irrlicht working with other libs
thanks, I'll keep that in mind (didn't have any thoughts of implementing them as of now but I might get that idea)Nyx Erebos wrote:Just to spare you some pain, don't try to implement the tooltips with the last version of CEGUI. They don't work (at least for me and another guy from the CEGUI forum).aaammmsterdddam wrote:Certainly a nice integration, I was just about to tackle CEGUI myself :3
"this is not the bottleneck you are looking for"
Re: A short video of Irrlicht working with other libs
Hi...
Any chance of you posting a link to the code? I'm very interested in the integration with CEGUI...
TIA
Any chance of you posting a link to the code? I'm very interested in the integration with CEGUI...
TIA
-
- Posts: 33
- Joined: Fri Mar 01, 2013 1:26 am
Re: A short video of Irrlicht working with other libs
For now I don't want to share the whole code because it's quite poorly writtenLordJonas wrote:Any chance of you posting a link to the code? I'm very interested in the integration with CEGUI...
Atm my CEGUI stuff is almost all hard coded in the main, here's an excerpt :
Code: Select all
/*
* This will create and initialise the following objects :
*- CEGUI::IrrlichtRenderer
*- CEGUI::IrrlichtResourceProvider
*- CEGUI::IrrlichtImageCodec
*- CEGUI::System
*/
/*IrrlichtRenderer& guiRenderer = */IrrlichtRenderer::bootstrapSystem(*device);
IrrlichtResourceProvider * IRprovider = static_cast<IrrlichtResourceProvider*>(System::getSingleton().getResourceProvider());
IRprovider->setResourceGroupDirectory("schemes",resourcesPath+"schemes");
IRprovider->setResourceGroupDirectory("imagesets",resourcesPath+"imagesets");
IRprovider->setResourceGroupDirectory("fonts",resourcesPath+"fonts");
IRprovider->setResourceGroupDirectory("layouts",resourcesPath+"layouts");
IRprovider->setResourceGroupDirectory("looknfeels",resourcesPath+"looknfeel");
IRprovider->setResourceGroupDirectory("lua_scripts",resourcesPath+"lua_scripts");
ImageManager::setImagesetDefaultResourceGroup("imagesets");
Font::setDefaultResourceGroup("fonts");
Scheme::setDefaultResourceGroup("schemes");
WidgetLookManager::setDefaultResourceGroup("looknfeels");
WindowManager::setDefaultResourceGroup("layouts");
ScriptModule::setDefaultResourceGroup("lua_scripts");
CEGUI::SchemeManager::getSingleton().createFromFile("TaharezLook.scheme");
Font* CEGUIFont = &(CEGUI::FontManager::getSingleton().createFromFile("DejaVuSans-10.font"));
System::getSingleton().getDefaultGUIContext().setDefaultFont( "DejaVuSans-10" );
System::getSingleton().getDefaultGUIContext().getMouseCursor().setDefaultImage("TaharezLook/MouseArrow");
System::getSingleton().getDefaultGUIContext().getMouseCursor().setVisible(true);
//creating the root window which is invisible
WindowManager& wmgr = WindowManager::getSingleton();
Window* myRoot = wmgr.createWindow( "DefaultWindow", "root" );
System::getSingleton().getDefaultGUIContext().setRootWindow(myRoot);
//menu
Window* myMenu = wmgr.createWindow( "DefaultWindow", "menu" );
myRoot->getRootWindow()->addChild(myMenu);
myMenu->setVisible(false);
myMenu->deactivate();
//interface
Window* myInterface = wmgr.createWindow( "DefaultWindow", "interface" );
myRoot->getRootWindow()->addChild(myInterface);
//creating a test window
FrameWindow* fWnd = static_cast<FrameWindow*>(wmgr.createWindow( "TaharezLook/FrameWindow", "testWindow" ));
//add the new window to the menu
myMenu->addChild(fWnd);
// position a quarter of the way in from the top-left of parent.
//UDim(scale,offset) | scale in %, offset in pixels
fWnd->setPosition( UVector2( UDim( 0.25, 0 ), UDim( 0.25, 0 ) ) );
// set size to be half the size of the parent
fWnd->setSize( USize( UDim( 0.5, 0 ), UDim( 0.5, 0 ) ) );
fWnd->setText( "Hello World!" );
//the menu window can't be modified by the mouse
myMenu->setMousePassThroughEnabled(true);
To interact with the windows you need to add some code in the Irrlicht event manager (I basically have the same as in the tutorials):
Code: Select all
case irr::KEY_KEY_0:
CEGUI::System::getSingleton().getDefaultGUIContext().injectChar(0x0030);
return true;
case irr::KEY_BACK:
CEGUI::System::getSingleton().getDefaultGUIContext().injectKeyDown(CEGUI::Key::Backspace);
//for now the keyup is here (put it into the Irrlicht keyup)
CEGUI::System::getSingleton().getDefaultGUIContext().injectKeyUp(CEGUI::Key::Backspace);
return true;
Code: Select all
System::getSingleton().getDefaultGUIContext().injectMouseButtonDown(LeftButton);
Code: Select all
CEGUI::System::getSingleton().injectTimePulse(deltaTime*0.001);
I have another video focusing more on physics this time (I know the quality is pretty bad) : https://www.youtube.com/watch?v=1YYqM8z1jtU
-
- Posts: 33
- Joined: Fri Mar 01, 2013 1:26 am
Re: A short video of Irrlicht working with other libs
Another short video to show the bullet debug drawer : http://www.youtube.com/watch?v=v216aUkpf2U
-
- Posts: 33
- Joined: Fri Mar 01, 2013 1:26 am
Re: A short video of Irrlicht working with other libs
And now running on Windows (with a few more features, read the description for a recap).
http://www.youtube.com/watch?v=J8nFTD5s818
http://www.youtube.com/watch?v=J8nFTD5s818