Browse Source

WebGLRenderTarget: Added .scissor and .scissorTest.

Mr.doob 9 years ago
parent
commit
3179ceac0b
1 changed files with 4 additions and 6 deletions
  1. 4 6
      src/renderers/WebGLRenderTarget.js

+ 4 - 6
src/renderers/WebGLRenderTarget.js

@@ -16,6 +16,9 @@ THREE.WebGLRenderTarget = function ( width, height, options ) {
 	this.width = width;
 	this.height = height;
 
+	this.scissor = new THREE.Rectangle( 0, 0, width, height );
+	this.scissorTest = false;
+
 	this.viewport = new THREE.Rectangle( 0, 0, width, height );
 
 	options = options || {};
@@ -45,12 +48,7 @@ THREE.WebGLRenderTarget.prototype = {
 		}
 
 		this.viewport.set( 0, 0, width, height );
-
-	},
-
-	setViewport: function ( x, y, width, height ) {
-
-		this.viewport.set( x, y, width, height );
+		this.scissor.set( 0, 0, width, height );
 
 	},