소스 검색

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 );
 
 	};