From c846ed0a2c9124d22a37eaf73d1049a619774c0e Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Thu, 20 Jan 2022 00:55:55 +0100 Subject: LibGL: Report GL errors to debug console --- Userland/Libraries/LibGL/SoftwareGLContext.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Userland/Libraries/LibGL') diff --git a/Userland/Libraries/LibGL/SoftwareGLContext.cpp b/Userland/Libraries/LibGL/SoftwareGLContext.cpp index a00f0c8fdc..6bd1b3fc51 100644 --- a/Userland/Libraries/LibGL/SoftwareGLContext.cpp +++ b/Userland/Libraries/LibGL/SoftwareGLContext.cpp @@ -43,15 +43,17 @@ static constexpr size_t TEXTURE_MATRIX_STACK_LIMIT = 8; return; \ } -#define RETURN_WITH_ERROR_IF(condition, error) \ - if (condition) { \ - if (m_error == GL_NO_ERROR) \ - m_error = error; \ - return; \ +#define RETURN_WITH_ERROR_IF(condition, error) \ + if (condition) { \ + dbgln_if(GL_DEBUG, "{}(): error {:#x}", __func__, error); \ + if (m_error == GL_NO_ERROR) \ + m_error = error; \ + return; \ } #define RETURN_VALUE_WITH_ERROR_IF(condition, error, return_value) \ if (condition) { \ + dbgln_if(GL_DEBUG, "{}(): error {:#x}", __func__, error); \ if (m_error == GL_NO_ERROR) \ m_error = error; \ return return_value; \ -- cgit v1.2.3