SFML community forums
Help => Window => Topic started by: shahn on November 19, 2010, 04:35:23 pm
-
I want to use SFML for platform-independent gamepad support, but I already have a working GUI using Qt. I looked at the Qt sample in SFML-1.6, which seems to be very close to what I want.
Question 1: Does this still work with SFML-2 from svn? More specifically: Is SFML's WindowHandle type still compatible with Qt's WId type? On all supported platforms? (This is at least how I understand the usage in the 1.6 sample.)
Question 2: Is this possible at all? I think, I would need to create a Window-object, that does not open an actual window on the screen, nor creates an openGL-context.
Any insight appreciated.
-
Question 1: Does this still work with SFML-2 from svn? More specifically: Is SFML's WindowHandle type still compatible with Qt's WId type? On all supported platforms? (This is at least how I understand the usage in the 1.6 sample.)
Yes it is.
Question 2: Is this possible at all? I think, I would need to create a Window-object, that does not open an actual window on the screen, nor creates an openGL-context.
SFML is not made for that, the input stuff is not independant. I'm sure you can find dedicated IO libraries, like OIS. And what about Qt, it doesn't handle joysticks at all?
-
SFML is not made for that, the input stuff is not independant. I'm sure you can find dedicated IO libraries, like OIS. And what about Qt, it doesn't handle joysticks at all?
Qt doesn't handle joysticks at all :(. Our project already uses SFML for audio output, so I thought it would be natural to use it for gamepad stuff, too. But I am going to look at OIS...
Thanks for the quick reply.
-
I've tried to create an SFML window using a Qt-winId-handle, without opening a GLContext via SFML. So far, it seems to work, to get the gamepad events via sf::Window::GetEvent().
SFML is not made for that, the input stuff is not independant.
Apart from SFML not being made for this, is there anything stopping me from doing that? That you can think of?
-
without opening a GLContext via SFML
You can't, every SFML window has a GL context.
Apart from SFML not being made for this, is there anything stopping me from doing that? That you can think of?
No :)