Skip to content

Commit b6f1fe7

Browse files
authored
Merge pull request #21295 from Mugen87/dev48
WebGLState: Enhance reset().
2 parents 3291259 + 643b9ad commit b6f1fe7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/renderers/webgl/WebGLState.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ function WebGLState( gl, extensions, capabilities ) {
898898
gl.clearDepth( 1 );
899899

900900
gl.stencilMask( 0xffffffff );
901-
gl.stencilFunc( gl.ALWAYS, 0, 1 );
901+
gl.stencilFunc( gl.ALWAYS, 0, 0xffffffff );
902902
gl.stencilOp( gl.KEEP, gl.KEEP, gl.KEEP );
903903
gl.clearStencil( 0 );
904904

@@ -907,6 +907,15 @@ function WebGLState( gl, extensions, capabilities ) {
907907

908908
gl.polygonOffset( 0, 0 );
909909

910+
gl.activeTexture( gl.TEXTURE0 );
911+
912+
gl.useProgram( null );
913+
914+
gl.lineWidth( 1 );
915+
916+
gl.scissor( 0, 0, gl.canvas.width, gl.canvas.height );
917+
gl.viewport( 0, 0, gl.canvas.width, gl.canvas.height );
918+
910919
// reset internals
911920

912921
enabledCapabilities = {};

0 commit comments

Comments
 (0)