提交 3a253f2d 编写于 作者: M Mr.doob

WebGLState: Clean up.

上级 1618964c
......@@ -324,9 +324,11 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
};
this.setDepthFunc = function ( depthFunc ) {
// TODO Deprecate
this.buffers.depth.setFunc( depthFunc );
this.setColorWrite = function ( colorWrite ) {
this.buffers.color.setMask( colorWrite );
};
......@@ -342,36 +344,38 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
};
this.setColorWrite = function ( colorWrite ) {
this.setDepthFunc = function ( depthFunc ) {
this.buffers.color.setMask( colorWrite );
this.buffers.depth.setFunc( depthFunc );
};
this.setStencilFunc = function ( stencilFunc, stencilRef, stencilMask ) {
this.setStencilTest = function ( stencilTest ) {
this.buffers.stencil.setFunc( stencilFunc, stencilRef, stencilMask );
this.buffers.stencil.setTest( stencilTest );
};
this.setStencilOp = function ( stencilFail, stencilZFail, stencilZPass ) {
this.setStencilWrite = function ( stencilWrite ) {
this.buffers.stencil.setOp( stencilFail, stencilZFail, stencilZPass );
this.buffers.stencil.setMask( stencilWrite );
};
this.setStencilTest = function ( stencilTest ) {
this.setStencilFunc = function ( stencilFunc, stencilRef, stencilMask ) {
this.buffers.stencil.setTest( stencilTest );
this.buffers.stencil.setFunc( stencilFunc, stencilRef, stencilMask );
};
this.setStencilWrite = function ( stencilWrite ) {
this.setStencilOp = function ( stencilFail, stencilZFail, stencilZPass ) {
this.buffers.stencil.setMask( stencilWrite );
this.buffers.stencil.setOp( stencilFail, stencilZFail, stencilZPass );
};
//
this.setFlipSided = function ( flipSided ) {
if ( currentFlipSided !== flipSided ) {
......@@ -554,7 +558,7 @@ THREE.WebGLState = function ( gl, extensions, paramThreeToGL ) {
};
// clear values
// TODO Deprecate
this.clearColor = function ( r, g, b, a ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册