Our game "Slam Soccer 2006" has a stadium editor, which consists of a Java Swing Frame and Controls and an Irrlicht frame in the middle.
Screenshot: http://www.bolzplatz2006.de/global/graf ... edit02.jpg
This is possible with createDeviceEx under windows (see http://irrlicht.sourceforge.net/tut014.html )
My question: Is something similar also possible for Linux (X11)? If yes, is it hard to do or only some lines of code?
If no, do you have an idea how we could run the stadium editor under linux anyway? Perhaps a borderless window that we move to the right position? (Is this possible, if yes, how?)
Thanks for any ideas
Render to X11 window?
Anything is possible under linux ... the only problem is that you have a choice of like 1 000 different Widget creators.
Your best bet would be to use either GTK or Java ... that way you won't have to worry about specific KD or GNOME bindings.
What you would do instead of opening a Window's class you would rather use a Linux class.
Look at products like KDevelop or QT ... they will have the window calls that you require. All you need to do then is import your IrrLicht Linux library and with a little tweaking your program should work quite easily.
Although ... if you using Java it should be even easier.
Your best bet would be to use either GTK or Java ... that way you won't have to worry about specific KD or GNOME bindings.
What you would do instead of opening a Window's class you would rather use a Linux class.
Look at products like KDevelop or QT ... they will have the window calls that you require. All you need to do then is import your IrrLicht Linux library and with a little tweaking your program should work quite easily.
Although ... if you using Java it should be even easier.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
@geekworx: Please try to understand the problem stated before posting some unrelated or unspecific blah.
There is currently no support for external windows. A patch for allowing integration into GTK windows had been posted in the bug forum some time ago. It could also be possible to make the Irrlicht window a child of another window after creation. But I'm not sure how and with which consequences. It would be better to have some code in the Linux Device which handles external windows just as the Windows Device.
There is currently no support for external windows. A patch for allowing integration into GTK windows had been posted in the bug forum some time ago. It could also be possible to make the Irrlicht window a child of another window after creation. But I'm not sure how and with which consequences. It would be better to have some code in the Linux Device which handles external windows just as the Windows Device.
Here is a screenshot how we solved the problem:
http://www.xenoage.com/temp/scrshot/linuxge2.jpg
3 windows (2 Swing, 1 Irrlicht), but arranged in this way they look ok
http://www.xenoage.com/temp/scrshot/linuxge2.jpg
3 windows (2 Swing, 1 Irrlicht), but arranged in this way they look ok
I did not exactly understand your question.hybrid wrote:What kind of native handle does Swing provide? Do you get a Window from X11?
Short description for both OSs:
Windows:
I want to use one maximized window with Irrlicht painting in a panel in the lower right corner. I can not use Swing for this control, because Irrlicht needs a HWND (window handle) so it can be initialized within a native "window" (means "panel" in our case). So I use a AWT panel (AWT is managed by the OS, Swing is managed by Java), from which I get the HWND by a small DLL (C++ code which returns the panel's HWND, can be found in the web).
Once Irrlicht is initialized in this panel, I overwrite the panel's paint()-method and call the Irrlicht drawing functions there.
Linux:
X11 seems to no have simple HWNDs, or they are not useable in Irrlicht at least. So I have no choice but creating a new Irrlicht window. Unfortunately I have no control over the window in Java, that means for example, I can not set it's position or size. But KDE automatically places the window on a acceptable position when it is initialized after the left toolbar window. Then the user has to move the windows by hand so they look lke on the screenshot.
If you have ideas how I could move the Irrlicht window, just tell me
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Indeed this was my question. The usual X11 native handles are Window ids. So you'll need a visual or a Window id or something.
Allowing to move the window is a different thing which could be possible, too. Using XMoveWindow is possible here, so grab the Exposed Data and use XMoveWindow with the Window handle stored there.
Allowing to move the window is a different thing which could be possible, too. Using XMoveWindow is possible here, so grab the Exposed Data and use XMoveWindow with the Window handle stored there.