Nicolas Cannasse 6 년 전
부모
커밋
20261ae1fc
3개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 1
      h3d/impl/GlDriver.hx
  2. 2 2
      h3d/mat/BigTexture.hx
  3. 1 1
      h3d/mat/Texture.hx

+ 1 - 1
h3d/impl/GlDriver.hx

@@ -892,7 +892,7 @@ class GlDriver extends Driver {
 			checkError();
 		} else {
 			#if js
-			if( !t.format.match(BC(_)) )
+			if( !t.format.match(S3TC(_)) )
 			#end
 			gl.texImage2D(bind, 0, tt.internalFmt, tt.width, tt.height, 0, getChannels(tt), tt.pixelFmt, null);
 			checkError();

+ 2 - 2
h3d/mat/BigTexture.hx

@@ -182,11 +182,11 @@ class BigTexture {
 	}
 
 	function uploadPixels( pixels : hxd.Pixels, x : Int, y : Int, alphaChannel ) {
-		var bpp = allPixels.bytesPerPixel;
+		var bpp = @:privateAccess allPixels.bytesPerPixel;
 		if( alphaChannel ) {
 			var alphaPos = hxd.Pixels.getChannelOffset(allPixels.format, A);
 			var srcRedPos = hxd.Pixels.getChannelOffset(pixels.format, R);
-			var srcBpp = pixels.bytesPerPixel;
+			var srcBpp = @:privateAccess pixels.bytesPerPixel;
 			for( dy in 0...pixels.height ) {
 				var w = (x + (y + dy) * size) * bpp + alphaPos;
 				var r = dy * pixels.width * srcBpp + srcRedPos;

+ 1 - 1
h3d/mat/Texture.hx

@@ -342,7 +342,7 @@ class Texture {
 		e.driver.captureRenderBuffer(alpha);
 		var alphaPos = hxd.Pixels.getChannelOffset(alpha.format, A);
 		var redPos = hxd.Pixels.getChannelOffset(alpha.format, R);
-		var bpp = alpha.bytesPerPixel;
+		var bpp = @:privateAccess alpha.bytesPerPixel;
 		for( y in 0...height ) {
 			var p = y * width * bpp;
 			for( x in 0...width ) {