So I have 2 windows, a window from OGRE3D and another from SFML. I pass OGRE's window handle to SFML's and then proceed in my main application loop to pump messages through OGRE's window:
IntPtr hwnd;
OGREWin.GetCustomAttribute("WINDOW", out hwnd);
pl.Insert("WINDOW", hwnd.ToString());
SFMLWin = new SFML.Graphics.RenderWindow(hwnd); //hwnd is a pointer to OGREWin's handle
while (!OGREWin.IsClosed)
{
WindowEventUtilities.MessagePump();
}
Here is my problem, when I close OGRE's window, the method in my main application loop yells "FatalExecutionEngineError". Is there a way to release SFMLWin's grasp on OGREWin's handle before this happens?[/code]