소스 검색

fixed capturePixels

Nicolas Cannasse 7 년 전
부모
커밋
cf881b8cbb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      h3d/impl/GlDriver.hx

+ 1 - 1
h3d/impl/GlDriver.hx

@@ -1276,7 +1276,7 @@ class GlDriver extends Driver {
 		if( curTarget == null )
 			throw "Can't capture main render buffer in GL";
 		#if (js || hl)
-		gl.readPixels(0, 0, pixels.width, pixels.height, curTarget.t.internalFmt, curTarget.t.pixelFmt, @:privateAccess pixels.bytes.b);
+		gl.readPixels(0, 0, pixels.width, pixels.height, getChannels(curTarget), curTarget.t.pixelFmt, @:privateAccess pixels.bytes.b);
 		@:privateAccess pixels.innerFormat = curTarget.format;
 		pixels.flags.set(FlipY);
 		#end