Browse Source

Merge branch 'master' into compatibility

Vladimír Vondruš 11 years ago
parent
commit
296f12cfa5
  1. 2
      src/Magnum/AbstractQuery.cpp
  2. 2
      src/Magnum/AbstractQuery.h
  3. 2
      src/Magnum/Buffer.cpp
  4. 14
      src/Magnum/DebugOutput.cpp
  5. 7
      src/Magnum/Math/Angle.h

2
src/Magnum/AbstractQuery.cpp

@ -121,7 +121,7 @@ template<> Int AbstractQuery::result<Int>() {
Int result;
#ifndef MAGNUM_TARGET_GLES
glGetQueryObjectiv(_id, GL_QUERY_RESULT, &result);
#elif !defined(CORRADE_TARGET_EMSCRIPTEN)
#elif !defined(CORRADE_TARGET_EMSCRIPTEN) && !defined(CORRADE_TARGET_NACL)
glGetQueryObjectivEXT(_id, GL_QUERY_RESULT_EXT, &result);
#else
CORRADE_ASSERT_UNREACHABLE();

2
src/Magnum/AbstractQuery.h

@ -112,7 +112,7 @@ class MAGNUM_EXPORT AbstractQuery: public AbstractObject {
* @ref Int, @ref UnsignedLong or @ref Long.
*
* Note that this function is blocking until the result is available.
* See resultAvailable().
* See @ref resultAvailable().
* @attention @ref Magnum::UnsignedLong "UnsignedLong" and @ref Magnum::Long "Long"
* result type is not available in @ref MAGNUM_TARGET_WEBGL "WebGL".
* @see @fn_gl{GetQueryObject} with @def_gl{QUERY_RESULT}

2
src/Magnum/Buffer.cpp

@ -326,7 +326,7 @@ void* Buffer::map(const MapAccess access) {
void* Buffer::mapSub(const GLintptr offset, const GLsizeiptr length, const MapAccess access) {
#ifdef CORRADE_TARGET_NACL
CORRADE_ASSERT(!_mappedBuffer, "Buffer::mapSub(): the buffer is already mapped", nullptr);
return _mappedBuffer = glMapBufferSubDataCHROMIUM(GLenum(bindInternal(_targetHint)), offset, length, GLenum(access));
return _mappedBuffer = glMapBufferSubDataCHROMIUM(GLenum(bindSomewhereInternal(_targetHint)), offset, length, GLenum(access));
#else
static_cast<void>(offset);
static_cast<void>(length);

14
src/Magnum/DebugOutput.cpp

@ -32,6 +32,10 @@
#include "Magnum/Implementation/State.h"
#include "Magnum/Implementation/DebugState.h"
#if defined(CORRADE_TARGET_NACL_NEWLIB) || defined(CORRADE_TARGET_ANDROID) || defined(__MINGW32__)
#include <sstream>
#endif
namespace Magnum {
namespace {
@ -100,12 +104,22 @@ void defaultCallback(const DebugOutput::Source source, const DebugOutput::Type t
case DebugOutput::Type::Other: ;
}
/** @todo Remove when this is fixed everywhere (also the include above) */
#if defined(CORRADE_TARGET_NACL_NEWLIB) || defined(CORRADE_TARGET_ANDROID) || defined(__MINGW32__)
std::ostringstream converter;
converter << id;
#endif
output << '(' +
#if !defined(CORRADE_TARGET_NACL_NEWLIB) && !defined(CORRADE_TARGET_ANDROID) && !defined(__MINGW32__)
#ifndef CORRADE_GCC44_COMPATIBILITY
std::to_string(id) +
#else
std::to_string(static_cast<unsigned long long>(id)) +
#endif
#else
converter.str() +
#endif
"):" << string;
}

7
src/Magnum/Math/Angle.h

@ -213,8 +213,8 @@ template<class T> class Rad: public Unit<Rad, T> {
/** @relatesalso Rad
@brief Double-precision radian value literal
See @link operator""_rad() @endlink for more information.
@see @link operator""_radf() @endlink, @link operator""_deg() @endlink
See @link operator""_deg() @endlink for more information.
@see @link operator""_radf() @endlink
@note Not available on GCC < 4.7 and MSVC 2013. Use @ref Rad::Rad(T) instead.
@requires_gl Only single-precision types are available in OpenGL ES.
*/
@ -225,9 +225,8 @@ constexpr Rad<Double> operator "" _rad(long double value) { return Rad<Double>(v
@brief Single-precision radian value literal
See @link operator""_degf() @endlink for more information.
@see @link operator""_rad() @endlink, @link operator""_degf() @endlink
@see @link operator""_rad() @endlink
@note Not available on GCC < 4.7 and MSVC 2013. Use @ref Rad::Rad(T) instead.
@todoc Make references explicit when Doxygen can link to operator""
*/
constexpr Rad<Float> operator "" _radf(long double value) { return Rad<Float>(value); }
#endif

Loading…
Cancel
Save