forked from efredericks/CIS367-ComputerGraphics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtriangle.html
More file actions
39 lines (33 loc) · 761 Bytes
/
triangle.html
File metadata and controls
39 lines (33 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<!--
triangle.html
Erik Fredericks, c/o Ed Angel
The triangular hello world of WebGL
-->
<html>
<head>
<meta charset="utf-8">
<!-- Define our shaders -->
<script id="vertex-shader" type="x-shader/x-vertex">
attribute vec4 vPosition;
void main() {
gl_Position = vPosition;
}
</script>
<script id="fragment-shader" type="x-shader/x-fragment">
precision mediump float;
void main() {
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
}
</script>
<script src="../Common/webgl-utils.js"></script>
<script src="../Common/initShaders.js"></script>
<script src="../Common/MV.js"></script>
<script src="triangle.js"></script>
</head>
<body>
<canvas id="gl-canvas" width="640" height="480">
Your browser doesn't support HTML5!
</canvas>
</body>
</html>