tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

oes-texture-half-float-linear.html (1262B)


      1 <!--
      2 Copyright (c) 2019 The Khronos Group Inc.
      3 Use of this source code is governed by an MIT-style license that can be
      4 found in the LICENSE.txt file.
      5 -->
      6 
      7 <!DOCTYPE html>
      8 <html>
      9 <head>
     10 <meta charset="utf-8">
     11 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
     12 <script src="../../js/js-test-pre.js"></script>
     13 <script src="../../js/webgl-test-utils.js"></script>
     14 <script src="../../js/tests/oes-texture-float-and-half-float-linear.js"></script>
     15 </head>
     16 <body>
     17 <div id="description"></div>
     18 <div id="console"></div>
     19 <script>
     20 "use strict";
     21 
     22 description("Test OES_texture_half_float_linear, if available.");
     23 
     24 const wtu = WebGLTestUtils;
     25 const gl = wtu.create3DContext();
     26 
     27 (function() {
     28    if (wtu.isWebGL2(gl))
     29        throw new Error("OES_texture_half_float_linear is core in WebGL 2.");
     30 
     31    const ext = gl.getExtension("OES_texture_half_float");
     32    if (!ext) {
     33        testPassed("No OES_texture_half_float support -- this is legal");
     34        return;
     35    }
     36    // Required by the test harness.
     37    gl.HALF_FLOAT_OES = ext.HALF_FLOAT_OES;
     38    testTexLinear(gl, "OES_texture_half_float_linear", undefined, "HALF_FLOAT_OES");
     39 })();
     40 
     41 debug("");
     42 const successfullyParsed = true;
     43 </script>
     44 <script src="../../js/js-test-post.js"></script>
     45 </body>
     46 </html>