MCPcopy Create free account
hub / github.com/tensorflow/tfjs / isWebGLVersionEnabled

Function isWebGLVersionEnabled

tfjs-backend-webgl/src/webgl_util.ts:563–574  ·  view source on GitHub ↗
(webGLVersion: 1|2)

Source from the content-addressed store, hash-verified

561}
562
563export function isWebGLVersionEnabled(webGLVersion: 1|2) {
564 try {
565 const gl = getWebGLContext(webGLVersion);
566 if (gl != null) {
567 return true;
568 }
569 } catch (e) {
570 console.log('Error when getting WebGL context: ', e);
571 return false;
572 }
573 return false;
574}
575
576export function isCapableOfRenderingToFloatTexture(webGLVersion: number):
577 boolean {

Callers 1

flags_webgl.tsFile · 0.90

Calls 2

getWebGLContextFunction · 0.90
logMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…