Procházet zdrojové kódy

disable blendEquation in nme (crash)

Nicolas Cannasse před 11 roky
rodič
revize
95a844ad45
1 změnil soubory, kde provedl 7 přidání a 2 odebrání
  1. 7 2
      h3d/impl/GlDriver.hx

+ 7 - 2
h3d/impl/GlDriver.hx

@@ -82,7 +82,6 @@ class GlDriver extends Driver {
 		var tmp = new Float32Array(8);
 		var tmp = new Float32Array(8);
 		var sub = new Float32Array(tmp.buffer, 0, 4);
 		var sub = new Float32Array(tmp.buffer, 0, 4);
 		fixMult = sub.length == 1; // should be 4
 		fixMult = sub.length == 1; // should be 4
-		trace(fixMult);
 		#end
 		#end
 		programs = new Map();
 		programs = new Map();
 		curAttribs = 0;
 		curAttribs = 0;
@@ -283,8 +282,14 @@ class GlDriver extends Driver {
 		if( diff & (Pass.blendOp_mask | Pass.blendAlphaOp_mask) != 0 ) {
 		if( diff & (Pass.blendOp_mask | Pass.blendAlphaOp_mask) != 0 ) {
 			var cop = Pass.getBlendOp(bits);
 			var cop = Pass.getBlendOp(bits);
 			var aop = Pass.getBlendAlphaOp(bits);
 			var aop = Pass.getBlendAlphaOp(bits);
-			if( cop == aop )
+			if( cop == aop ) {
+				#if cpp
+				if( OP[cop] != GL.FUNC_ADD )
+					throw "blendEquation() disable atm (crash)";
+				#else
 				gl.blendEquation(OP[cop]);
 				gl.blendEquation(OP[cop]);
+				#end
+			}
 			else
 			else
 				gl.blendEquationSeparate(OP[cop], OP[aop]);
 				gl.blendEquationSeparate(OP[cop], OP[aop]);
 		}
 		}