I have added the "WindowId" feature in Mac OS X so that user can integrate Irrlicht inside a window of some other application. It can be helpful for creating level editor kind of application in Mac.
Changes have been made in CIrrDeviceMacOSX.mm file. search for "CreationParams.WindowId" to see the changes.
Steps to use Irrlicht inside wxWidgets window are..
1. download the 2.9.0 version of wxWidgets
2. configure and build it with cocoa enable settings as Irrlicht uses cocoa interface
3. recompile Irrlicht with new CIrrDeviceMacOSX.mm
4. Create wxWidget application
5. use
Code: Select all
SIrrlichtCreationParameters param;
param.WindowId = this->GetHandle();
device = irr::createDeviceEx(param);
6 call these functions in onSize(wxSizeEvent& event) function
Code: Select all
driver->OnResize( dimension2di(GetClientSize().GetWidth(), GetClientSize().GetHeight()) );
driver->setViewPort( rect<s32>(0,0,GetClientSize().GetWidth(), GetClientSize().GetHeight()) );
device->setResizeAble(true); //HACK..have to call to resize opengl context this is the path of revised CIrrDeviceMacOSX.mm code and small application
http://sageinfolabs.com/mac.tar.bz2