瀏覽代碼

WebGLRenderer: clear*() clean up.

Mr.doob 10 年之前
父節點
當前提交
4412dba754
共有 1 個文件被更改,包括 3 次插入3 次删除
  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 );
 
 
 	};
 	};