浏览代码

Fixed clearColor bug

WestLangley 10 年之前
父节点
当前提交
13014d3c10
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/renderers/webgl/WebGLShadowMap.js

+ 2 - 2
src/renderers/webgl/WebGLShadowMap.js

@@ -74,7 +74,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
 
 		// set GL state for depth map
 
-		_gl.clearColor( 1, 1, 1, 1 );
+		_renderer.clearColor( 1, 1, 1, 1 );
 		_state.disable( _gl.BLEND );
 
 		_state.enable( _gl.CULL_FACE );
@@ -237,7 +237,7 @@ THREE.WebGLShadowMap = function ( _renderer, _lights, _objects ) {
 		var clearColor = _renderer.getClearColor(),
 		clearAlpha = _renderer.getClearAlpha();
 
-		_gl.clearColor( clearColor.r, clearColor.g, clearColor.b, clearAlpha );
+		_renderer.clearColor( clearColor.r, clearColor.g, clearColor.b, clearAlpha );
 		_state.enable( _gl.BLEND );
 
 		if ( scope.cullFace === THREE.CullFaceFront ) {