|
@@ -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 ) {
|
|
|
|