mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Kicks off a WebGL implementation
This commit is contained in:
parent
b2585bee4d
commit
c82485874d
23 changed files with 1326 additions and 165 deletions
25
tests/ref/webgl-context/clearcolor.html
Normal file
25
tests/ref/webgl-context/clearcolor.html
Normal file
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>WebGL ClearColor Test</title>
|
||||
</head>
|
||||
<style>
|
||||
|
||||
html, body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<canvas id="canvas" width="640" height="480"></canvas>
|
||||
<script type="text/javascript">
|
||||
|
||||
var gl = document.getElementById("canvas").getContext("webgl");
|
||||
|
||||
gl.clearColor(1.0, 0.0, 0.0, 1.0);
|
||||
gl.clear(gl.COLOR_BUFFER_BIT);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
20
tests/ref/webgl-context/clearcolor_ref.html
Normal file
20
tests/ref/webgl-context/clearcolor_ref.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>WebGL ClearColor Test</title>
|
||||
</head>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
}
|
||||
#canvas {
|
||||
width: 640px;
|
||||
height: 480px;
|
||||
background-color: red;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="canvas"></canvas>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue