瀏覽代碼

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

Nicolas Cannasse 4 年之前
父節點
當前提交
a6a373c230
共有 1 個文件被更改,包括 1 次插入1 次删除
  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 ) {
 		if( curTarget == null )
 			throw "Can't capture main render buffer in GL";
-		discardError();
+		gl.getError(); // always discard
 		#if js
 		var buffer : ArrayBufferView = @:privateAccess pixels.bytes.b;
 		switch( curTarget.format ) {