示例#1
0
template<> Int AbstractQuery::result<Int>() {
    Int result;
#ifndef MAGNUM_TARGET_GLES
    glGetQueryObjectiv(_id, GL_QUERY_RESULT, &result);
#elif !defined(CORRADE_TARGET_NACL)
    glGetQueryObjectivEXT(_id, GL_QUERY_RESULT_EXT, &result);
#else
    CORRADE_ASSERT_UNREACHABLE();
#endif
    return result;
}
示例#2
0
template<> Int AbstractQuery::result<Int>() {
    CORRADE_ASSERT(!target, "AbstractQuery::result(): the query is currently running", {});

    /** @todo Re-enable when extension loader is available for ES */
    Int result;
    #ifndef MAGNUM_TARGET_GLES
    glGetQueryObjectiv(_id, GL_QUERY_RESULT, &result);
    #elif defined(CORRADE_TARGET_NACL)
    glGetQueryObjectivEXT(_id, GL_QUERY_RESULT_EXT, &result);
    #else
    CORRADE_INTERNAL_ASSERT(false);
    #endif
    return result;
}