Sha256: ef655c897c163656ac42a1486a10337bc022ea177a83118b8426734b779d2b87

Contents?: true

Size: 996 Bytes

Versions: 144

Compression:

Stored size: 996 Bytes

Contents

// Grab the WebGL extensions currently supported and add to the Modernizr.webgl object
// spec: www.khronos.org/registry/webgl/specs/latest/#5.13.14

// based on code from ilmari heikkinen
// code.google.com/p/graphics-detect/source/browse/js/detect.js


(function(){

    if (!Modernizr.webgl) return;

    var canvas, ctx, exts;

    try {
        canvas  = document.createElement('canvas');
        ctx     = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
        exts    = ctx.getSupportedExtensions();
    }
    catch (e) {
        return;
    }

    if (ctx === undefined) {
        Modernizr.webgl = new Boolean(false);
    }
    else {
        Modernizr.webgl = new Boolean(true);
    }


    for (var i = -1, len = exts.length; ++i < len; ){
        Modernizr.webgl[exts[i]] = true;
    }

    // hack for addressing modernizr testsuite failures. sorry.
    if (window.TEST && TEST.audvid){
        TEST.audvid.push('webgl');
    }

    canvas = undefined;
})();

Version data entries

144 entries across 144 versions & 7 rubygems

Version Path
jekyll-theme-pirati-7.7.1 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-7.7.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-7.6.2 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-7.6.1 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-7.6.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-7.5.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-7.4.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-7.3.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-7.2.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-7.1.1 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-7.0.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-6.9.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-6.8.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-6.7.2 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-6.7.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-6.6.2 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-6.6.1 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-6.6.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-6.5.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js
jekyll-theme-pirati-6.4.0 _sass/foundation-sites/vendor/modernizr/feature-detects/webgl-extensions.js