June 2014 updates to Magnum

The Mag­num C++11 and OpenGL/OpenGL ES/We­bGL graph­ics en­gine gained ex­per­i­men­tal An­droid sup­port, win­dow­less ap­pli­ca­tions on OS X and Win­dows, us­es SDL2 as the de­fault tool­kit, adds new tex­ture and mesh fea­tures, im­proves build sys­tem and got huge doc­u­men­ta­tion re­view.

The June snap­shot is avail­able un­der snapshot-2014-06 tag in Cor­rade, Mag­num, Mag­num Plug­ins, Mag­num In­te­gra­tion and Mag­num Ex­am­ples GitHub repos­i­to­ries. This ar­ti­cle will de­scribe the most im­por­tant changes, for all the com­mits that went to master branch­es since the Jan­u­ary snap­shot (tagged snapshot-2014-01) see logs in Cor­rade, Mag­num, Mag­num Plug­ins and Mag­num In­te­gra­tion, re­spec­tive­ly.

For com­pat­i­bil­i­ty branch there is tag snapshot-2014-06-compatibility in Cor­rade, Mag­num, Mag­num Plug­ins and Mag­num Ex­am­ples repos­i­to­ries.

Ex­per­i­men­tal An­droid sup­port

This snap­shot con­tains ex­per­i­men­tal sup­port for An­droid, see Cor­rade and Mag­num build­ing doc­u­men­ta­tion. Ini­tial plat­form sup­port is in Plat­form::An­droidAp­pli­ca­tion.

Android Application

Win­dow­less ap­pli­ca­tions on Mac OS X and Win­dows

Win­dow­less ap­pli­ca­tions are now sup­port­ed on Win­dows and, thanks to joint ef­fort by @ama­ranth and @ArEn­Sc, al­so on OS X. All com­mand-line util­i­ties such as mag­num-in­fo, mag­num-dis­tance­field­con­vert­er and mag­num-font­con­vert­er are thus now avail­able on all three ma­jor plat­forms.

Drop­ping GCC 4.6 sup­port from mas­ter

Since GCC 4.7 is avail­able even in LTS Ubun­tu, it was time to drop sup­port for 4.6 from master and pro­vid­ing it on­ly in compatibility branch. Mas­ter branch now makes use of ad­di­ton­al C++11 fea­tures, such as tem­plate alias­es, del­e­gat­ing con­struc­tors, us­er-de­fined lit­er­als etc., re­sult­ing in more main­tain­able code.

Us­ing SDL2 as the de­fault win­dow­ing tool­kit

Since LTS Ubun­tu now al­so has SDL2 in the repos­i­to­ries, it is now used in the doc­u­men­ta­tion, tu­to­ri­als and ex­am­ples as the de­fault win­dow­ing tool­kit. The GLUT tool­kit, which was used be­fore, is still avail­able in the li­brary, but its us­age is not rec­om­mend­ed and it prob­a­bly won’t re­ceive new fea­tures any­more.

In­stalling de­bug and re­lease li­braries and plug­ins in­to sep­a­rate lo­ca­tions

As ex­plained in mosra/mag­num#45, on some plat­forms it is not pos­si­ble to mix de­bug and re­lease li­braries, as it leads to link­er er­rors. Ad­di­tion­al­ly it al­so wasn’t pos­si­ble to in­stall both de­bug and re­lease li­braries in­to the same lo­ca­tion, caus­ing var­i­ous in­con­ve­niences. Since this re­lease, de­bug li­braries are in­stalled with -d suf­fix and de­bug plug­ins are in­stalled in­to sep­a­rate magnum-d/ di­rec­to­ry. From end-us­er point of view not much has changed, CMake will au­to­mat­i­cal­ly se­lect prop­er li­braries based on build type and al­so tries the best to se­lect ap­pro­pri­ate plug­in di­rec­to­ry. See doc­u­men­ta­tion about plug­ins for more in­for­ma­tion about plug­in di­rec­to­ries on mul­ti-con­fig­u­ra­tion build sys­tems.

Cor­rade

Dependency changes

  • Min­i­mal re­quired GCC ver­sion is now 4.7. Sup­port for GCC 4.6 has been moved to com­pat­i­bil­i­ty branch.

New features

