Browse Source

Fix NaCl build.

Apparently I enabled the queries for NaCl without testing at all.
pull/51/head
Vladimír Vondruš 12 years ago
parent
commit
cc9e6c6161
  1. 5
      src/Magnum/AbstractObject.cpp
  2. 6
      src/Magnum/Query.cpp

5
src/Magnum/AbstractObject.cpp

@ -83,8 +83,13 @@ namespace {
/**
* @todo Shouldn't ES2's KHR_debug have `GL_TRANSFORM_FEEDBACK_KHR`
* instead of `GL_TRANSFORM_FEEDBACK`? (it's a new enum in 2.0)
* NaCl extension header doesn't have it at all. Also the
* original @es_extension{EXT,debug_label} mentions it only
* for ES3 (i.e. no mention of @es_extension{EXT,transform_feedback})
*/
#ifndef CORRADE_TARGET_NACL
case GL_TRANSFORM_FEEDBACK:
#endif
#ifndef MAGNUM_TARGET_GLES
case GL_SAMPLER:
#else

6
src/Magnum/Query.cpp

@ -82,7 +82,7 @@ bool AbstractQuery::resultAvailable() {
#ifndef MAGNUM_TARGET_GLES2
glGetQueryObjectuiv(_id, GL_QUERY_RESULT_AVAILABLE, &result);
#elif defined(CORRADE_TARGET_NACL)
glGetQueryObjectuivEXT(_id, GL_QUERY_RESULT_AVAILABLE, &result);
glGetQueryObjectuivEXT(_id, GL_QUERY_RESULT_AVAILABLE_EXT, &result);
#else
CORRADE_INTERNAL_ASSERT(false);
#endif
@ -98,7 +98,7 @@ template<> UnsignedInt AbstractQuery::result<UnsignedInt>() {
#ifndef MAGNUM_TARGET_GLES2
glGetQueryObjectuiv(_id, GL_QUERY_RESULT, &result);
#elif defined(CORRADE_TARGET_NACL)
glGetQueryObjectuivEXT(_id, GL_QUERY_RESULT, &result);
glGetQueryObjectuivEXT(_id, GL_QUERY_RESULT_EXT, &result);
#else
CORRADE_INTERNAL_ASSERT(false);
#endif
@ -115,7 +115,7 @@ template<> Int AbstractQuery::result<Int>() {
#ifndef MAGNUM_TARGET_GLES
glGetQueryObjectiv(_id, GL_QUERY_RESULT, &result);
#elif defined(CORRADE_TARGET_NACL)
glGetQueryObjectivEXT(_id, GL_QUERY_RESULT, &result);
glGetQueryObjectivEXT(_id, GL_QUERY_RESULT_EXT, &result);
#else
CORRADE_INTERNAL_ASSERT(false);
#endif

Loading…
Cancel
Save