Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow use of readonly number arrays with WebGL methods. #1263

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jameswilddev
Copy link

This PR changes the Float32List type to accept readonly arrays as well as mutable arrays.

The Float32List type is used as an argument to the following methods (all of which only read from the value, they do not mutate its contents):

  • clearBufferfv
  • uniformMatrix2x3fv
  • uniformMatrix2x4fv
  • uniformMatrix3x2fv
  • uniformMatrix3x4fv
  • uniformMatrix4x2fv
  • uniformMatrix4x3fv
  • uniform1fv
  • uniform2fv
  • uniform3fv
  • uniform4fv
  • uniformMatrix2fv
  • uniformMatrix3fv
  • uniformMatrix4fv
  • vertexAttrib1fv
  • vertexAttrib2fv
  • vertexAttrib3fv
  • vertexAttrib4fv
  • uniform1fv
  • uniform2fv
  • uniform3fv
  • uniform4fv
  • uniformMatrix2fv
  • uniformMatrix3fv
  • uniformMatrix4fv

@ghost
Copy link

ghost commented Feb 15, 2022

CLA assistant check
All CLA requirements met.

@github-actions
Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @saschanaz - if they write a comment saying "LGTM" then it will be merged.

@saschanaz
Copy link
Contributor

saschanaz commented Feb 25, 2022

This also sounds fair but I wonder how libraries are currently using them. Perhaps this one is right enough to cause some breaking change? (This allows more things when used in arguments, but when accessing such argument in a third party library, it then gets additional constraints)

Pinging @orta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants