Aeva / dream_machine

Aeva's Dream Machine ✨
Apache License 2.0
3 stars 0 forks source link

OpenGL - Better Extension Handling #6

Open Aeva opened 4 years ago

Aeva commented 4 years ago

The WebGL backend has a nice mechanism for gradually opting into extensions, and reporting to the user when they aren't supported.

The OpenGL backend does no such thing, and uses an arbitrary GL version.

What I'd like to do here is 1) find the minimum GL version that supports all of the features I want to use (possibly via extensions), and 2), what is the list of extensions required and which ones of them can be made optional. I might just say that Gl 4.0 is the cutoff to keep this more manageable.

After that, we need a graceful failure path for when the required functionality is not available.

Ideally there should also be a way to automatically insert extensions and maybe also the version string into shader sources.

Aeva commented 4 years ago

Glad is now generated per-project at build time as of 84f3bfcde422d7be9f7f49893736e1bc4bffc0ad, so we'll need to regenerate it when the required extensions change.