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

WebGLState: Simplify checks in drawBuffers(). (#23200)

Michael Herzog 3 жил өмнө
parent
commit
9410bdadd1

+ 2 - 4
src/renderers/webgl/WebGLState.js

@@ -500,10 +500,9 @@ function WebGLState( gl, extensions, capabilities ) {
 
 
 			} else {
 			} else {
 
 
-				if ( drawBuffers.length !== 1 || drawBuffers[ 0 ] !== gl.COLOR_ATTACHMENT0 ) {
+				if ( drawBuffers[ 0 ] !== gl.COLOR_ATTACHMENT0 ) {
 
 
 					drawBuffers[ 0 ] = gl.COLOR_ATTACHMENT0;
 					drawBuffers[ 0 ] = gl.COLOR_ATTACHMENT0;
-					drawBuffers.length = 1;
 
 
 					needsUpdate = true;
 					needsUpdate = true;
 
 
@@ -513,10 +512,9 @@ function WebGLState( gl, extensions, capabilities ) {
 
 
 		} else {
 		} else {
 
 
-			if ( drawBuffers.length !== 1 || drawBuffers[ 0 ] !== gl.BACK ) {
+			if ( drawBuffers[ 0 ] !== gl.BACK ) {
 
 
 				drawBuffers[ 0 ] = gl.BACK;
 				drawBuffers[ 0 ] = gl.BACK;
-				drawBuffers.length = 1;
 
 
 				needsUpdate = true;
 				needsUpdate = true;