Browse Source

WebGLRenderer: clear*() clean up.

Mr.doob 9 years ago
parent
commit
4412dba754
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/renderers/WebGLRenderer.js

+ 3 - 3
src/renderers/WebGLRenderer.js

@@ -438,19 +438,19 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 
 	this.clearColor = function () {
 	this.clearColor = function () {
 
 
-		_gl.clear( _gl.COLOR_BUFFER_BIT );
+		this.clear( true, false, false );
 
 
 	};
 	};
 
 
 	this.clearDepth = function () {
 	this.clearDepth = function () {
 
 
-		_gl.clear( _gl.DEPTH_BUFFER_BIT );
+		this.clear( false, true, false );
 
 
 	};
 	};
 
 
 	this.clearStencil = function () {
 	this.clearStencil = function () {
 
 
-		_gl.clear( _gl.STENCIL_BUFFER_BIT );
+		this.clear( false, false, true );
 
 
 	};
 	};