Changes

  • Li­braries and plug­ins in de­bug build con­fig­u­ra­tion are in­stalled to dif­fer­ent lo­ca­tions, mak­ing it pos­si­ble to have de­bug and re­lease li­braries in­stalled along­side each oth­er
  • Com­pil­er com­pat­i­bil­i­ty mode is now au­to­mat­i­cal­ly de­tect­ed by CMake to make the build­ing eas­i­er
  • It’s no longer need­ed to ex­plic­it­ly test va­lid­i­ty of point­er re­turned from Plug­in­Man­ag­er::Man­ag­er::in­stance()
  • Im­proved er­ror re­port­ing in Plug­in­Man­ag­er li­brary
  • Thor­ough doc­u­men­ta­tion re­view, fix­es and im­prove­ments

Bug fixes

Deprecated APIs

No API was dep­re­cat­ed in this re­lease.

Removed APIs

Mag­num

Dependency changes

  • Min­i­mal re­quired GCC ver­sion is now 4.7. Sup­port for GCC 4.6 has been moved to com­pat­i­bil­i­ty branch.

New features

Changes

Bug fixes

  • Fixed us­age with OpenGL ES 3.1 con­texts (it com­plained about in­valid ver­sion)
  • Fixed com­pi­la­tion of Shaders::MeshVi­su­al­iz­er un­der We­bGL and with AN­GLE, see mosra/mag­num#56
  • Fixed var­i­ous build is­sues on Mac OS X, see mosra/mag­num#51 and mosra/mag­num#54

Deprecated APIs

Removed APIs

  • All func­tion­al­i­ty dep­re­cat­ed in Oc­to­ber snap­shot has been re­moved, name­ly:
    • Re­moved dep­re­cat­ed raw-point­er ver­sions of Buf­fer::set­Da­ta() and Buffer:setSubData(), use over­loads tak­ing Con­tain­ers::Ar­rayRef­er­ence in­stead
    • Re­moved dep­re­cat­ed Magnum/ImageFormat.h head­er and ImageFormat/ImageType enums, use Magnum/ColorFormat.h head­er and Col­or­For­mat/Col­orType enums in­stead
    • Re­moved dep­re­cat­ed Matrix2 and Matrix2d type­defs, use Matrix2x2 and Matrix2x2d in­stead
    • Re­moved dep­re­cat­ed Magnum/Swizzle.h head­er and Magnum::swizzle() func­tion, use Magnum/Math/Swizzle.h and Math::swiz­zle() in­stead
    • Re­moved dep­re­cat­ed *::maxSupported*() lim­it queries, use the less ver­bose *::max*() ver­sions in­stead
    • Re­moved dep­re­cat­ed Platform::*Application::InputEvent::Modifier::*Button enum val­ues, use Plat­form::*Ap­pli­ca­tion::*Event::but­tons() func­tion and Plat­form::*Ap­pli­ca­tion::*Event::But­ton enum in­stead
    • Platform::Sdl2Application::Configuration::Flag enum and re­lat­ed func­tions were re­placed with Win­dowFlag, as the name would now con­flict with con­text flags

Internal changes

  • Re­moved last re­main­ing bits of glob­al state, ev­ery­thing is now stored per-con­text.

Mag­num Boot­strap

Changes

  • All win­dowed ap­pli­ca­tions now use SDL2 by de­fault. Min­i­mal ap­pli­ca­tion us­ing GLUT is avail­able in new base-glut branch.
  • Adapt­ed all boot­strap ap­pli­ca­tions to Mag­num im­prove­ments

Mag­num Plug­ins

Dependency changes

  • Min­i­mal re­quired GCC ver­sion is now 4.7. Sup­port for GCC 4.6 has been moved to com­pat­i­bil­i­ty branch.

Changes

  • Li­braries and plug­ins in de­bug build con­fig­u­ra­tion are in­stalled to dif­fer­ent lo­ca­tions, mak­ing it pos­si­ble to have de­bug and re­lease li­braries in­stalled along­side each oth­er.

Mag­num In­te­gra­tion

Dependency changes

  • Min­i­mal re­quired GCC ver­sion is now 4.7.

Changes

  • Li­braries and plug­ins in de­bug build con­fig­u­ra­tion are in­stalled to dif­fer­ent lo­ca­tions, mak­ing it pos­si­ble to have de­bug and re­lease li­braries in­stalled along­side each oth­er.

Deprecated APIs

No API was dep­re­cat­ed in this re­lease.

Removed APIs

No dep­re­cat­ed API was re­moved in this re­lease.