KhronosGroup / KhronosGroup/WebGL

Should offset in vertexAttribPointer be restricted?

Open
#2,838 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
2.9k
Forks
704
Avg merge
2d 9h
Merged PRs (30d)
4

Description

Chrome and WebKit (as of a couple of days ago) restrict the offset parameter in vertexAttribPointer to be <= max 32-bit int. Firefox does not.

Should the specification describe this? Which way should it be?

Easy way to test, edit /conformance/more/functions/vertexAttribPointerBadArgs.html to add:

  assertFail("Offset that is greater than max 32-bit int",
      function(){gl.vertexAttribPointer(0, 3, gl.BYTE, false, 0, 0x0000ffff00000001);});

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with conformance/more/functions/vertexAttribPointerBadArgs.html and review the existing argument-validation cases around vertexAttribPointer. Use the proposed large-offset assertion to compare current behavior, then determine what specification wording or conformance expectation is needed for the differing browser behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.