mirror of https://github.com/vladmandic/human
disable humangl backend if webgl 1.0 is detected
parent
37f62f47fa
commit
50eff29056
|
@ -9,13 +9,13 @@
|
|||
|
||||
## Changelog
|
||||
|
||||
### **HEAD -> main** 2021/11/08 mandic00@live.com
|
||||
|
||||
|
||||
### **2.5.1** 2021/11/08 mandic00@live.com
|
||||
|
||||
- new human.compare api
|
||||
- added links to release notes
|
||||
|
||||
### **origin/main** 2021/11/06 mandic00@live.com
|
||||
|
||||
- new frame change detection algorithm
|
||||
- add histogram equalization
|
||||
- implement wasm missing ops
|
||||
|
|
|
@ -61,6 +61,12 @@ export async function register(instance): Promise<void> {
|
|||
}
|
||||
try {
|
||||
config.gl = config.canvas?.getContext('webgl2', config.webGLattr) as WebGL2RenderingContext;
|
||||
const glv2 = config.gl.getParameter(config.gl.VERSION).includes('2.0');
|
||||
if (!glv2) {
|
||||
log('override: using fallback webgl backend as webgl 2.0 is not detected');
|
||||
instance.config.backend = 'webgl';
|
||||
return;
|
||||
}
|
||||
if (config.canvas) {
|
||||
config.canvas.addEventListener('webglcontextlost', async (e) => {
|
||||
log('error: humangl:', e.type);
|
||||
|
|
Loading…
Reference in New Issue