blob: ebd00a7ec3c75b943d73f6ee9805f5412b4eb9c8 [file] [log] [blame]
<head>
<meta name="viewport" content="width=device-width">
<style>
canvas {
width: 100px;
height: 100px;
background-color: red;
border: 20px solid blue;
}
</style>
</head>
<canvas>
<script type="text/javascript">
var canvas = document.querySelector("canvas");
canvas.width = canvas.clientWidth * window.devicePixelRatio;
canvas.height = canvas.clientHeight * window.devicePixelRatio;
var gl = canvas.getContext("webgl");
gl.clearColor(0, 0, 0, 1);
gl.clear(gl.COLOR_BUFFER_BIT);
</script>
</canvas>