-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebgl.html
More file actions
29 lines (24 loc) · 777 Bytes
/
webgl.html
File metadata and controls
29 lines (24 loc) · 777 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
<html>
<head>
</head>
<body>
<h1>Testing webgl availability</h1>
<p>
Webgl 1:<span id="webgl1">testing..</span>
</p>
<p>
Webgl 2:
<span id="webgl2">testing..</span>
</p>
<p id="platformdetails"></p>
</body>
<script src="/vendor/platform.js"></script>
<script>
var c = document.createElement('canvas');
var context1 = c.getContext('webgl') || c.getContext('experimental-webgl');
var context2 = c.getContext('webgl2');
document.getElementById('webgl1').innerHTML = context1?'detected':'not supported';
document.getElementById('webgl2').innerHTML = context2?'detected':'not supported';
document.getElementById('platformdetails').innerHTML = JSON.stringify(platform, true, '<br>');
</script>
</html>