Page 1 of 1

Embed Irrlicht in an existing GTK window

Posted: Sat Apr 15, 2006 7:23 pm
by mandrav
As you all know, currently Irrlicht cannot be used inside an existing GTK window (usually Linux).
Well, I have the patch for it but I don't know where to post this. Patch tracker at SF or hybrid's site?

Image
(click here for full size)

:lol:

Posted: Sat Apr 15, 2006 8:09 pm
by hybrid
I have no problems with hosting your files :D It's a permanent link with good connection and no size limits. Adding the direct link into this thread should be enough to make it available. I don't know whether the SF project pages are of any use. There are bugs announced which have been fixed for years now.

Posted: Sat Apr 15, 2006 8:53 pm
by mandrav
OK, I sent you a mail with the patch.
As a reference for everyone interested, here's how it works:

The IrrlichtDevice must be created using createDeviceEx. The WindowId member of SIrrlichtCreationParameters, must be set to point to a NULL-terminated string containing the display + ":" + windowid.

Code: Select all

    SIrrlichtCreationParameters params;

    Display* pDisplay = ...; // set this to the display
    Window winID = ...; // set this to your window id

    core::stringc winDesc = (long)pDisplay;
    winDesc += ':';
    winDesc += (int)winID;
    params.WindowId = (long)winDesc.c_str();

    params.DriverType = EDT_OPENGL;
    irr::IrrlichtDevice* pDevice = createDeviceEx(params);
That's it :)
Note that I have tested this only with OpenGL...

Posted: Wed Apr 19, 2006 2:02 am
by AndyCR
*breathes a big sigh of relief*

you might very possibly have just saved me tons of work! i was dreading this! thank you so much!! :D

Posted: Fri Apr 21, 2006 1:47 pm
by hybrid
Why did you disable the window close event? This breaks functionality at least for all other applications not embedded in GTK windows. Either check for the userSuppliedWindow in this case or change behavior inside the main application.

Posted: Mon Dec 18, 2006 3:45 pm
by hgc
Do you know how to put Irrlicht embbebded into a C++/CLI Windows Form? Could you show an example, please. I don't know how to do it...

Posted: Mon Jan 29, 2007 12:19 pm
by arixion
Hmmm ... why don't you put this patch into the main source tree for Irrlicht? Perhaps it could be integrated into Irrlicht 1.3 or sth?

Posted: Mon Jan 29, 2007 9:19 pm
by hybrid
There are several solutions what and how to store the server/display connection. This has to be fixed somehow.

Posted: Thu Oct 22, 2009 2:34 am
by netpipe
any news on this item of intrest ? it seems there is an issue with wx window handle params too.

this might be of use though
http://gtkglext.sourceforge.net/download