let opengl print an triangle
This commit is contained in:
15
index.html
15
index.html
@@ -2,6 +2,21 @@
|
||||
<html>
|
||||
<header>
|
||||
<title>Web Ocean</title>
|
||||
<script id="shader-fs" type="x-shader/x-fragment">
|
||||
precision mediump float;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor = vec4(0.6,0.6,0.6,1.0);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script id="shader-vs" type="x-shader/x-vertex">
|
||||
attribute vec3 positionAttr;
|
||||
|
||||
void main(void) {
|
||||
gl_Position = vec4(positionAttr, 1.0);
|
||||
}
|
||||
</script>
|
||||
</header>
|
||||
<body>
|
||||
<canvas id="window" width="800" height="600" style="margin:0 auto; border: solid #000000 1px; display:block;"></canvas>
|
||||
|
||||
Reference in New Issue
Block a user