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

Side by Side Diff: third_party/webgl/sdk/tests/extra/webgl-info.html

Issue 10399113: Roll webgl conformance tests to r17874: part 2, adding r17874 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 8 years, 7 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
3 /*
4 ** Copyright (c) 2012 The Khronos Group Inc.
5 **
6 ** Permission is hereby granted, free of charge, to any person obtaining a
7 ** copy of this software and/or associated documentation files (the
8 ** "Materials"), to deal in the Materials without restriction, including
9 ** without limitation the rights to use, copy, modify, merge, publish,
10 ** distribute, sublicense, and/or sell copies of the Materials, and to
11 ** permit persons to whom the Materials are furnished to do so, subject to
12 ** the following conditions:
13 **
14 ** The above copyright notice and this permission notice shall be included
15 ** in all copies or substantial portions of the Materials.
16 **
17 ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 ** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 ** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 ** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
24 */
25
26 -->
27
28 <!DOCTYPE html>
29 <html>
30 <head>
31 <meta charset="utf-8">
32 <title>WebGL Information</title>
33 <script src="../../demos/common/webgl-utils.js"> </script>
34 <script>
35 window.onload = main;
36
37 function createCell(txt) {
38 var str = txt.toString();
39 if (typeof txt != 'string') {
40 if (txt.length !== undefined) {
41 str = "";
42 for (var ii = 0; ii < txt.length; ++ii) {
43 str += (ii == 0 ? "" : ", ") + txt[ii];
44 }
45 }
46 }
47 var t = document.createTextNode(str);
48 var d = document.createElement("div");
49 var td = document.createElement("td");
50 d.appendChild(t);
51 td.appendChild(d);
52 return td;
53 }
54
55 function main() {
56 var canvas = document.getElementById("example");
57 var gl = WebGLUtils.setupWebGL(canvas);
58 if (!gl) {
59 return;
60 }
61
62 var pnames = [
63 'VERSION',
64 'VENDOR',
65 'RENDERER',
66 'MAX_COMBINED_TEXTURE_IMAGE_UNITS',
67 'MAX_CUBE_MAP_TEXTURE_SIZE',
68 'MAX_FRAGMENT_UNIFORM_VECTORS',
69 'MAX_RENDERBUFFER_SIZE',
70 'MAX_TEXTURE_IMAGE_UNITS',
71 'MAX_TEXTURE_SIZE',
72 'MAX_VARYING_VECTORS',
73 'MAX_VERTEX_ATTRIBS',
74 'MAX_VERTEX_TEXTURE_IMAGE_UNITS',
75 'MAX_VERTEX_UNIFORM_VECTORS',
76 'MAX_VIEWPORT_DIMS'
77 ];
78 var table = document.createElement("table");
79 var tb = document.createElement("tbody");
80 for (var ii = 0; ii < pnames.length; ++ii) {
81 var pname = pnames[ii];
82 var value = gl.getParameter(gl[pname]);
83 var tr = document.createElement("tr");
84 var td1 = createCell(pname);
85 var td2 = createCell(value);
86 tr.appendChild(td1);
87 tr.appendChild(td2);
88 tb.appendChild(tr);
89 }
90 table.appendChild(tb);
91 document.getElementById("info").appendChild(table);
92 }
93 </script>
94 </head>
95 <body>
96 <h1>WebGL Info</h1>
97 <div id="info"></div>
98 <canvas id="example" width="256" height="16" style="width: 256px; height: 48px;" ></canvas>
99 </body>
100 </html>
101
OLDNEW
« no previous file with comments | « third_party/webgl/sdk/tests/extra/slow-shader-example.html ('k') | third_party/webgl/sdk/tests/misc/program-test-1.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698