Browse Source

Do not use GL-related ifdefs for API-agnostic functionality.

pull/331/head
Vladimír Vondruš 7 years ago
parent
commit
2cd1e4b7c6
  1. 8
      src/Magnum/Magnum.h
  2. 3
      src/Magnum/Types.h

8
src/Magnum/Magnum.h

@ -204,18 +204,20 @@ Equivalent to GLSL @glsl int @ce.
*/ */
typedef std::int32_t Int; typedef std::int32_t Int;
#ifndef MAGNUM_TARGET_WEBGL #ifndef CORRADE_TARGET_EMSCRIPTEN
/** /**
@brief Unsigned long (64bit) @brief Unsigned long (64bit)
@requires_gles 64-bit integers are not available in WebGL. @partialsupport 64-bit integers are not available under
@ref CORRADE_TARGET_EMSCRIPTEN "Emscripten".
*/ */
typedef std::uint64_t UnsignedLong; typedef std::uint64_t UnsignedLong;
/** /**
@brief Signed long (64bit) @brief Signed long (64bit)
@requires_gles 64-bit integers are not available in WebGL. @partialsupport 64-bit integers are not available in
@ref CORRADE_TARGET_EMSCRIPTEN "Emscripten".
*/ */
typedef std::int64_t Long; typedef std::int64_t Long;
#endif #endif

3
src/Magnum/Types.h

@ -31,6 +31,7 @@
#include <cstdint> #include <cstdint>
#include "Corrade/configure.h"
#include "Magnum/configure.h" #include "Magnum/configure.h"
namespace Magnum { namespace Magnum {
@ -42,7 +43,7 @@ typedef std::uint16_t UnsignedShort;
typedef std::int16_t Short; typedef std::int16_t Short;
typedef std::uint32_t UnsignedInt; typedef std::uint32_t UnsignedInt;
typedef std::int32_t Int; typedef std::int32_t Int;
#ifndef MAGNUM_TARGET_WEBGL #ifndef CORRADE_TARGET_EMSCRIPTEN
typedef std::uint64_t UnsignedLong; typedef std::uint64_t UnsignedLong;
typedef std::int64_t Long; typedef std::int64_t Long;
#endif #endif

Loading…
Cancel
Save