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

export WebGLRenderingContext and add gl consts #236

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

michaeljherrmann
Copy link

I was trying to use headless-gl to polyfill window.WebGLRenderingContext (in addition to canvas.getContext()). However, when working with just the class definition instead of a class instance, it was missing the gl consts which are available in the browser implementation. Eg:
WebGLRenderingContext.STENCIL_TEST

As a bonus, I also thought it would be nice to have WebGLRenderingContext as part of the top level exports instead of having to reach into gl/src/javascript/webgl-rendering-context.

I'm looking for feedback on this solution, as I'm not very familiar with this repo. But instead of just opening an issue, I thought I would try to get a start on some code. 🙂

@michaeljherrmann
Copy link
Author

@dhritzkiv what do you think?

@dhritzkiv
Copy link
Member

This looks good! Sorry I missed it the first time around, and thanks for bumping the thread.

I'll merge it shortly, and try to get a release out on npm

@dhritzkiv dhritzkiv merged commit 6ac66ea into stackgl:master Oct 7, 2022
@michaeljherrmann
Copy link
Author

Awesome, thank you! 🎉

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