From 0c5aab86c5771287a836d222125e515bca4a90b1 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 3 Mar 2020 21:57:28 +0300 Subject: [PATCH] 0028180: Visualization, TKOpenGl - Performance of Shaded presentation dropped due to FFP disabled by default reject modification for custom using in a pure openGl application. --- src/OpenGl/OpenGl_Context.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 86b763bf78..4f78811bff 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -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()); } } -- 2.39.5