Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: conformance/uniforms/gl-uniform-bool.html

Issue 8342021: Add webgl conformance tests r15841. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/webgl/sdk/tests/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 <!--
2 Copyright (c) 2011 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>
7 <html>
8 <head>
9 <meta charset="utf-8">
10 <title>WebGL uniformMatrix Conformance Tests</title>
11 <link rel="stylesheet" href="../../resources/js-test-style.css"/>
12 <script src="../../resources/desktop-gl-constants.js" type="text/javascript"></s cript>
13 <script src="../../resources/js-test-pre.js"></script>
14 <script src="../resources/webgl-test.js"></script>
15 </head>
16 <body>
17 <div id="description"></div>
18 <div id="console"></div>
19 <canvas id="example" width="2" height="2"> </canvas>
20 <script id="vshader" type="x-shader/x-vertex">
21 attribute vec4 vPosition;
22 void main()
23 {
24 gl_Position = vPosition;
25 }
26 </script>
27
28 <script id="fshader" type="x-shader/x-fragment">
29 uniform bool color;
30 void main()
31 {
32 gl_FragColor = vec4(float(color),0.0,0.0,1.0);
33 }
34 </script>
35 <script>
36 description("This test ensures WebGL implementations handle bool uniforms in a O penGL ES 2.0 spec compliant way");
37
38 debug("");
39 debug("NOTE: Some OpenGL drivers do not handle this correctly");
40 debug("");
41 debug("Checking gl.uniform1f with bool.");
42
43 gl = initWebGL("example", "vshader", "fshader", [ "vPosition"], [ 0, 0, 0, 1 ], 1);
44 var loc = gl.getUniformLocation(gl.program, "color");
45 gl.uniform1f(loc, 1);
46 glErrorShouldBe(gl, gl.NO_ERROR,
47 "should be able to set bool with gl.uniform1f");
48
49 debug("");
50 successfullyParsed = true;
51
52 </script>
53 <script src="../../resources/js-test-post.js"></script>
54
55 </body>
56 </html>
OLDNEW
« no previous file with comments | « conformance/uniforms/gl-uniform-arrays.html ('k') | conformance/uniforms/gl-uniformmatrix4fv.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698