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

Add integer attributes to Geometry #231

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gooostaw
Copy link
Contributor

@gooostaw gooostaw commented Sep 2, 2024

Until now, you could send integer data to the vertex shader, but it was converted to float. I used vertexAttribIPointer to make it easier to use integer attributes.

@gordonnl
Copy link
Contributor

gordonnl commented Jan 2, 2025

Sorry it took so long to get to this - could you please give a brief explanation of the blendFunc changes? Is it primarily to support the OES_draw_buffers_indexed extension?
Thanks a lot for your work!

@gooostaw
Copy link
Contributor Author

gooostaw commented Jan 2, 2025

Indeed, this pull request does more than just add integer attributes. Only commit 0f7da7d should be included in this PR, sorry. The other commits add support for OES_draw_buffers_indexed. Not sure if anyone will need this. This allows you to set a different blending for each draw buffer. To use this feature, you need to pass an array of blendFunc objects instead of a single object to the blendFunc attribute of the Program class. Each element in the array corresponds to a specific draw buffer. While the usage is simple, the implementation required some changes.

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