OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <span id="description" style="color: white"> | 3 <span id="description" style="color: white"> |
4 This test is only useful as a pixel test. You should see two rows with 4 canvase
s in each. The top row of canvases should have a black background, the bottom ro
w should have a dark blue background. | 4 This test is only useful as a pixel test. You should see two rows with 4 canvase
s in each. The top row of canvases should have a black background, the bottom ro
w should have a dark blue background. |
5 Each canvas should have a green triangle in it. If multisampling is supported, t
he odd columns should have smooth edges instead of jagged stair-stepping. Otherw
ise, all canvases within a row should be identical to each other. | 5 Each canvas should have a green triangle in it. If multisampling is supported, t
he odd columns should have smooth edges instead of jagged stair-stepping. Otherw
ise, all canvases within a row should be identical to each other. |
6 </span> | 6 </span> |
7 <br> | 7 <br> |
8 <style> | 8 <style> |
9 canvas { | 9 canvas { |
10 outline: 1px solid blue; | 10 outline: 1px solid blue; |
(...skipping 29 matching lines...) Expand all Loading... |
40 gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); | 40 gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); |
41 } | 41 } |
42 </script> | 42 </script> |
43 <script src="resources/webgl-test-utils.js"></script> | 43 <script src="resources/webgl-test-utils.js"></script> |
44 <script> | 44 <script> |
45 | 45 |
46 var ctxs = [] | 46 var ctxs = [] |
47 | 47 |
48 if (window.testRunner) { | 48 if (window.testRunner) { |
49 testRunner.overridePreference("WebKitWebGLEnabled", "1"); | 49 testRunner.overridePreference("WebKitWebGLEnabled", "1"); |
50 testRunner.dumpAsText(true); | 50 testRunner.dumpAsTextWithPixelResults(); |
51 document.getElementById("description").style.position = "absolute"; | 51 document.getElementById("description").style.position = "absolute"; |
52 document.getElementById("description").style.top = "-5000px"; | 52 document.getElementById("description").style.top = "-5000px"; |
53 } | 53 } |
54 | 54 |
55 for (var i=0; i<8; ++i) { | 55 for (var i=0; i<8; ++i) { |
56 var attrs = { | 56 var attrs = { |
57 'alpha': (i >= 4), | 57 'alpha': (i >= 4), |
58 'preserveDrawingBuffer': (i % 4) >= 2, | 58 'preserveDrawingBuffer': (i % 4) >= 2, |
59 'antialias': (i % 2) == 1 | 59 'antialias': (i % 2) == 1 |
60 }; | 60 }; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 10, 10, | 101 10, 10, |
102 10, 80]), gl.STATIC_DRAW); | 102 10, 80]), gl.STATIC_DRAW); |
103 | 103 |
104 gl.enableVertexAttribArray(gl.myPositionLocation); | 104 gl.enableVertexAttribArray(gl.myPositionLocation); |
105 gl.vertexAttribPointer(gl.myPositionLocation, 2, gl.FLOAT, false, 0, 0); | 105 gl.vertexAttribPointer(gl.myPositionLocation, 2, gl.FLOAT, false, 0, 0); |
106 | 106 |
107 // draw | 107 // draw |
108 gl.drawArrays(gl.TRIANGLES, 0, 3); | 108 gl.drawArrays(gl.TRIANGLES, 0, 3); |
109 } | 109 } |
110 </script> | 110 </script> |
OLD | NEW |