5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

JavaScriptでグラボの情報を取得する

Last updated at Posted at 2017-07-27

WebGLのデバッグ用拡張を使えば取得できるらしい。

<!doctype html>
<html>
<body>
    <canvas id="canvas" width="0" height="0"></canvas>

    <script type="text/JavaScript">


        var canvas;
        canvas = document.getElementById("canvas");
        var gl = canvas.getContext("experimental-webgl");

        var renderInfo = gl.getExtension("WEBGL_debug_renderer_info");
        if (renderInfo != null) {
            var vendor   = gl.getParameter(renderInfo.UNMASKED_VENDOR_WEBGL);  
            var renderer = gl.getParameter(renderInfo.UNMASKED_RENDERER_WEBGL);
            
            document.write(vendor + "<br>");
            document.write(renderer + "<br>");
            
        }

    </script>
</body>
</html>

出力例)

ATI Technologies Inc.
AMD Radeon R9 M295X OpenGL Engine

WEBGL_debug_renderer_info - Web API インターフェイス | MDN

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?