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

Side by Side Diff: third_party/webgl/conformance-suites/1.0.0/conformance/gl-enable-vertex-attrib.html

Issue 9360034: Remove everthing except conformance tests in the deps/third_party/webgl (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 8 years, 10 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
OLDNEW
(Empty)
1 <!--
2 // Copyright (c) 2010 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>
7 <html>
8 <head>
9 <title>WebGL Enable Vertex Attrib Test</title>
10 <link rel="stylesheet" href="../resources/js-test-style.css"/>
11 <script src="../resources/js-test-pre.js"></script>
12 <script src="resources/webgl-test.js"> </script>
13 </head>
14 <body>
15 <canvas id="example" width="50" height="50">
16 </canvas>
17 <div id="description"></div>
18 <div id="console"></div>
19 <script id="vshader" type="x-shader/x-vertex">
20 attribute vec4 vPosition;
21 void main()
22 {
23 gl_Position = vPosition;
24 }
25 </script>
26
27 <script id="fshader" type="x-shader/x-fragment">
28 void main()
29 {
30 gl_FragColor = vec4(1.0,0.0,0.0,1.0);
31 }
32 </script>
33
34 <script>
35 gl = initWebGL("example", "vshader", "fshader", [ "vPosition"], [ 0, 0, 0, 1 ], 1);
36 gl.viewport(0, 0, 50, 50);
37
38 var vertexObject = gl.createBuffer();
39 gl.bindBuffer(gl.ARRAY_BUFFER, vertexObject);
40 gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ 0,0.5,0, -0.5,-0.5,0, 0.5,-0.5 ,0 ]), gl.STATIC_DRAW);
41 gl.enableVertexAttribArray(0);
42 gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
43
44 gl.enableVertexAttribArray(3);
45 glErrorShouldBe(gl, gl.NO_ERROR);
46
47 gl.drawArrays(gl.TRIANGLES, 0, 3);
48 glErrorShouldBe(gl, gl.INVALID_OPERATION);
49
50 successfullyParsed = true;
51 </script>
52 </body>
53 <script src="../resources/js-test-post.js"></script>
54
55 <script>
56 </script>
57
58 </body>
59 </html>
60
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698