Bläddra i källkod

more fixes to alpha-scale-via-texture

David Rose 19 år sedan
förälder
incheckning
f8864484ca

+ 3 - 5
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;
   }
 

+ 3 - 5
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;
   }
 

+ 3 - 5
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;
   }