Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
<!doctype html>
<title>Raw WebGL/WebVR Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="webgl.css" type="text/css">
<canvas id="glcanvas" width="640" height="480">
Your browser doesn't appear to support the <code>&lt;canvas&gt;</code> element.
<button class="stop-start">Start VR display</button>
<button class="pose-stats">Show pose stats</button>
<p class="pos">&nbsp;</p>
<p class="orient">&nbsp;</p>
<p class="lin-vel">&nbsp;</p>
<p class="ang-vel">&nbsp;</p>
<p class="lin-acc">&nbsp;</p>
<p class="ang-acc">&nbsp;</p>
<script src="sylvester.js" type="text/javascript"></script>
<script src="glUtils.js" type="text/javascript"></script>
<script src="webgl-demo.js" type="text/javascript"></script>
<!-- Fragment shader program -->
<script id="shader-fs" type="x-shader/x-fragment">
varying highp vec2 vTextureCoord;
uniform sampler2D uSampler;
void main(void) {
gl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));
<!-- Vertex shader program -->
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec3 aVertexPosition;
attribute vec2 aTextureCoord;
uniform mat4 uMVMatrix;
uniform mat4 uPMatrix;
varying highp vec2 vTextureCoord;
void main(void) {
gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);
vTextureCoord = aTextureCoord;