not-fl3 / miniquad

Cross platform rendering in Rust
Apache License 2.0
1.54k stars 173 forks source link

native/wasm: optional WebGL2 support #444

Closed not-fl3 closed 4 months ago

not-fl3 commented 4 months ago

While miniquad itself only use webgl1 features, withing webgl2 context it is possible to:

webgl2 context might be requested by conf.platform.webgl_version = conf::WebGLVersion::WebGL2;

Note that right now there is no way to check if WebGL2 is supported, if WebGL2 context is requested on an unsupported platform (old-ish iphone safari) - everything will crash.

In the future there should be WebGL2WithWebGL1Fallback option.