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 <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 id=
"vshader" type=
"x-shader/x-vertex">
18 gl_Position = vec4(
0.0,
0.0,
0.0,
1.0);
22 <script id=
"fshader" type=
"x-shader/x-fragment">
23 precision mediump float;
27 gl_FragColor = vec4(
0.0,
1.0,
0.0,
1.0);
32 <canvas id=
"testbed" width=
"1" height=
"1" style=
"width: 100px; height: 100px;"></canvas>
33 <div id=
"description"></div>
34 <div id=
"console"></div>
37 description('Verify that drawing a point without enabling any attributes succeeds');
39 var wtu
= WebGLTestUtils
;
40 var gl
= wtu
.create3DContext('testbed');
42 var program1
= wtu
.setupProgram(gl
, ['vshader', 'fshader']);
44 debug('Draw a point with a shader that takes no attributes and verify it fills the whole canvas.');
46 gl
.drawArrays(gl
.POINTS
, 0, 1);
47 wtu
.glErrorShouldBe(gl
, gl
.NO_ERROR
);
48 wtu
.checkCanvas(gl
, [0, 255, 0, 255]);
50 var successfullyParsed
= true;
52 <script src=
"../../js/js-test-post.js"></script>