ladybird icon indicating copy to clipboard operation
ladybird copied to clipboard

LibWeb: Start implementing WebGL 2.0

Open ADKaster opened this issue 11 months ago • 1 comments

A lot of stubs here! But it does create a context when the skia gpu is enabled. ...which it's not in our test runner. makes it a bit hard to test this stuff eh.

The createContext("webgl") test does pass when run through the GUI though :D

Screenshot 2024-12-05 at 11 12 26 PM

ADKaster avatar Dec 06 '24 06:12 ADKaster

I tried loading this WebGL fluid simulation: https://paveldogreat.github.io/WebGL-Fluid-Simulation/ ...and it appears the context is still null.

This is how their javascript is getting the WebGL context:

const params = { alpha: true, depth: false, stencil: false, antialias: false, preserveDrawingBuffer: false };

let gl = canvas.getContext('webgl2', params);
const isWebGL2 = !!gl;
if (!isWebGL2)
    gl = canvas.getContext('webgl', params) || canvas.getContext('experimental-webgl', params);

(with canvas coming from document.getElementsByTagName('canvas')[0])

rgret-dev avatar Dec 06 '24 12:12 rgret-dev