提交 0c27271c 编写于 作者: M Mr.doob

Updated builds.

上级 9cb83f15
......@@ -19802,9 +19802,9 @@ THREE.WebGLRenderer = function ( parameters ) {
};
this.enableScissorTest = function ( enable ) {
this.enableScissorTest = function ( boolean ) {
enable ? _gl.enable( _gl.SCISSOR_TEST ) : _gl.disable( _gl.SCISSOR_TEST );
state.set( _gl.SCISSOR_TEST, boolean );
};
......@@ -24978,7 +24978,7 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
var newAttributes = new Uint8Array( 16 );
var enabledAttributes = new Uint8Array( 16 );
var switches = {};
var capabilities = {};
var currentBlending = null;
var currentBlendEquation = null;
......@@ -24989,7 +24989,6 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
var currentBlendDstAlpha = null;
var currentDepthFunc = null;
var currentDepthTest = null;
var currentDepthWrite = null;
var currentColorWrite = null;
......@@ -24998,7 +24997,6 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
var currentLineWidth = null;
var currentPolygonOffset = null;
var currentPolygonOffsetFactor = null;
var currentPolygonOffsetUnits = null;
......@@ -25013,7 +25011,7 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
gl.clearDepth( 1 );
gl.clearStencil( 0 );
gl.enable( gl.DEPTH_TEST );
this.enable( gl.DEPTH_TEST );
gl.depthFunc( gl.LEQUAL );
gl.frontFace( gl.CCW );
......@@ -25066,10 +25064,10 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
this.enable = function ( id ) {
if ( switches[ id ] !== true ) {
if ( capabilities[ id ] !== true ) {
gl.enable( id );
switches[ id ] = true;
capabilities[ id ] = true;
}
......@@ -25077,10 +25075,10 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
this.disable = function ( id ) {
if ( switches[ id ] !== false ) {
if ( capabilities[ id ] !== false ) {
gl.disable( id );
switches[ id ] = false;
capabilities[ id ] = false;
}
......@@ -25239,19 +25237,13 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
this.setDepthTest = function ( depthTest ) {
if ( currentDepthTest !== depthTest ) {
if ( depthTest ) {
if ( depthTest ) {
this.enable( gl.DEPTH_TEST );
gl.enable( gl.DEPTH_TEST );
} else {
gl.disable( gl.DEPTH_TEST );
}
} else {
currentDepthTest = depthTest;
this.disable( gl.DEPTH_TEST );
}
......@@ -25311,25 +25303,19 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
};
this.setPolygonOffset = function ( polygonoffset, factor, units ) {
if ( currentPolygonOffset !== polygonoffset ) {
this.setPolygonOffset = function ( polygonOffset, factor, units ) {
if ( polygonoffset ) {
if ( polygonOffset ) {
gl.enable( gl.POLYGON_OFFSET_FILL );
this.enable( gl.POLYGON_OFFSET_FILL );
} else {
gl.disable( gl.POLYGON_OFFSET_FILL );
}
} else {
currentPolygonOffset = polygonoffset;
this.disable( gl.POLYGON_OFFSET_FILL );
}
if ( polygonoffset && ( currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units ) ) {
if ( polygonOffset && ( currentPolygonOffsetFactor !== factor || currentPolygonOffsetUnits !== units ) ) {
gl.polygonOffset( factor, units );
......@@ -25426,10 +25412,10 @@ THREE.WebGLState = function ( gl, paramThreeToGL ) {
}
switches = {};
capabilities = {};
currentBlending = null;
currentDepthTest = null;
currentDepthWrite = null;
currentColorWrite = null;
......@@ -25804,7 +25790,7 @@ THREE.LensFlarePlugin = function ( renderer, flares ) {
gl.uniform3f( uniforms.screenPosition, screenPosition.x, screenPosition.y, screenPosition.z );
state.disable( gl.BLEND );
gl.enable( gl.DEPTH_TEST );
state.enable( gl.DEPTH_TEST );
gl.drawElements( gl.TRIANGLES, 6, gl.UNSIGNED_SHORT, 0 );
......@@ -25819,7 +25805,7 @@ THREE.LensFlarePlugin = function ( renderer, flares ) {
// restore graphics
gl.uniform1i( uniforms.renderType, 1 );
gl.disable( gl.DEPTH_TEST );
state.disable( gl.DEPTH_TEST );
state.activeTexture( gl.TEXTURE1 );
state.bindTexture( gl.TEXTURE_2D, tempTexture );
......@@ -25883,7 +25869,7 @@ THREE.LensFlarePlugin = function ( renderer, flares ) {
// restore gl
state.enable( gl.CULL_FACE );
gl.enable( gl.DEPTH_TEST );
state.enable( gl.DEPTH_TEST );
gl.depthMask( true );
renderer.resetGLState();
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册