Browse Source

pass true bools to ColorMask

David Rose 20 years ago
parent
commit
6ffd095fdf
1 changed files with 4 additions and 4 deletions
  1. 4 4
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx

+ 4 - 4
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -3087,10 +3087,10 @@ do_issue_blending() {
     if (_target._color_write != _state._color_write) {
     if (_target._color_write != _state._color_write) {
       if (CLP(color_mask)) {
       if (CLP(color_mask)) {
 	unsigned int channels = _target._color_write->get_channels();
 	unsigned int channels = _target._color_write->get_channels();
-        GLP(ColorMask)(channels & ColorWriteAttrib::C_red,
-		       channels & ColorWriteAttrib::C_green,
-		       channels & ColorWriteAttrib::C_blue,
-		       channels & ColorWriteAttrib::C_alpha);
+        GLP(ColorMask)((channels & ColorWriteAttrib::C_red) != 0,
+                       (channels & ColorWriteAttrib::C_green) != 0,
+                       (channels & ColorWriteAttrib::C_blue) != 0,
+                       (channels & ColorWriteAttrib::C_alpha) != 0);
       }
       }
     }
     }
   }
   }