default-texture.html (1061B)
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 <title>Tests texture access with no texture bound</title> 12 <link rel="stylesheet" href="../../../resources/js-test-style.css"/> 13 <script src="../../../js/js-test-pre.js"></script> 14 <script src="../../../js/webgl-test-utils.js"> </script> 15 </head> 16 <body> 17 <canvas id="example" width="24" height="24"></canvas> 18 <div id="description"></div> 19 <div id="console"></div> 20 <script> 21 "use strict"; 22 23 var wtu = WebGLTestUtils; 24 description(); 25 26 var gl = wtu.create3DContext("example"); 27 var program = wtu.setupTexturedQuad(gl); 28 29 gl.drawArrays(gl.TRIANGLES, 0, 6); 30 31 // When no texture is bound, it is considered an incomplete texture, 32 // therefore, [0, 0, 0, 1] should be returned. 33 // See OpenGL ES spec 2.0.25, section F.3.5. 34 wtu.checkCanvas(gl, [0, 0, 0, 255]); 35 36 var successfullyParsed = true; 37 </script> 38 <script src="../../../js/js-test-post.js"></script> 39 40 </body> 41 </html>