From cc9e6c616195f7079bc27c9bc8d325ef21c7079a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sun, 19 Jan 2014 12:59:48 +0100 Subject: [PATCH] Fix NaCl build. Apparently I enabled the queries for NaCl without testing at all. --- src/Magnum/AbstractObject.cpp | 5 +++++ src/Magnum/Query.cpp | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Magnum/AbstractObject.cpp b/src/Magnum/AbstractObject.cpp index 2c55735e0..4ffeb39c6 100644 --- a/src/Magnum/AbstractObject.cpp +++ b/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 diff --git a/src/Magnum/Query.cpp b/src/Magnum/Query.cpp index f1233c222..a547852dd 100644 --- a/src/Magnum/Query.cpp +++ b/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() { #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() { #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