Especially since Irrlicht 1.1
and irrEdit 0.3
are released, I'm getting tons of mails asking how to integrate Irrlicht in an application written using wxWidgets
, just like I did it with irrEdit. Here is a short howto:
There are two possibilities to display Irrlicht in wxWidgets.
A) Take a look at the 14th tutorial
, I am showing how to use Irrlicht in a Win32 window there. This is done by creating the IrrlichtDevice with a parameter set to the HWND handle of the Win32 window. If you are using wxWidgets in Windows, you can get that HWND and simply set it. The method in wxWidgets for this is named GetHandle()
B) There is a second way which is a bit more difficult, and I am using it in irrEdit. It only works in Windows and only with the Software and Direct3D devices, and not with OpenGL, currently. The advantage of this method is that you can render into multiple windows with variable sizes, but only need one IrrlichtDevice. The method IVideoDriver::endScene()
takes a windowId as parameter. Just set this to the window your want Irrlicht to render everything into (use GetHandle()
again), and that's it.
Hope this helped a bit.