Browse Source

Expose UnsignedLong and Long on Emscripten.

The "64-bit integers have to be emulated and it's slow" problem doesn't
apply for WebAssembly anymore.
pull/388/head
Vladimír Vondruš 7 years ago
parent
commit
05b9509dba
  1. 3
      doc/changelog.dox
  2. 16
      src/Magnum/Magnum.h
  3. 2
      src/Magnum/Types.h

3
doc/changelog.dox

@ -346,6 +346,9 @@ See also:
- The [base-qt](https://github.com/mosra/magnum-bootstrap/tree/base-qt)
bootstrap project is fixed to use OpenGL 4.1 on macOS instead of being
stuck on 2.1 (see [mosra/magnum-bootstrap#22](https://github.com/mosra/magnum-bootstrap/issues/22))
- Since asm.js days are long over and WebAssembly supports 64-bit integers
natively, the @ref UnsignedLong and @ref Long types are now exposed on
@ref CORRADE_TARGET_EMSCRIPTEN "Emscripten" as well
@subsubsection changelog-latest-changes-animation Animation library

16
src/Magnum/Magnum.h

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

2
src/Magnum/Types.h

@ -43,10 +43,8 @@ typedef std::uint16_t UnsignedShort;
typedef std::int16_t Short;
typedef std::uint32_t UnsignedInt;
typedef std::int32_t Int;
#ifndef CORRADE_TARGET_EMSCRIPTEN
typedef std::uint64_t UnsignedLong;
typedef std::int64_t Long;
#endif
typedef float Float;
typedef double Double;

Loading…
Cancel
Save