LibWeb/WebGL: Bind default frame/render buffer when binding is null

This fixes the depth issues on github.com, as the depth commands are
now sent to the right frame/render buffer.
This commit is contained in:
Luke Wilde 2025-01-08 13:00:12 +00:00 committed by Alexander Kalenik
commit 71746c47c2
Notes: github-actions[bot] 2025-01-08 14:56:38 +00:00
3 changed files with 23 additions and 2 deletions

View file

@ -203,6 +203,24 @@ RefPtr<Gfx::PaintingSurface> OpenGLContext::surface()
return m_painting_surface;
}
u32 OpenGLContext::default_renderbuffer() const
{
#ifdef AK_OS_MACOS
return m_impl->depth_buffer;
#else
return 0;
#endif
}
u32 OpenGLContext::default_framebuffer() const
{
#ifdef AK_OS_MACOS
return m_impl->framebuffer;
#else
return 0;
#endif
}
Vector<StringView> s_available_webgl_extensions {
// Khronos ratified WebGL Extensions
"ANGLE_instanced_arrays"sv,