Skip to content Skip to sidebar Skip to footer

Detect Software Vs Hardware Webgl Render Mode

I've got an error I'm trying to catch with MapboxGL that doesn't handle when a version of IE switches the webGL render modes from hardware to software. I've been pouring over docum

Solution 1:

You can check whether or not a browser can run GL JS in a hardware render mode using the mapbox-gl-supported library

<script src='mapbox-gl-supported.js'></script>
<script>
if (mapboxgl.supported({failIfMajorPerformanceCaveat: true})) {
    // hardware mode! :D
} else {
    // software mode :(
}
</script>

Post a Comment for "Detect Software Vs Hardware Webgl Render Mode"