1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-13 14:27:08 +03:00

0028180: Visualization, TKOpenGl - Performance of Shaded presentation dropped due to FFP disabled by default

reject modification for custom using in a pure openGl application.
This commit is contained in:
nds
2020-03-03 21:57:28 +03:00
parent 03f3900b2d
commit 116dc5bbf5

View File

@@ -4079,13 +4079,26 @@ void OpenGl_Context::ApplyModelWorldMatrix()
// ======================================================================= // =======================================================================
void OpenGl_Context::ApplyWorldViewMatrix() void OpenGl_Context::ApplyWorldViewMatrix()
{ {
if (myShaderManager->ModelWorldState().ModelWorldMatrix() != THE_IDENTITY_MATRIX) /*if (myShaderManager->ModelWorldState().ModelWorldMatrix() != THE_IDENTITY_MATRIX)
{ {
myShaderManager->UpdateModelWorldStateTo (THE_IDENTITY_MATRIX); myShaderManager->UpdateModelWorldStateTo (THE_IDENTITY_MATRIX);
} }
if (myShaderManager->WorldViewState().WorldViewMatrix() != WorldViewState.Current()) if (myShaderManager->WorldViewState().WorldViewMatrix() != WorldViewState.Current())
{ {
myShaderManager->UpdateWorldViewStateTo (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());
} }
} }