Closed Bug 531484 Opened 15 years ago Closed 15 years ago

misnamed getShaderi/getProgrami as getShaderParameter/getProgramParameter

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: ben.vanik, Unassigned)

Details

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;
    }
}
Whoops - looks like get*Parameter is actually the new way - ignore me - sorry! Still getting used to all this :)
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.