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.
10 <meta charset=
"utf-8">
11 <title>WebGL Enable Vertex Attrib Test
</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 <script src=
"../../js/tests/invalid-vertex-attrib-test.js"></script>
18 <canvas id=
"example" width=
"50" height=
"50">
20 <div id=
"description"></div>
21 <div id=
"console"></div>
25 description("tests that turning on attribs that have no buffer bound fails to draw");
26 const wtu
= WebGLTestUtils
;
27 const gl
= wtu
.create3DContext("example");
29 async
function runInvalidAttribTests() {
30 const invalidAttribTestFn
= createInvalidAttribTestFn(gl
);
32 function drawArrays(gl
) {
33 gl
.drawArrays(gl
.TRIANGLES
, 0, 6);
36 function drawElements(gl
) {
37 gl
.drawElements(gl
.TRIANGLES
, 6, gl
.UNSIGNED_BYTE
, 0);
40 await
invalidAttribTestFn(drawArrays
);
41 await
invalidAttribTestFn(drawElements
);
44 runInvalidAttribTests();
46 var successfullyParsed
= true;