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

Support WebGL1 context #82

Merged
merged 3 commits into from
Apr 16, 2023
Merged

Support WebGL1 context #82

merged 3 commits into from
Apr 16, 2023

Conversation

bhousel
Copy link
Contributor

@bhousel bhousel commented Apr 11, 2023

Thanks for this library!
We found that some of the sources we were adding to the texture atlas weren't compatible with WebGL1 context, needed to support some of our users on older hardware.

This code converts incompatible sources (ImageData, HTMLCanvasElement, HTMLImageElement) to an ArrayBufferView that will work in WebGL1

see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texSubImage2D

re rapideditor/pixi-texture-allocator#1

see https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texSubImage2D

This code converts incompatible sources (ImageData, HTMLCanvasElement, HTMLImageElement)
to an ArrayBufferView that will work in WebGL1
@ShukantPal ShukantPal merged commit b5dbbcb into ShukantPal:master Apr 16, 2023
@ShukantPal
Copy link
Owner

Thanks for your contribution!

@ShukantPal
Copy link
Owner

Published in @pixi-essentials/texture-allocator@2.0.1

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