|
@@ -15655,7 +15655,7 @@
|
|
var stencilBuffer = new StencilBuffer();
|
|
var stencilBuffer = new StencilBuffer();
|
|
var enabledCapabilities = {};
|
|
var enabledCapabilities = {};
|
|
var currentProgram = null;
|
|
var currentProgram = null;
|
|
- var currentBlendingEnabled = null;
|
|
|
|
|
|
+ var currentBlendingEnabled = false;
|
|
var currentBlending = null;
|
|
var currentBlending = null;
|
|
var currentBlendEquation = null;
|
|
var currentBlendEquation = null;
|
|
var currentBlendSrc = null;
|
|
var currentBlendSrc = null;
|
|
@@ -15758,7 +15758,7 @@
|
|
|
|
|
|
function setBlending(blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha) {
|
|
function setBlending(blending, blendEquation, blendSrc, blendDst, blendEquationAlpha, blendSrcAlpha, blendDstAlpha, premultipliedAlpha) {
|
|
if (blending === NoBlending) {
|
|
if (blending === NoBlending) {
|
|
- if (currentBlendingEnabled) {
|
|
|
|
|
|
+ if (currentBlendingEnabled === true) {
|
|
disable(3042);
|
|
disable(3042);
|
|
currentBlendingEnabled = false;
|
|
currentBlendingEnabled = false;
|
|
}
|
|
}
|
|
@@ -15766,7 +15766,7 @@
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- if (!currentBlendingEnabled) {
|
|
|
|
|
|
+ if (currentBlendingEnabled === false) {
|
|
enable(3042);
|
|
enable(3042);
|
|
currentBlendingEnabled = true;
|
|
currentBlendingEnabled = true;
|
|
}
|
|
}
|
|
@@ -16026,11 +16026,34 @@
|
|
|
|
|
|
|
|
|
|
function reset() {
|
|
function reset() {
|
|
|
|
+ // reset state
|
|
|
|
+ gl.disable(3042);
|
|
|
|
+ gl.disable(2884);
|
|
|
|
+ gl.disable(2929);
|
|
|
|
+ gl.disable(32823);
|
|
|
|
+ gl.disable(3089);
|
|
|
|
+ gl.disable(2960);
|
|
|
|
+ gl.blendEquation(32774);
|
|
|
|
+ gl.blendFunc(1, 0);
|
|
|
|
+ gl.blendFuncSeparate(1, 0, 1, 0);
|
|
|
|
+ gl.colorMask(true, true, true, true);
|
|
|
|
+ gl.clearColor(0, 0, 0, 0);
|
|
|
|
+ gl.depthMask(true);
|
|
|
|
+ gl.depthFunc(513);
|
|
|
|
+ gl.clearDepth(1);
|
|
|
|
+ gl.stencilMask(0xffffffff);
|
|
|
|
+ gl.stencilFunc(519, 0, 1);
|
|
|
|
+ gl.stencilOp(7680, 7680, 7680);
|
|
|
|
+ gl.clearStencil(0);
|
|
|
|
+ gl.cullFace(1029);
|
|
|
|
+ gl.frontFace(2305);
|
|
|
|
+ gl.polygonOffset(0, 0); // reset internals
|
|
|
|
+
|
|
enabledCapabilities = {};
|
|
enabledCapabilities = {};
|
|
currentTextureSlot = null;
|
|
currentTextureSlot = null;
|
|
currentBoundTextures = {};
|
|
currentBoundTextures = {};
|
|
currentProgram = null;
|
|
currentProgram = null;
|
|
- currentBlendingEnabled = null;
|
|
|
|
|
|
+ currentBlendingEnabled = false;
|
|
currentBlending = null;
|
|
currentBlending = null;
|
|
currentBlendEquation = null;
|
|
currentBlendEquation = null;
|
|
currentBlendSrc = null;
|
|
currentBlendSrc = null;
|