Closed
Bug 611924
Opened 15 years ago
Closed 15 years ago
gl.VIEWPORT constant is mis-defined as gl.VIEWPORT_RECT
Categories
(Core :: Graphics: CanvasWebGL, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 586938
People
(Reporter: ben.vanik, Unassigned)
Details
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b7) Gecko/20100101 Firefox/4.0b7
Build Identifier: 4.0b7
The OpenGL ES 2 and WebGL specs define the VIEWPORT constant = 0x0BA2 and WebKit and Chromium conform to this. Firefox, however, uses VIEWPORT_RECT instead.
Relevant line of IDL in trunk WebGL spec:
const GLenum VIEWPORT = 0x0BA2;
https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html
Trunk idl showing VIEWPORT_RECT instead:
http://hg.mozilla.org/mozilla-central/file/95e9c2e8708d/dom/interfaces/canvas/nsICanvasRenderingContextWebGL.idl
Reproducible: Always
Steps to Reproduce:
1. Attempt to use gl.VIEWPORT (such as in a query via gl.getParameter())
Actual Results:
VIEWPORT is undefined
Expected Results:
viewport is defined and usage works
Hacky workaround is, on context creation:
if (!gl.VIEWPORT) {
gl.VIEWPORT = gl.VIEWPORT_RECT;
}
Everything works fine after this. But it means that code won't work cross-browser out of the box.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•