LibWeb: Add stubbed-out WebGL2RenderingContext

This commit is contained in:
Andrew Kaster 2024-12-05 20:56:18 -07:00 committed by Alexander Kalenik
commit af536e1192
Notes: github-actions[bot] 2024-12-06 14:36:41 +00:00
19 changed files with 851 additions and 17 deletions

View file

@ -0,0 +1,17 @@
<!doctype html>
<script src="../include.js"></script>
<script>
test(() => {
println("FIXME: This test relies on having a GPU backend enabled, which it is not in run-tests mode :(");
let canvas = document.createElement("canvas");
let context = canvas.getContext("webgl");
println(`context instanceof WebGLRenderingContext: ${context instanceof WebGLRenderingContext}`);
println(`context is null: ${context === null}`);
let canvas2 = document.createElement("canvas");
let context2 = canvas2.getContext("webgl2");
println(`context2 instanceof WebGL2RenderingContext: ${context2 instanceof WebGL2RenderingContext}`);
println(`context2 is null: ${context2 === null}`);
});
</script>