Irrlicht wxWidgets Mac OS X Done

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
jidijaat
Posts: 7
Joined: Tue Mar 31, 2009 7:33 pm

Irrlicht wxWidgets Mac OS X Done

Post by jidijaat »

Hello,

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);
inside wxwidget class for creating Irrlicht device

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 
7 enjoy...

this is the path of revised CIrrDeviceMacOSX.mm code and small application

http://sageinfolabs.com/mac.tar.bz2
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Thanks, I've just commited it to the 1.7 branch. It would help for future patches to use the most recent SVN version of Irrlicht, and to provide patches (use SVN to generate them right away from your repository).
Post Reply