Browse Source

always discard error in capture sub buffer (prevent false positive exception)

Nicolas Cannasse 4 năm trước cách đây
mục cha
commit
a6a373c230
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      h3d/impl/GlDriver.hx

+ 1 - 1
h3d/impl/GlDriver.hx

@@ -1694,7 +1694,7 @@ class GlDriver extends Driver {
 	function captureSubRenderBuffer( pixels : hxd.Pixels, x : Int, y : Int ) {
 	function captureSubRenderBuffer( pixels : hxd.Pixels, x : Int, y : Int ) {
 		if( curTarget == null )
 		if( curTarget == null )
 			throw "Can't capture main render buffer in GL";
 			throw "Can't capture main render buffer in GL";
-		discardError();
+		gl.getError(); // always discard
 		#if js
 		#if js
 		var buffer : ArrayBufferView = @:privateAccess pixels.bytes.b;
 		var buffer : ArrayBufferView = @:privateAccess pixels.bytes.b;
 		switch( curTarget.format ) {
 		switch( curTarget.format ) {