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

Fill out tex*Image*D overloads for WebGL2 #234

Merged
merged 2 commits into from
Jan 6, 2023

Conversation

cwfitzgerald
Copy link
Contributor

This fills out the various gl web apis for texImageD overloads with Canvas, Video, Image, and ImageBitmap.

In service of gfx-rs/wgpu#1888.

The other major change is adding width and height arguments to the ones that are shared with webgl1 - it will just ignore the width and height on webgl1.

Copy link
Owner

@grovesNL grovesNL left a comment

Choose a reason for hiding this comment

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

Thank you! This looks great but I think we should probably split up tex_sub_image_2d_with_image_bitmap into two functions or accept width and height as Option<i32> instead of silently ignoring those parameters on WebGL1.

Even on WebGL2 there might be some benefits to making width and height optional.

@cwfitzgerald
Copy link
Contributor Author

Alright, I'll split them

Copy link
Owner

@grovesNL grovesNL left a comment

Choose a reason for hiding this comment

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

Thank you!

@grovesNL grovesNL merged commit d7037ef into grovesNL:main Jan 6, 2023
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