Answers for "javascript get device gpu info"

1

javascript get device gpu info

// Create canvas
var canvas = document.createElement("canvas")
var webgl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl")
var debugInfo = webgl.getExtension("webgl_debug_renderer_info")
var gpu = webgl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL)
// We need to use the debugInfo because the webgl
// will return a GPU ID and not the name
// debugInfo extensions unmasks it and returns the GPU Name
Posted by: Guest on October-17-2020
0

javascript get device gpu info

var canvas = document.createElement("canvas")
var webgl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl")
var debugInfo = webgl.getExtension("webgl_debug_renderer_info")
var gpu = webgl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL)
Posted by: Guest on June-03-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language