Browse Source

Try to explicitly enable debug output in GL tests.

pull/132/head
Vladimír Vondruš 11 years ago
parent
commit
4d67544fda
  1. 15
      src/Magnum/Test/AbstractOpenGLTester.h

15
src/Magnum/Test/AbstractOpenGLTester.h

@ -57,12 +57,25 @@ class AbstractOpenGLTester: public TestSuite::Tester {
private:
struct WindowlessApplication: Platform::WindowlessApplication {
explicit WindowlessApplication(const Arguments& arguments): Platform::WindowlessApplication{arguments} {}
explicit WindowlessApplication(const Arguments& arguments): Platform::WindowlessApplication{arguments, nullptr} {}
int exec() override final { return 0; }
using Platform::WindowlessApplication::tryCreateContext;
using Platform::WindowlessApplication::createContext;
} _windowlessApplication;
};
AbstractOpenGLTester::AbstractOpenGLTester(): _windowlessApplication{*_windowlessApplicationArguments} {
/* Try to create debug context, fallback to normal one if not possible. No
such thing on OSX. */
#ifndef CORRADE_TARGET_APPLE
if(!_windowlessApplication.tryCreateContext(Platform::WindowlessApplication::Configuration{}.setFlags(Platform::WindowlessApplication::Configuration::Flag::Debug)))
_windowlessApplication.createContext();
#else
_windowlessApplication.createContext();
#endif
if(Context::current()->isExtensionSupported<Extensions::GL::KHR::debug>()) {
Renderer::enable(Renderer::Feature::DebugOutput);
Renderer::enable(Renderer::Feature::DebugOutputSynchronous);

Loading…
Cancel
Save