Skip to content

Commit 68b5a35

Browse files
committed
remove firefox bug workaround
1 parent daba48a commit 68b5a35

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

webgl/lessons/resources/webgl-state-diagram/program-ui.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ import {
3939
globals,
4040
} from './globals.js';
4141

42-
// ---vvv--- firefox bug workaround: https://bugzilla.mozilla.org/show_bug.cgi?id=1645092
43-
const useProgram1Fn = WebGLRenderingContext.prototype.useProgram;
44-
const useProgram2Fn = typeof WebGL2RenderingContext !== undefined ? WebGL2RenderingContext.prototype.useProgram : undefined;
45-
// --^^^---
4642
const glEnumToString = twgl.glEnumToString;
4743
const noop = () => {};
4844

@@ -342,14 +338,7 @@ function createProgramUniforms(parent, gl, program) {
342338
locationInfos.forEach((locationInfo, ndx) => {
343339
const {location, uniformTypeInfo} = locationInfo;
344340
const cell = tbody.rows[ndx].cells[1];
345-
// -- start firefox bug workaround : https://bugzilla.mozilla.org/show_bug.cgi?id=1645092
346-
const currentProgram = gl.getParameter(gl.CURRENT_PROGRAM);
347-
(globals.isWebGL2 ? useProgram2Fn : useProgram1Fn).call(gl, program);
348-
// -- end firefox bug workaround
349341
const value = gl.getUniform(program, location);
350-
// -- start firefox bug workaround
351-
(globals.isWebGL2 ? useProgram2Fn : useProgram1Fn).call(gl, currentProgram);
352-
// -- end firefox bug workaround
353342
updateElemAndFlashExpanderIfClosed(cell, formatUniformValue(value), !initial);
354343
const bindPoint = uniformTypeInfo.bindPoint;
355344
if (bindPoint) {

0 commit comments

Comments
 (0)