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

UNCONFIRMED
Unassigned

Status

()

Core
Canvas: WebGL
UNCONFIRMED
5 years ago
3 years ago

People

(Reporter: Travis Heppe, Unassigned, NeedInfo)

Tracking

12 Branch
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

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 
1


Expected results:

return value should have been
0
according to 
http://www.khronos.org/registry/gles/specs/2.0/es_full_spec_2.0.25.pdf
page 136
(Reporter)

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.

Updated

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.