KhronosGroup / KhronosGroup/WebGL

Clarify readPixels behavior with PACK_ROW_LENGTH < width

Open
#1,416 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

In ES 3.0, it seems that if ReadPixels is called with the PACK_ROW_LENGTH parameter set to less than the incoming width, the results are undefined -- it depends on which row is packed first. (This isn't 100% clear.)

This needs to be clarified. The behavior can be defined by transforming the ReadPixels call into two under the hood, one with width==PACK_ROW_LENGTH, and the second reading the last row -- or by generating an INVALID_OPERATION error. Either way, a conformance test and clarifying note are needed.

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 by reviewing the ES 3.0 ReadPixels rules for PACK_ROW_LENGTH values below the incoming width. Resolve which behavior the specification should define, then add the mentioned conformance test and clarifying note; done means the behavior and expected result are unambiguous.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.