Closed Bug 667084 Opened 13 years ago Closed 13 years ago

Implement correct WebGL error semantics

Categories

(Core :: Graphics: CanvasWebGL, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: bjacob, Unassigned)

Details

The OpenGL error is actually a flag, with one bit for each kind of error. glGetError clears the bit that it returns. WebGL errors should behave this way.

Test:
https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/tests/conformance/gl-geterror.html
OpenGL ES does not mandate this behavior afaik :

"
When an error is detected, a flag is set and the code is recorded. Further
errors, if they occur, do not affect this recorded code. When GetError is called,
the code is returned and the flag is cleared, so that a further error will again record
its code. If a call to GetError returns NO_ERROR, then there has been no detectable
error since the last call to GetError (or since the GL was initialized).
"

It is only allowed (second paragraph of ES spec section 2.5) but seems underspecified (how many flag-code pairs to handle?) and can be confusing to WebGL developers imho.

Chrome does not seem to currently pass this test as well, do we really want this in WebGL?
This bug was filed as a follow-up from bug 665070 comment 18. Today this issue was revisited on the 3dweb list: thread="gl-geterror.html", date=today. There seems to be consensus that this bug is invalid.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.