|
|
|
@ -242,26 +242,27 @@ void ContextGLTest::constructConfiguration() { |
|
|
|
|
|
|
|
|
|
|
|
void ContextGLTest::makeCurrent() { |
|
|
|
void ContextGLTest::makeCurrent() { |
|
|
|
CORRADE_VERIFY(Context::hasCurrent()); |
|
|
|
CORRADE_VERIFY(Context::hasCurrent()); |
|
|
|
|
|
|
|
Context* current = &Context::current(); |
|
|
|
Context& current = Context::current(); |
|
|
|
|
|
|
|
Context::makeCurrent(nullptr); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_VERIFY(!Context::hasCurrent()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
Platform::GLContext ctx{Context::Configuration{} |
|
|
|
Context::makeCurrent(nullptr); |
|
|
|
.setFlags(Context::Configuration::Flag::QuietLog) |
|
|
|
Containers::ScopeGuard resetCurrent{current, Context::makeCurrent}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_VERIFY(Context::hasCurrent()); |
|
|
|
CORRADE_VERIFY(!Context::hasCurrent()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_VERIFY(!Context::hasCurrent()); |
|
|
|
{ |
|
|
|
|
|
|
|
Platform::GLContext ctx{Context::Configuration{} |
|
|
|
|
|
|
|
.setFlags(Context::Configuration::Flag::QuietLog) |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
Context::makeCurrent(¤t); |
|
|
|
CORRADE_VERIFY(Context::hasCurrent()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CORRADE_VERIFY(!Context::hasCurrent()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CORRADE_VERIFY(Context::hasCurrent()); |
|
|
|
CORRADE_VERIFY(Context::hasCurrent()); |
|
|
|
CORRADE_COMPARE(&Context::current(), ¤t); |
|
|
|
CORRADE_COMPARE(&Context::current(), current); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#ifndef CORRADE_TARGET_EMSCRIPTEN |
|
|
|
#ifndef CORRADE_TARGET_EMSCRIPTEN |
|
|
|
|