]> OCCT Git - occt.git/commitdiff
0032935: Visualization, TKOpenGles - use size window within OpenGl_Window::init()
authorkgv <kgv@opencascade.com>
Mon, 18 Apr 2022 01:27:35 +0000 (04:27 +0300)
committersmoskvin <smoskvin@opencascade.com>
Tue, 19 Apr 2022 16:18:42 +0000 (19:18 +0300)
src/OpenGl/OpenGl_Window.cxx

index 601396f81cb240d4fb008d9c12c1aea8f474c788..e3d22a91e48c02f38b4cd2288010fd7acc5c4fd6 100644 (file)
@@ -814,7 +814,8 @@ void OpenGl_Window::init()
     myGlContext->SetDefaultFrameBuffer (aDefFbo);
     aDefFbo->BindBuffer (myGlContext);
   }
-  else if (!myPlatformWindow->IsVirtual())
+  else if (!myPlatformWindow->IsVirtual()
+         && mySizeWindow == myPlatformWindow)
   {
     eglQuerySurface ((EGLDisplay )myGlContext->myDisplay, (EGLSurface )myGlContext->myWindow, EGL_WIDTH,  &mySize.x());
     eglQuerySurface ((EGLDisplay )myGlContext->myDisplay, (EGLSurface )myGlContext->myWindow, EGL_HEIGHT, &mySize.y());