OLD | NEW |
| (Empty) |
1 <!-- | |
2 Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
3 Use of this source code is governed by a BSD-style license that can be | |
4 found in the LICENSE file. | |
5 --> | |
6 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
7 "http://www.w3.org/TR/html4/loose.dtd"> | |
8 <html> | |
9 <head> | |
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
11 <title>WebGL uniformMatrix Conformance Tests</title> | |
12 <link rel="stylesheet" href="../resources/js-test-style.css"/> | |
13 <script src="../resources/desktop-gl-constants.js" type="text/javascript"></scri
pt> | |
14 <script src="../resources/js-test-pre.js"></script> | |
15 <script src="resources/webgl-test.js"></script> | |
16 </head> | |
17 <body> | |
18 <div id="description"></div> | |
19 <div id="console"></div> | |
20 <canvas id="example" width="2" height="2"> </canvas> | |
21 <script id="vshader" type="x-shader/x-vertex"> | |
22 attribute vec4 vPosition; | |
23 void main() | |
24 { | |
25 gl_Position = vPosition; | |
26 } | |
27 </script> | |
28 | |
29 <script id="fshader" type="x-shader/x-fragment"> | |
30 uniform bool color; | |
31 void main() | |
32 { | |
33 gl_FragColor = vec4(float(color),0.0,0.0,1.0); | |
34 } | |
35 </script> | |
36 <script> | |
37 description("This test ensures WebGL implementations handle bool uniforms in a O
penGL ES 2.0 spec compliant way"); | |
38 | |
39 debug(""); | |
40 debug("NOTE: Some OpenGL drivers do not handle this correctly"); | |
41 debug(""); | |
42 debug("Checking gl.uniform1f with bool."); | |
43 | |
44 gl = initWebGL("example", "vshader", "fshader", [ "vPosition"], [ 0, 0, 0, 1 ],
1); | |
45 var loc = gl.getUniformLocation(gl.program, "color"); | |
46 gl.uniform1f(loc, 1); | |
47 glErrorShouldBe(gl, gl.NO_ERROR, | |
48 "should be able to set bool with gl.uniform1f"); | |
49 | |
50 debug(""); | |
51 successfullyParsed = true; | |
52 | |
53 </script> | |
54 <script src="../resources/js-test-post.js"></script> | |
55 | |
56 <script> | |
57 </script> | |
58 | |
59 </body> | |
60 </html> | |
OLD | NEW |