2
0
Эх сурвалжийг харах

fixed capturePixels on cube map face is not y-flipped

ncannasse 7 жил өмнө
parent
commit
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
 	}