Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

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

More than 3 years have passed since last update.

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

_shimizu
群馬・東京間を行き来する出稼ぎエンジニアです。ブログではGIS(地理情報システム)・データビジュアライゼーション・オープンデータなどについて書いてます。JavaScript勉強中
https://gunmagisgeek.com/blog/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away