vmsgman's picture

GameWindow has to be Modal?

Is there any way to interact with a game window from another window. For my application I want to be able to change the window/level while it is running. Is there a way to do this? Or do I just need to use a glControl instead?

I want to have a standard winform from which I launch a GameWindow. The standard form will have controls in it which can change the image rendered in the GameWindow. Is that possible?



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Yes, what you are asking is possible. The only limitations are that:

  1. each GameWindow must live on its own thread, and
  2. you must not call instance methods on a GameWindow from a different thread

This means that a GameWindow cannot live on the same thread as a WinForms form. What you need is to spawn a new thread and create the GameWindow instance on that thread.

You can then interact with that GameWindow any way you like, as long as you don't call any GameWindow methods from the wrong thread (e.g. try to change GameWindow size from the WinForms thread).

vmsgman's picture

Thanks Fiddler,
I know that you have alot on your plate. I will work with this and try to get it running and post what I did if I get it working. Cheers!