update cpp-template files

This commit is contained in:
Dale Stammen 2015-06-03 09:47:17 -07:00
parent 18ce48dc2a
commit 3219a3c2f4
1 changed files with 3 additions and 4 deletions

View File

@ -242,7 +242,6 @@ void OpenGLESPage::OnBackButtonPressed(Object^ sender, BackPressedEventArgs^ arg
}
#endif
void OpenGLESPage::OnSwapChainPanelSizeChanged(Object^ sender, Windows::UI::Xaml::SizeChangedEventArgs^ e)
{
// Size change events occur outside of the render thread. A lock is required when updating
@ -314,7 +313,6 @@ void OpenGLESPage::TerminateApp()
mOpenGLES->DestroySurface(mRenderSurface);
mOpenGLES->Cleanup();
}
}
Windows::UI::Xaml::Application::Current->Exit();
}
@ -355,6 +353,7 @@ void OpenGLESPage::StartRenderLoop()
mRenderer->Pause();
}
// wait until app is visible again or thread is cancelled
while (!mVisible)
{
std::unique_lock<std::mutex> lock(mSleepMutex);
@ -406,9 +405,9 @@ void OpenGLESPage::StartRenderLoop()
swapChainPanel->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::High, ref new Windows::UI::Core::DispatchedHandler([=]()
{
RecoverFromLostDevice();
}, CallbackContext::Any));
// wait until OpenGL is reset or thread is cancelled
while (mDeviceLost)
{
std::unique_lock<std::mutex> lock(mSleepMutex);