Hello there,
I've been creating a program with OGRE, and I've recently been getting crashes due to the DirectX (9) Device being lost. (I gathered that from the log). I think I could fix the problem if I knew how to check if the device is lost / restore it.
Thanks!
More information, if you need it:
I'm using DirectX 9, Windows 8.1, Visual Studio 2010. Ogre version 1.6 I think.
This crash only occurs when I resize the window.
The rendering is done in an external window that I have created using the WinAPI.
The rendering is also done in a separate thread to the message loops, and the rest of my program.
I've tried changing the render subsystem to OpenGL and DirectX11, but I just get more crashes.
Thanks a lot if you can help, I've been at this for the past 7 hours!
I'm not sure, but whats weird is I've tried to recreate the problem in a separate project, and I've done all of the loading, etc, created an external window, rendered in a separate thread, resized the window... and it works! I'm not sure why it doesn't work in my original project.
Right, figured out why:
It's because the loading and the rendering are done in separate threads, and then in another third thread the message loop is running; it is fine as long as the loading and rendering are done in the same thread.