]> OCCT Git - occt-copy.git/commitdiff
0028180: Visualization, TKOpenGl - Performance of Shaded presentation dropped due...
authornds <nds@opencascade.com>
Tue, 3 Mar 2020 18:57:28 +0000 (21:57 +0300)
committernds <nds@opencascade.com>
Tue, 3 Mar 2020 18:57:28 +0000 (21:57 +0300)
reject modification for custom using in a pure openGl application.

src/OpenGl/OpenGl_Context.cxx

index 86b763bf78da6de327459422f069443fe02fbdc6..4f78811bff598932bf9e9c12d938db92b7eaa727 100644 (file)
@@ -4058,13 +4058,26 @@ void OpenGl_Context::ApplyModelWorldMatrix()
 // =======================================================================
 void OpenGl_Context::ApplyWorldViewMatrix()
 {
-  if (myShaderManager->ModelWorldState().ModelWorldMatrix() != THE_IDENTITY_MATRIX)
+  /*if (myShaderManager->ModelWorldState().ModelWorldMatrix() != THE_IDENTITY_MATRIX)
   {
     myShaderManager->UpdateModelWorldStateTo (THE_IDENTITY_MATRIX);
   }
   if (myShaderManager->WorldViewState().WorldViewMatrix() != WorldViewState.Current())
   {
     myShaderManager->UpdateWorldViewStateTo (WorldViewState.Current());
+  }*/
+#if !defined(GL_ES_VERSION_2_0)
+  if (core11 != NULL)
+  {
+    core11->glMatrixMode (GL_MODELVIEW);
+    core11->glLoadMatrixf (WorldViewState.Current());
+  }
+#endif
+
+  if (!myShaderManager->IsEmpty())
+  {
+    myShaderManager->UpdateModelWorldStateTo (THE_IDENTITY_MATRIX);
+    myShaderManager->UpdateWorldViewStateTo (WorldViewState.Current());
   }
 }