From f8864484ca21db10a405247047a42ba4727cbef7 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 11 Oct 2006 22:42:16 +0000 Subject: [PATCH] more fixes to alpha-scale-via-texture --- panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx | 8 +++----- panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx | 8 +++----- panda/src/glstuff/glGraphicsStateGuardian_src.cxx | 8 +++----- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx index ee7b6c2e44..8fa640d32b 100644 --- a/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx +++ b/panda/src/dxgsg8/dxGraphicsStateGuardian8.cxx @@ -2179,13 +2179,11 @@ set_state_and_transform(const RenderState *target, _state._clip_plane = _target._clip_plane; } - if (_target._color != _state._color) { + if (_target._color != _state._color || + _target._color_scale != _state._color_scale) { do_issue_color(); - _state._color = _target._color; - } - - if (_target._color_scale != _state._color_scale) { do_issue_color_scale(); + _state._color = _target._color; _state._color_scale = _target._color_scale; } diff --git a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx index 6006497919..576bbcc4cf 100755 --- a/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx +++ b/panda/src/dxgsg9/dxGraphicsStateGuardian9.cxx @@ -3234,13 +3234,11 @@ set_state_and_transform(const RenderState *target, _state._clip_plane = _target._clip_plane; } - if (_target._color != _state._color) { + if (_target._color != _state._color || + _target._color_scale != _state._color_scale) { do_issue_color(); - _state._color = _target._color; - } - - if (_target._color_scale != _state._color_scale) { do_issue_color_scale(); + _state._color = _target._color; _state._color_scale = _target._color_scale; } diff --git a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx index 180db9a644..4f67eeaaba 100644 --- a/panda/src/glstuff/glGraphicsStateGuardian_src.cxx +++ b/panda/src/glstuff/glGraphicsStateGuardian_src.cxx @@ -5607,13 +5607,11 @@ set_state_and_transform(const RenderState *target, _state._clip_plane = _target._clip_plane; } - if (_target._color != _state._color) { + if (_target._color != _state._color || + _target._color_scale != _state._color_scale) { do_issue_color(); - _state._color = _target._color; - } - - if (_target._color_scale != _state._color_scale) { do_issue_color_scale(); + _state._color = _target._color; _state._color_scale = _target._color_scale; }