Jelajahi Sumber

possible fix to color bug?

David Rose 24 tahun lalu
induk
melakukan
7bbf49ab35
1 mengubah file dengan 6 tambahan dan 0 penghapusan
  1. 6 0
      panda/src/dxgsg/dxGraphicsStateGuardian.cxx

+ 6 - 0
panda/src/dxgsg/dxGraphicsStateGuardian.cxx

@@ -4088,6 +4088,9 @@ issue_color_transform(const ColorMatrixAttribute *attrib) {
     // so we dont have to do this comparison
     // so we dont have to do this comparison
     if (_current_color_mat == LMatrix4f::ident_mat()) { 
     if (_current_color_mat == LMatrix4f::ident_mat()) { 
         _color_transform_enabled = false;
         _color_transform_enabled = false;
+        if(_issued_color_enabled) {
+             _issued_color_D3DCOLOR = Colorf_to_D3DCOLOR(_issued_color);
+        }
     } else {
     } else {
         _color_transform_enabled = true;
         _color_transform_enabled = true;
         if(_issued_color_enabled) {
         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)) {
     if ((_current_alpha_offset == 0.0f) && (_current_alpha_scale == 1.0f)) {
         _alpha_transform_enabled = false;
         _alpha_transform_enabled = false;
+        if(_issued_color_enabled) {
+             _issued_color_D3DCOLOR = Colorf_to_D3DCOLOR(_issued_color);
+        }
     } else {
     } else {
         _alpha_transform_enabled = true;
         _alpha_transform_enabled = true;
         if(_issued_color_enabled) {
         if(_issued_color_enabled) {