From d6e86345763766256a83ae8746fba45383a4ce95 Mon Sep 17 00:00:00 2001 From: Stephan Unverwerth Date: Sun, 16 May 2021 14:42:08 +0200 Subject: [PATCH] LibGL: Add glBlendFunc() and glShadeModel() to call lists --- Userland/Libraries/LibGL/SoftwareGLContext.cpp | 4 ++++ Userland/Libraries/LibGL/SoftwareGLContext.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index 0df1c513ba..8e8f6e2bd2 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -871,6 +871,8 @@ void SoftwareGLContext::gl_finish() void SoftwareGLContext::gl_blend_func(GLenum src_factor, GLenum dst_factor) { + APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_blend_func, src_factor, dst_factor); + if (m_in_draw_state) { m_error = GL_INVALID_OPERATION; return; @@ -927,6 +929,8 @@ void SoftwareGLContext::gl_blend_func(GLenum src_factor, GLenum dst_factor) void SoftwareGLContext::gl_shade_model(GLenum mode) { + APPEND_TO_CALL_LIST_AND_RETURN_IF_NEEDED(gl_shade_model, mode); + if (m_in_draw_state) { m_error = GL_INVALID_OPERATION; return; diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.h b/Userland/Libraries/LibGL/SoftwareGLContext.h index a13944d390..9a1183fd80 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.h +++ b/Userland/Libraries/LibGL/SoftwareGLContext.h @@ -162,7 +162,9 @@ private: decltype(&SoftwareGLContext::gl_disable), decltype(&SoftwareGLContext::gl_front_face), decltype(&SoftwareGLContext::gl_cull_face), - decltype(&SoftwareGLContext::gl_call_list)>; + decltype(&SoftwareGLContext::gl_call_list), + decltype(&SoftwareGLContext::gl_blend_func), + decltype(&SoftwareGLContext::gl_shade_model)>; using ExtraSavedArguments = Variant< FloatMatrix4x4>;