summaryrefslogtreecommitdiffstats
path: root/unityplugin/UnityEmulator
diff options
context:
space:
mode:
authorEgor <egor.yusov@gmail.com>2018-02-20 05:38:48 +0000
committerEgor <egor.yusov@gmail.com>2018-02-20 05:38:48 +0000
commitc44da0f15cbc3ddef49294d727c6d3a4e7431257 (patch)
tree862b059f6c111376c3fa46ea925b38ab9d1365e6 /unityplugin/UnityEmulator
parentUpdated core submodule (diff)
downloadDiligentEngine-c44da0f15cbc3ddef49294d727c6d3a4e7431257.tar.gz
DiligentEngine-c44da0f15cbc3ddef49294d727c6d3a4e7431257.zip
Fixed crash in Unity emulator on Android when changing device orientation
Diffstat (limited to 'unityplugin/UnityEmulator')
-rw-r--r--unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp b/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp
index 8edeb78..19744b0 100644
--- a/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp
+++ b/unityplugin/UnityEmulator/src/UnityGraphicsGLCoreES_Emulator.cpp
@@ -11,8 +11,6 @@ std::unique_ptr<UnityGraphicsGL_Impl> UnityGraphicsGLCoreES_Emulator::m_Graphics
UnityGraphicsGLCoreES_Emulator::UnityGraphicsGLCoreES_Emulator()
{
- VERIFY(!m_GraphicsImpl, "Another emulator has already been initialized");
- m_GraphicsImpl.reset( new UnityGraphicsGL_Impl );
//GeUnityInterfaces().RegisterInterface(IUnityGraphicsGLCoreES__GUID, GetUnityGraphicsAPIInterface());
}
@@ -22,7 +20,9 @@ void UnityGraphicsGLCoreES_Emulator::InitGLContext(void *pNativeWndHandle,
#endif
int MajorVersion, int MinorVersion)
{
- m_GraphicsImpl->InitGLContext(pNativeWndHandle,
+ VERIFY(!m_GraphicsImpl, "Another emulator has already been initialized");
+ m_GraphicsImpl.reset( new UnityGraphicsGL_Impl );
+ m_GraphicsImpl->InitGLContext(pNativeWndHandle,
#if PLATFORM_LINUX
pDisplay,
#endif