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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extra/slow-shader-example.html ('k') | misc/program-test-1.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extra/webgl-info.html
===================================================================
--- extra/webgl-info.html (revision 0)
+++ extra/webgl-info.html (revision 0)
@@ -0,0 +1,80 @@
+<!--
+Copyright (c) 2009 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+ found in the LICENSE file.
+ -->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta charset="utf-8">
+<title>WebGL Information</title>
+<script src="../../demos/common/webgl-utils.js"> </script>
+<script>
+window.onload = main;
+
+function createCell(txt) {
+ var str = txt.toString();
+ if (typeof txt != 'string') {
+ if (txt.length !== undefined) {
+ str = "";
+ for (var ii = 0; ii < txt.length; ++ii) {
+ str += (ii == 0 ? "" : ", ") + txt[ii];
+ }
+ }
+ }
+ var t = document.createTextNode(str);
+ var d = document.createElement("div");
+ var td = document.createElement("td");
+ d.appendChild(t);
+ td.appendChild(d);
+ return td;
+}
+
+function main() {
+ var canvas = document.getElementById("example");
+ var gl = WebGLUtils.setupWebGL(canvas);
+ if (!gl) {
+ return;
+ }
+
+ var pnames = [
+ 'VERSION',
+ 'VENDOR',
+ 'RENDERER',
+ 'MAX_COMBINED_TEXTURE_IMAGE_UNITS',
+ 'MAX_CUBE_MAP_TEXTURE_SIZE',
+ 'MAX_FRAGMENT_UNIFORM_VECTORS',
+ 'MAX_RENDERBUFFER_SIZE',
+ 'MAX_TEXTURE_IMAGE_UNITS',
+ 'MAX_TEXTURE_SIZE',
+ 'MAX_VARYING_VECTORS',
+ 'MAX_VERTEX_ATTRIBS',
+ 'MAX_VERTEX_TEXTURE_IMAGE_UNITS',
+ 'MAX_VERTEX_UNIFORM_VECTORS',
+ 'MAX_VIEWPORT_DIMS'
+ ];
+ var table = document.createElement("table");
+ var tb = document.createElement("tbody");
+ for (var ii = 0; ii < pnames.length; ++ii) {
+ var pname = pnames[ii];
+ var value = gl.getParameter(gl[pname]);
+ var tr = document.createElement("tr");
+ var td1 = createCell(pname);
+ var td2 = createCell(value);
+ tr.appendChild(td1);
+ tr.appendChild(td2);
+ tb.appendChild(tr);
+ }
+ table.appendChild(tb);
+ document.getElementById("info").appendChild(table);
+}
+</script>
+</head>
+<body>
+<h1>WebGL Info</h1>
+<div id="info"></div>
+<canvas id="example" width="256" height="16" style="width: 256px; height: 48px;"></canvas>
+</body>
+</html>
+
Property changes on: extra/webgl-info.html
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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