|
|
|
@ -31,6 +31,7 @@ namespace Magnum { namespace Test { |
|
|
|
struct TimeQueryGLTest: AbstractOpenGLTester { |
|
|
|
struct TimeQueryGLTest: AbstractOpenGLTester { |
|
|
|
explicit TimeQueryGLTest(); |
|
|
|
explicit TimeQueryGLTest(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void constructNoCreate(); |
|
|
|
void wrap(); |
|
|
|
void wrap(); |
|
|
|
|
|
|
|
|
|
|
|
void queryTime(); |
|
|
|
void queryTime(); |
|
|
|
@ -38,12 +39,24 @@ struct TimeQueryGLTest: AbstractOpenGLTester { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
TimeQueryGLTest::TimeQueryGLTest() { |
|
|
|
TimeQueryGLTest::TimeQueryGLTest() { |
|
|
|
addTests({&TimeQueryGLTest::wrap, |
|
|
|
addTests({&TimeQueryGLTest::constructNoCreate, |
|
|
|
|
|
|
|
&TimeQueryGLTest::wrap, |
|
|
|
|
|
|
|
|
|
|
|
&TimeQueryGLTest::queryTime, |
|
|
|
&TimeQueryGLTest::queryTime, |
|
|
|
&TimeQueryGLTest::queryTimestamp}); |
|
|
|
&TimeQueryGLTest::queryTimestamp}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void TimeQueryGLTest::constructNoCreate() { |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
TimeQuery query{NoCreate}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MAGNUM_VERIFY_NO_ERROR(); |
|
|
|
|
|
|
|
CORRADE_COMPARE(query.id(), 0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MAGNUM_VERIFY_NO_ERROR(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void TimeQueryGLTest::wrap() { |
|
|
|
void TimeQueryGLTest::wrap() { |
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::timer_query>()) |
|
|
|
if(!Context::current()->isExtensionSupported<Extensions::GL::ARB::timer_query>()) |
|
|
|
|