1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:57:45 +00:00

LibGL+LibWeb: Remove WebGL-specific API from GLContext

The OpenGL API has ways to retrieve these values, so let's make sure to
implement them. :^)
This commit is contained in:
Jelle Raaijmakers 2022-12-25 00:45:33 +01:00 committed by Andreas Kling
parent bc1293925a
commit ae82b14e59
5 changed files with 72 additions and 9 deletions

View file

@ -107,12 +107,6 @@ public:
NonnullRefPtr<Gfx::Bitmap> frontbuffer() const { return m_frontbuffer; };
void present();
// Used by WebGL to preserve the clear values when implicitly clearing the front buffer.
// FIXME: Add ContextParameters for these and expose them through methods such as gl_get_floatv instead of having a public API like this.
FloatVector4 current_clear_color() const { return m_clear_color; }
GLdouble current_clear_depth() const { return m_clear_depth; }
GLint current_clear_stencil() const { return m_clear_stencil; }
void gl_begin(GLenum mode);
void gl_clear(GLbitfield mask);
void gl_clear_color(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);