October 2013 updates to Magnum

Sum­ma­ry of changes dur­ing the first two months af­ter pub­lic re­lease. Two new ports, us­abil­i­ty im­prove­ments, OpenGL lim­it queries and in­tro­duc­tion of API dep­re­ca­tion.

The Jan­u­ary snap­shot is avail­able un­der snapshot-2013-10 tag in Cor­rade, Mag­num, Mag­num Plug­ins and Mag­num In­te­gra­tion 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 mas­ter branch­es since the first pub­lic re­lease in Au­gust (tagged snapshot-2013-08) see logs in Cor­rade, Mag­num, Mag­num Plug­ins and Mag­num In­te­gra­tion, re­spec­tive­ly.

API dep­re­ca­tion and back­wards com­pat­i­bil­i­ty

Be­cause the li­brary is con­stant­ly evolv­ing, some APIs will be re­placed with faster, safer or more in­tu­itive ver­sions from time to time. The old API is then marked as dep­re­cat­ed and sched­uled for re­moval in some fu­ture re­lease. The li­braries are source com­pat­i­ble, but not bi­na­ry com­pat­i­ble, as full bi­na­ry com­pat­i­bil­i­ty might im­pose un­want­ed per­for­mance is­sues, which is usu­al­ly not want­ed for high-per­for­mance graph­ics frame­works.

Both Cor­rade and Mag­num li­braries are by de­fault built with dep­re­cat­ed APIs in­clud­ed. How­ev­er, to make your code fu­ture-proof and more ro­bust, you should dis­able build­ing of dep­re­cat­ed APIs by dis­abling BUILD_DEPRECATED CMake op­tion. In­for­ma­tion about whether giv­en li­brary is built with dep­re­cat­ed APIs or not is ex­posed via COR­RADE_BUILD_DEP­RE­CAT­ED or MAG­NUM_BUILD_DEP­RE­CAT­ED CMake vari­able and al­so pre­proces­sor def­i­ni­tion. Please note that the dep­re­cat­ed APIs will be pe­ri­od­i­cal­ly re­moved af­ter some time (on which I have yet to de­cide, but the dep­re­ca­tion pe­ri­od will be not short­er than six months).

The doc­u­men­ta­tion now al­so con­tains list of dep­re­cat­ed APIs in both Corrade and Magnum, in­for­ma­tion about whether COR­RADE_BUILD_DEP­RE­CAT­ED and MAG­NUM_BUILD_DEP­RE­CAT­ED is en­abled or not is now al­so print­ed in mag­num-in­fo.

Cor­rade

Dependency changes

No de­pen­den­cy changes in this re­lease.

New features

Changes

  • Re­turn­ing std::unique_ptr in­stead of naked point­er from Plug­in­Man­ag­er::Man­ag­er::in­stance() for bet­ter us­abil­i­ty and to avoid ac­ci­den­tal mem­o­ry leaks
  • Doc­u­men­ta­tion up­dates and im­prove­ments to make the li­brary more ac­ces­si­ble for new­com­ers
  • Var­i­ous build sys­tem up­dates for bet­ter com­pile times and eas­i­er in­stal­la­tion

Bug fixes

Deprecated APIs

Removed APIs

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

Mag­num

Dependency changes

  • Re­moved GLEW de­pen­den­cy in fa­vor of built-in glLoadGen, re­sult­ing in great­ly re­duced com­pi­la­tion time and less com­pat­i­bil­i­ty is­sues. The base li­brary thus now de­pends on­ly on Cor­rade and OpenGL li­braries.

New features

Changes

Bug fixes

  • Fixed com­pi­la­tion with Clang’s libc++
  • Fixed com­pat­i­bil­i­ty of builtin shaders with GLSL 1.20 and GLSL ES 1.00, added shad­er com­pi­la­tion tests to pre­vent this is­sue from reap­pear­ing

Deprecated APIs

  • Matrix2 and Matrix2d is dep­re­cat­ed, use Ma­trix2x2 and Ma­trix2x2d in­stead
  • swizzle() is dep­re­cat­ed, all of its func­tion­al­i­ty has been moved in­to Math::swiz­zle()
  • Buffer::setData() and Buffer::setSubData() over­loads tak­ing pair of da­ta point­er and size are dep­re­cat­ed, use Con­tain­ers::Ar­rayRef­er­ence-based Buf­fer::set­Da­ta() and Buf­fer::set­Sub­Da­ta()
  • ImageFormat.h head­er, ImageFormat and ImageType enums are dep­re­cat­ed, use ColorFormat.h head­er, Col­or­For­mat and Col­orType enums which re­flect OpenGL nam­ing bet­ter in­stead
  • Platform::*Application::InputEvent::Modifier::*Button enum val­ues are dep­re­cat­ed, use Platform::*Application::*Event::buttons() <Platform::Sdl2Application::MouseMoveEvent::buttons()> and Platform::*Application::*Event::Button <Platform::Sdl2Application::MouseMoveEvent::Button> enum in­stead
  • AbstractShaderProgram::maxSupportedVertexAttributeCount(), AbstractTexture::maxSupportedLayerCount() and Sampler::maxSupportedAnisotropy() are dep­re­cat­ed in fa­vor of less ver­bose AbstractShaderProgram::maxVertexAttributes(), AbstractTexture::maxLayers() and Sampler::maxAnisotropy()

Removed APIs

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

Mag­num Plug­ins

Dependency changes

No de­pen­den­cy changes in this re­lease.

New features

Changes

  • Re­worked Col­ladaIm­porter in­ter­nals to avoid dou­ble dele­tions
  • Doc­u­men­ta­tion up­dates and im­prove­ments to make the li­brary more ac­ces­si­ble for new­com­ers
  • Var­i­ous build sys­tem up­dates for bet­ter com­pile times and eas­i­er in­stal­la­tion

Bug fixes

  • Fixed com­pi­la­tion of plug­ins us­ing std::u32string on MinGW
  • Fixed link­er er­rors on MinGW

Mag­num In­te­gra­tion

Dependency changes

No de­pen­den­cy changes in this re­lease.

Changes

  • Doc­u­men­ta­tion up­dates and im­prove­ments to make the li­brary more ac­ces­si­ble for new­com­ers
  • Var­i­ous build sys­tem up­dates for bet­ter com­pile times and eas­i­er in­stal­la­tion

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.