diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-06 13:36:18 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-06 13:37:58 +0000 |
| commit | 6f339810f23bdd32311726fb2736e26e2cdb7edb (patch) | |
| tree | 920ab36cf82aa8255674197defe01e6aad797516 /test/testMainWindow.cpp | |
| parent | Replace basic glVertexArray with a specific class ready for helpers (diff) | |
| download | ilt-6f339810f23bdd32311726fb2736e26e2cdb7edb.tar.bz2 ilt-6f339810f23bdd32311726fb2736e26e2cdb7edb.tar.xz ilt-6f339810f23bdd32311726fb2736e26e2cdb7edb.zip | |
Include a stacktrace in Boost test context reported for OpenGL errors
Diffstat (limited to 'test/testMainWindow.cpp')
| -rw-r--r-- | test/testMainWindow.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/testMainWindow.cpp b/test/testMainWindow.cpp index d048682..40f5567 100644 --- a/test/testMainWindow.cpp +++ b/test/testMainWindow.cpp @@ -1,15 +1,19 @@ #include "testMainWindow.h" +#include <boost/test/framework.hpp> #include <boost/test/test_tools.hpp> #include <format> +#include <stacktrace> TestMainWindow::TestMainWindow() : MainWindow {{1, 1}, __FILE__, SDL_WINDOW_OPENGL | SDL_WINDOW_HIDDEN} { glEnable(GL_DEBUG_OUTPUT); + glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); glDebugMessageCallback( [](GLenum /*source*/, GLenum type, GLuint /*id*/, GLenum severity, GLsizei /*length*/, const GLchar * message, const void *) { const auto msg = std::format("GL CALLBACK: {} type = 0x{:x}, severity = 0x{:x}, message = {}", (type == GL_DEBUG_TYPE_ERROR ? "** GL ERROR **" : ""), type, severity, message); + BOOST_TEST_INFO(std::stacktrace::current()); switch (type) { case GL_DEBUG_TYPE_ERROR: case GL_DEBUG_TYPE_PORTABILITY: |
