Преглед на файлове

WebGLRenderer: Set scissor/scissorTest/viewport upon set. Fixes clear() breakage. #7935.

Mr.doob преди 9 години
родител
ревизия
7e47e4163b
променени са 1 файла, в които са добавени 3 реда и са изтрити 3 реда
  1. 3 3
      src/renderers/WebGLRenderer.js

+ 3 - 3
src/renderers/WebGLRenderer.js

@@ -376,19 +376,19 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 	this.setViewport = function ( x, y, width, height ) {
 
-		_viewport.set( x, y, width, height );
+		state.viewport( _viewport.set( x, y, width, height ) );
 
 	};
 
 	this.setScissor = function ( x, y, width, height ) {
 
-		_scissor.set( x, y, width, height );
+		state.scissor( _scissor.set( x, y, width, height ) );
 
 	};
 
 	this.setScissorTest = function ( boolean ) {
 
-		_scissorTest = boolean;
+		state.setScissorTest( _scissorTest = boolean );
 
 	};