From 7bbf49ab35820c10f19e42d9a6e35c2a7a2dad01 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 28 Jun 2001 19:59:38 +0000 Subject: [PATCH] possible fix to color bug? --- panda/src/dxgsg/dxGraphicsStateGuardian.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx index 2a3e90d6b2..9edc7649c6 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx @@ -4088,6 +4088,9 @@ issue_color_transform(const ColorMatrixAttribute *attrib) { // so we dont have to do this comparison if (_current_color_mat == LMatrix4f::ident_mat()) { _color_transform_enabled = false; + if(_issued_color_enabled) { + _issued_color_D3DCOLOR = Colorf_to_D3DCOLOR(_issued_color); + } } else { _color_transform_enabled = true; if(_issued_color_enabled) { @@ -4108,6 +4111,9 @@ issue_alpha_transform(const AlphaTransformAttribute *attrib) { if ((_current_alpha_offset == 0.0f) && (_current_alpha_scale == 1.0f)) { _alpha_transform_enabled = false; + if(_issued_color_enabled) { + _issued_color_D3DCOLOR = Colorf_to_D3DCOLOR(_issued_color); + } } else { _alpha_transform_enabled = true; if(_issued_color_enabled) {