From d997be50ff42006279c37d6376db5eb16746db23 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 9 Sep 2020 18:05:35 +0200 Subject: [PATCH] glgsg: fix state tracking bug passing view parameters to shader These parameters are already taken care of by set_state_and_transform(). Also comment out a few lines of code that would prevent the latter from being called for transform changes, but which never triggered anyway. --- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index dd29bda619..9083c31acc 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -3992,12 +3992,6 @@ prepare_lens() { } #endif -#ifndef OPENGLES_1 - if (_current_shader_context) { - _current_shader_context->issue_parameters(Shader::SSD_transform); - } -#endif - return true; } @@ -11205,9 +11199,10 @@ set_state_and_transform(const RenderState *target, do_issue_transform(); } - if (target == _state_rs && (_state_mask | _inv_state_mask).is_all_on()) { - return; - } + //XXX the _inv_state_mask system does not appear to be used at the moment. + //if (target == _state_rs && (_state_mask | _inv_state_mask).is_all_on()) { + // return; + //} _target_rs = target; #ifndef OPENGLES_1