void AbstractQueryGLTest::label() { #ifdef MAGNUM_TARGET_GLES2 if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::occlusion_query_boolean>()) CORRADE_SKIP(Extensions::GL::EXT::occlusion_query_boolean::string() + std::string(" is not supported.")); #endif /* No-Op version is tested in AbstractObjectGLTest */ if(!Context::current()->isExtensionSupported<Extensions::GL::KHR::debug>() && !Context::current()->isExtensionSupported<Extensions::GL::EXT::debug_label>()) CORRADE_SKIP("Required extension is not available"); { /** @todo Is this even legal optimization? */ CORRADE_EXPECT_FAIL("The object must be used at least once before setting/querying label."); CORRADE_VERIFY(false); } SampleQuery query; query.begin(SampleQuery::Target::AnySamplesPassed); query.end(); CORRADE_COMPARE(query.label(), ""); query.setLabel("MyQuery"); CORRADE_COMPARE(query.label(), "MyQuery"); MAGNUM_VERIFY_NO_ERROR(); }
void AbstractQueryGLTest::label() { /* No-Op version is tested in AbstractObjectGLTest */ if(!Context::current()->isExtensionSupported<Extensions::GL::KHR::debug>() && !Context::current()->isExtensionSupported<Extensions::GL::EXT::debug_label>()) CORRADE_SKIP("Required extension is not available"); SampleQuery query; CORRADE_COMPARE(query.label(), ""); query.setLabel("MyQuery"); CORRADE_COMPARE(query.label(), "MyQuery"); MAGNUM_VERIFY_NO_ERROR(); }
void AbstractQueryGLTest::label() { #ifdef MAGNUM_TARGET_GLES2 if(!Context::current()->isExtensionSupported<Extensions::GL::EXT::occlusion_query_boolean>()) CORRADE_SKIP(Extensions::GL::EXT::occlusion_query_boolean::string() + std::string(" is not supported.")); #endif /* No-Op version is tested in AbstractObjectGLTest */ if(!Context::current()->isExtensionSupported<Extensions::GL::KHR::debug>() && !Context::current()->isExtensionSupported<Extensions::GL::EXT::debug_label>()) CORRADE_SKIP("Required extension is not available"); SampleQuery query; CORRADE_COMPARE(query.label(), ""); query.setLabel("MyQuery"); CORRADE_COMPARE(query.label(), "MyQuery"); MAGNUM_VERIFY_NO_ERROR(); }