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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/webgl/sdk/tests/extra/webgl-info.html
===================================================================
--- third_party/webgl/sdk/tests/extra/webgl-info.html (revision 0)
+++ third_party/webgl/sdk/tests/extra/webgl-info.html (revision 0)
@@ -0,0 +1,101 @@
+<!--
+
+/*
+** Copyright (c) 2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+-->
+
+<!DOCTYPE html>
+<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: third_party/webgl/sdk/tests/extra/webgl-info.html
___________________________________________________________________
Added: svn:eol-style
+ LF
« 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