Browse Source

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

Mr.doob 9 years ago
parent
commit
7e47e4163b
1 changed files with 3 additions and 3 deletions
  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 ) {
 	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 ) {
 	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 ) {
 	this.setScissorTest = function ( boolean ) {
 
 
-		_scissorTest = boolean;
+		state.setScissorTest( _scissorTest = boolean );
 
 
 	};
 	};