irrLicht + wxWidgets + Linux
Posted: Mon Jan 18, 2010 3:12 am
Hello
I'm getting into madness since i got most part of my personal project done until i begin to deal with the integration of irrLicht into a wxWidgets window under Linux (which means, X system).
I read that a wxFrame has a method useful to retrieve its handle, which i later i can use as a "windowId" parameter with irrLicht's createDeviceEx.
So, this is part of my code:
Instead of GtkWidget* hwnd i also tried just a (void*) pointer. In every case i just get:
X Error: BadDrawable (invalid Pixmap or Window parameter)
From call : X_CreateGC
X Error: BadDrawable (invalid Pixmap or Window parameter)
From call : X_PolyFillRectangle
X Error: BadDrawable (invalid Pixmap or Window parameter)
From call : X_PolyFillRectangle
X Error: BadPixmap (invalid Pixmap parameter)
From call : X_CreateCursor
X Error: BadGC (invalid GC parameter)
From call : X_FreeGC
X Error: BadPixmap (invalid Pixmap parameter)
From call : X_FreePixmap
X Error: BadPixmap (invalid Pixmap parameter)
From call : X_FreePixmap
X Error: BadWindow (invalid Window parameter)
From call : X_ChangeProperty
X Error: BadWindow (invalid Window parameter)
From call : X_ChangeProperty
X Error: BadWindow (invalid Window parameter)
From call : X_ChangeWindowAttributes
Please, help will be appreciated.
Regards,
Nico
I'm getting into madness since i got most part of my personal project done until i begin to deal with the integration of irrLicht into a wxWidgets window under Linux (which means, X system).
I read that a wxFrame has a method useful to retrieve its handle, which i later i can use as a "windowId" parameter with irrLicht's createDeviceEx.
So, this is part of my code:
Code: Select all
MainWindow* window = new MainWindow(NULL,-1,L"test");
window->Center();
window->Show(true);
//SetTopWindow(window);
GtkWidget* hwnd = window->GetHandle();
SIrrlichtCreationParameters params;
params.DeviceType = EIDT_BEST;
params.DriverType = this->driverType;
params.WindowSize = core::dimension2d<u32>(640,480);
params.Bits = 24;
params.EventReceiver = &receiver;
params.WindowId = hwnd;
this->device = createDeviceEx(params);
X Error: BadDrawable (invalid Pixmap or Window parameter)
From call : X_CreateGC
X Error: BadDrawable (invalid Pixmap or Window parameter)
From call : X_PolyFillRectangle
X Error: BadDrawable (invalid Pixmap or Window parameter)
From call : X_PolyFillRectangle
X Error: BadPixmap (invalid Pixmap parameter)
From call : X_CreateCursor
X Error: BadGC (invalid GC parameter)
From call : X_FreeGC
X Error: BadPixmap (invalid Pixmap parameter)
From call : X_FreePixmap
X Error: BadPixmap (invalid Pixmap parameter)
From call : X_FreePixmap
X Error: BadWindow (invalid Window parameter)
From call : X_ChangeProperty
X Error: BadWindow (invalid Window parameter)
From call : X_ChangeProperty
X Error: BadWindow (invalid Window parameter)
From call : X_ChangeWindowAttributes
Please, help will be appreciated.
Regards,
Nico