mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 10:41:30 +00:00
LibWeb: Add ability to present LibGL framebuffer and add clearing
This commit is contained in:
parent
68d9d4e247
commit
076c9772a4
Notes:
sideshowbarker
2024-07-17 10:16:03 +09:00
Author: https://github.com/Lubrsi
Commit: 076c9772a4
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
8 changed files with 131 additions and 1 deletions
|
@ -21,6 +21,11 @@ class WebGLRenderingContextBase
|
|||
public:
|
||||
virtual ~WebGLRenderingContextBase();
|
||||
|
||||
void present();
|
||||
|
||||
void clear(GLbitfield mask);
|
||||
void clear_color(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
|
||||
|
||||
protected:
|
||||
WebGLRenderingContextBase(HTML::HTMLCanvasElement& canvas_element, NonnullOwnPtr<GL::GLContext> context, WebGLContextAttributes context_creation_parameters, WebGLContextAttributes actual_context_parameters);
|
||||
|
||||
|
@ -46,6 +51,8 @@ private:
|
|||
// - Canvas resize
|
||||
// - clear, drawArrays, or drawElements has been called while the drawing buffer is the currently bound framebuffer
|
||||
bool m_should_present { true };
|
||||
|
||||
void needs_to_present();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue