소스 검색

fixed capturePixels on cube map face is not y-flipped

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

+ 1 - 1
h3d/impl/GlDriver.hx

@@ -1340,7 +1340,7 @@ class GlDriver extends Driver {
 		#if (js || hl)
 		gl.readPixels(0, 0, pixels.width, pixels.height, getChannels(curTarget.t), curTarget.t.pixelFmt, @:privateAccess pixels.bytes.b);
 		@:privateAccess pixels.innerFormat = curTarget.format;
-		pixels.flags.set(FlipY);
+		if( !curTarget.flags.has(Cube) ) pixels.flags.set(FlipY);
 		#end
 	}