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

Side by Side Diff: extra/webgl-info.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
« no previous file with comments | « extra/slow-shader-example.html ('k') | misc/program-test-1.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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 charset="utf-8">
11 <title>WebGL Information</title>
12 <script src="../../demos/common/webgl-utils.js"> </script>
13 <script>
14 window.onload = main;
15
16 function createCell(txt) {
17 var str = txt.toString();
18 if (typeof txt != 'string') {
19 if (txt.length !== undefined) {
20 str = "";
21 for (var ii = 0; ii < txt.length; ++ii) {
22 str += (ii == 0 ? "" : ", ") + txt[ii];
23 }
24 }
25 }
26 var t = document.createTextNode(str);
27 var d = document.createElement("div");
28 var td = document.createElement("td");
29 d.appendChild(t);
30 td.appendChild(d);
31 return td;
32 }
33
34 function main() {
35 var canvas = document.getElementById("example");
36 var gl = WebGLUtils.setupWebGL(canvas);
37 if (!gl) {
38 return;
39 }
40
41 var pnames = [
42 'VERSION',
43 'VENDOR',
44 'RENDERER',
45 'MAX_COMBINED_TEXTURE_IMAGE_UNITS',
46 'MAX_CUBE_MAP_TEXTURE_SIZE',
47 'MAX_FRAGMENT_UNIFORM_VECTORS',
48 'MAX_RENDERBUFFER_SIZE',
49 'MAX_TEXTURE_IMAGE_UNITS',
50 'MAX_TEXTURE_SIZE',
51 'MAX_VARYING_VECTORS',
52 'MAX_VERTEX_ATTRIBS',
53 'MAX_VERTEX_TEXTURE_IMAGE_UNITS',
54 'MAX_VERTEX_UNIFORM_VECTORS',
55 'MAX_VIEWPORT_DIMS'
56 ];
57 var table = document.createElement("table");
58 var tb = document.createElement("tbody");
59 for (var ii = 0; ii < pnames.length; ++ii) {
60 var pname = pnames[ii];
61 var value = gl.getParameter(gl[pname]);
62 var tr = document.createElement("tr");
63 var td1 = createCell(pname);
64 var td2 = createCell(value);
65 tr.appendChild(td1);
66 tr.appendChild(td2);
67 tb.appendChild(tr);
68 }
69 table.appendChild(tb);
70 document.getElementById("info").appendChild(table);
71 }
72 </script>
73 </head>
74 <body>
75 <h1>WebGL Info</h1>
76 <div id="info"></div>
77 <canvas id="example" width="256" height="16" style="width: 256px; height: 48px;" ></canvas>
78 </body>
79 </html>
80
OLDNEW
« no previous file with comments | « extra/slow-shader-example.html ('k') | misc/program-test-1.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698