mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
LibGL: Add ability to retrieve current clear values from GLContext
This allows WebGL to preserve the clear values as it performs an implicit clear to certain values.
This commit is contained in:
parent
58f882200c
commit
68d9d4e247
Notes:
sideshowbarker
2024-07-17 10:16:07 +09:00
Author: https://github.com/Lubrsi Commit: https://github.com/SerenityOS/serenity/commit/68d9d4e247 Pull-request: https://github.com/SerenityOS/serenity/pull/14184 Reviewed-by: https://github.com/Quaker762 ✅ Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/linusg ✅ Reviewed-by: https://github.com/sunverwerth
1 changed files with 6 additions and 0 deletions
|
@ -91,6 +91,12 @@ 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);
|
||||
|
|
Loading…
Reference in a new issue