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

Addition of web GL2 [FEATURE REQUEST] #1226

Open
craff opened this issue Jan 18, 2022 · 3 comments
Open

Addition of web GL2 [FEATURE REQUEST] #1226

craff opened this issue Jan 18, 2022 · 3 comments

Comments

@craff
Copy link

craff commented Jan 18, 2022

webGL2 is now pretty standard and js_of_ocaml only supports webGL1 and a few extension.

I actually started working on that... But there are a lot of valid combinations of internal format / format / type in function
like texImage2D.

This raises two questions:

  • Do` we want to accept only valid combination at compile time (probably no as webGL is not type safe in many places)
  • How to manage the numerous values that are common ? The current situation with type/pixelType and format/pixelFormat
    is more of less broken by webGL2 with the current type of function.
@hhugo
Copy link
Member

hhugo commented Jan 18, 2022

I'm not very familiar with the Webgl api and the difference between GL1 and Gl2. Would you be able to provide more information and maybe concrete examples covering your two points above.

@dbuenzli
Copy link
Contributor

Just in case you want something right now® I'd just mention that brr has bindings to webgl2 here (hello triangle here) . Regarding the larger question of whether you want to type the GL APIs I'd say it's more trouble than benefits.

@craff
Copy link
Author

craff commented Jan 20, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants