Parcourir la source

use colorMatrix reference (don't copy)

ncannasse il y a 8 ans
Parent
commit
56294ff690
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      h2d/Drawable.hx

+ 2 - 2
h2d/Drawable.hx

@@ -67,13 +67,13 @@ class Drawable extends Sprite {
 		if( s == null ) {
 			if( m != null ) {
 				s = addShader(new h3d.shader.ColorMatrix());
-				s.matrix.loadFrom(m);
+				s.matrix = m;
 			}
 		} else {
 			if( m == null )
 				removeShader(s);
 			else
-				s.matrix.loadFrom(m);
+				s.matrix = m;
 		}
 		return m;
 	}