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

incorrect initial state for VERTEX_ATTRIB_ARRAY_ENABLED in webgl




Canvas: WebGL
5 years ago
3 years ago


(Reporter: Travis Heppe, Unassigned, NeedInfo)


12 Branch
Mac OS X

Firefox Tracking Flags

(Not tracked)




5 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.53 Safari/536.5

Steps to reproduce:

context_.getVertexAttrib(0, VERTEX_ATTRIB_ARRAY_ENABLED)
on a newly created WebGL context

Actual results:

return value was 

Expected results:

return value should have been
according to 
page 136

Comment 1

5 years ago
It looks like this issue actually runs a little deeper.  Not only is VERTEX_ATTRIB_ARRAY_ENABLED set initially to true for position 0, but it is not even *possible* to set it to false.  

My guess is that this is an attempt to force developers to conform to  https://developer.mozilla.org/en/WebGL/WebGL_best_practices, which states:
Always have vertex attrib 0 array enabled. If you draw with vertex attrib 0 array disabled, you will force the browser to do complicated emulation when running on desktop OpenGL (e.g. on Mac OSX). This is because in desktop OpenGL, nothing gets drawn if vertex attrib 0 is not array-enabled. You can use bindAttribLocation() to force a vertex attribute to use location 0, and use enableVertexAttribArray() to make it array-enabled.

So Firefox deviates from the spec, but maybe it's the spec that should change.


3 years ago
Component: Untriaged → Canvas: WebGL
Product: Firefox → Core
I cannot reproduce this on Windows. Can you post a copy of the Graphic section from the 'about:support' page?
Flags: needinfo?(heppe)
Oh, this is really old. We probably (hopefully?) fixed this at some point. Please report back if you can still reproduce.
You need to log in before you can comment on or make changes to this bug.