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

Fix bindings for uniform 1iv, 2iv, 3iv, 4iv in webgl #4507

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

Conversation

Spad0n
Copy link

@Spad0n Spad0n commented Nov 22, 2024

This PR addresses issues with the bindings for uniform1iv, uniform2iv, uniform3iv, and uniform4iv in WebGL. The implementation has been updated to align with the official WebGL API as documented on MDN Web Docs.

Comment on lines -177 to -180
Uniform1iv :: proc "contextless" (location: i32, v: i32) { Uniform1i(location, v) }
Uniform2iv :: proc "contextless" (location: i32, v: glm.ivec2) { Uniform2i(location, v.x, v.y) }
Uniform3iv :: proc "contextless" (location: i32, v: glm.ivec3) { Uniform3i(location, v.x, v.y, v.z) }
Uniform4iv :: proc "contextless" (location: i32, v: glm.ivec4) { Uniform4i(location, v.x, v.y, v.z, v.w) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note you've just changed it to make it work for your use case and haven't touched the UniformNfv code above it to be "correct" either.

Copy link
Author

@Spad0n Spad0n Nov 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I could have also updated the UniformNfv bindings. Would you prefer that I include these fixes in this PR, or would you rather I create a new one that includes both the UniformNiv and UniformNfv fixes ?

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