sure. I am using the Model/View/Controller design pattern. Controller passes control commands to Model and View. The reason it can talk directly to View is to control the camera in the GL scene. It talks to Model to create and update objects. On any given update, the vertices are passed to View to update the draw.
Currently, I have Controller create a tiny SFML window from which I move the mouse and type to issue Control commands. I realize it looks dirty and it's annoying to have to click in one window and see the result on another window. The reason I can't just move the window event handling to View is because of Modeler. It would be acceptable if I *only* needed to read mouse events to control the camera, but the keyboard events control the objects, so they have to be sent to Modeler.
Since I'm doing 3D, frame rates matter. So I don't want to fiddle with the View to make it now send messages back the other way to Model. I'd rather just have Controller come up as a separate (headless) process, attach to the existing SFML window, read its events, and continue the way it already works.
I feel like this could be a bug in SFML. I'm running Linux Mint 17 with SFML-dev v2.1+dfsg-4ubuntu2.
This link
http://www.sfml-dev.org/tutorials/2.0/window-window.php says
"In this case, SFML will create a drawing context inside the given window
and catch all its events without interfering with the parent window management."
However, later on it says "the event loop (more precisely, the pollEvent or waitEvent function)
must be called in the same thread that created the window"
Can you help reconcile these two statements or confirm whether this is a bug or not ? I get the sf::Window to correctly attach to the window handle, and I get to read
some events, but not
all events, such as the scroll wheel or mouse click. but mouseMove *does* work. This seems like a bug.
Thanks