If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

misnamed getShaderi/getProgrami as getShaderParameter/getProgramParameter

RESOLVED INVALID

Status

()

Core
Canvas: WebGL
RESOLVED INVALID
8 years ago
8 years ago

People

(Reporter: Ben Vanik, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.11 Safari/532.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1pre) Gecko/20091126 Minefield/3.7a1pre

WebKit calls these methods getShaderi and getProgrami, which closely match the original GL calls of getShaderiv and getProgramiv. Firefox, however, uses getShaderParameter and getProgramParameter, which are quite different.
For the sake of comparability (and readability), it's probably best to switch to the WebKit convention.

Reproducible: Always




Hacky workaround:
function fixupGL(gl) {
    if (!gl.getShaderi) {
        gl.getShaderi = gl.getShaderParameter;
    }
    if (!gl.getProgrami) {
        gl.getProgrami = gl.getProgramParameter;
    }
}
(Reporter)

Comment 1

8 years ago
Whoops - looks like get*Parameter is actually the new way - ignore me - sorry! Still getting used to all this :)
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.