Add this change, and then run first under D3D9, when the flag is waving, close the app, the shutdown is almost instant.
Run again, break at the code point, move the code position to select the OpenGL driver, and continue. This time, on closing the app, there is a 5+ second delay.
- cpp Code: Select all
m_hStop( CreateEvent( NULL, TRUE, FALSE, NULL ) )
m_hWnd = NULL;
m_hThread = NULL;
m_dwThreadId = 0;
// Driver defaults
// Set break point here below, run first with d3d driver, see how quickly the app shuts on close, then re-run, select opengl, and then see that it takes 5 seconds to shutdown
if ( 1 )
m_sIe.icp.DriverType = irr::video::EDT_DIRECT3D9;
m_sIe.icp.DriverType = irr::video::EDT_OPENGL;
m_sIe.icp.AntiAlias = true;
m_sIe.icp.Bits = 32;
// Create events
m_hStop = CreateEvent( NULL, TRUE, FALSE, NULL );
I´ve compiled this under Windows 7, VS 2010.