summaryrefslogtreecommitdiffstats
path: root/unityplugin/UnityEmulator
diff options
context:
space:
mode:
Diffstat (limited to 'unityplugin/UnityEmulator')
-rw-r--r--unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp b/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp
index fd23588..cd283f8 100644
--- a/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp
+++ b/unityplugin/UnityEmulator/src/UnityGraphicsGLCore_Impl.cpp
@@ -183,6 +183,11 @@ void UnityGraphicsGLCore_Impl::InitGLContext(void *pNativeWndHandle,
if(m_Context == nullptr)
LOG_ERROR_AND_THROW( "No active GL context found" );
+ XWindowAttributes WndAttribs = {};
+ XGetWindowAttributes(m_Display, m_LinuxWindow, &WndAttribs);
+ m_BackBufferWidth = WndAttribs.width;
+ m_BackBufferHeight = WndAttribs.height;
+
// Initialize GLEW
GLenum err = glewInit();
if( GLEW_OK != err )