summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp')
-rw-r--r--Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp b/Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp
index 402c079048..b501b04084 100644
--- a/Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp
+++ b/Userland/Libraries/LibWeb/WebGL/WebGLRenderingContextBase.cpp
@@ -52,9 +52,14 @@ void WebGLRenderingContextBase::present()
// This default behavior can be changed by setting the preserveDrawingBuffer attribute of the WebGLContextAttributes object.
// If this flag is true, the contents of the drawing buffer shall be preserved until the author either clears or overwrites them."
if (!m_context_creation_parameters.preserve_drawing_buffer) {
- auto current_clear_color = m_context->current_clear_color();
- auto current_clear_depth = m_context->current_clear_depth();
- auto current_clear_stencil = m_context->current_clear_stencil();
+ Array<GLdouble, 4> current_clear_color;
+ m_context->gl_get_doublev(GL_COLOR_CLEAR_VALUE, current_clear_color.data());
+
+ GLdouble current_clear_depth;
+ m_context->gl_get_doublev(GL_DEPTH_CLEAR_VALUE, &current_clear_depth);
+
+ GLint current_clear_stencil;
+ m_context->gl_get_integerv(GL_STENCIL_CLEAR_VALUE, &current_clear_stencil);
// The implicit clear value for the color buffer is (0, 0, 0, 0)
m_context->gl_clear_color(0, 0, 0, 0);