diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2022-01-20 00:55:55 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-20 10:35:01 +0100 |
commit | c846ed0a2c9124d22a37eaf73d1049a619774c0e (patch) | |
tree | ded5ddc0a8c5c01579d615fc93b8c2c4476320d2 /Userland/Libraries/LibGL | |
parent | c5abef86dbb980ac736825de3705a4122f7e66b6 (diff) | |
download | serenity-c846ed0a2c9124d22a37eaf73d1049a619774c0e.zip |
LibGL: Report GL errors to debug console
Diffstat (limited to 'Userland/Libraries/LibGL')
-rw-r--r-- | Userland/Libraries/LibGL/SoftwareGLContext.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
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; \ |