Created
April 14, 2024 18:43
-
-
Save astrarudra/94e5ba0d02c5a7820e6e8f744f09a761 to your computer and use it in GitHub Desktop.
Test WebGL - HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>WebGL Test</title> | |
<script> | |
window.onload = function() { | |
var canvas = document.createElement('canvas'); | |
document.body.appendChild(canvas); | |
var gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); | |
if (gl) { | |
document.body.innerText = 'WebGL is supported!'; | |
} else { | |
document.body.innerText = 'WebGL is not supported!'; | |
} | |
}; | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment