Breaking Changes

This file describes breaking changes between versions.

ClanLib 4.0

Version 4.0.0: 17 April 2015

Ported SDK to use the C++11 standard

ClanLib 3.0

Version 3.0.2: Not released yet

No breaking changes from 3.0.1

Version 3.0.1: Release 9 December 2013

This release contains an ABI change on clanGUI, this is not a problem since no known released products use the specific functionality. And if they did, a recompile would fix it

Version 3.0.0: Release 24 September 2013

(Significant breaking changes are only listed)

Compare the examples from ClanLib 2.3 and ClanLib 3.0 to determine the small differences.

  • All
    • The CL_ prefix has been removed. ClanLib now recides in a "clan" namespace
    • On Windows, there are no longer any library dependancies (except Windows 8 SDK)
    • Visual Studio 2008 support has been dropped. Visual Studio 2010 and 2012 now supported
    • ClanLib requires C++11 support
  • clanCore
    • The order of the matrix multiplication and subtraction has been reversed, to match the OpenGL GLSL order
    • clan::Mat[234]<type> "multiply(matrix)" has been removed to avoid confusion. Replaced with "operator *"
  • clanDisplay
    • Sprites, Images and Textures do not cache loaded textures via the constructors. However, if using resources, use the static function "resource" that uses the DisplayCache.
    • Colorf now inherits Vec4f, so you do not have to convert the structure before sending it to the shader
    • Color now inherits Vec4ub, so you do not have to convert the structure before sending it to the shader
    • CollisionOutline::copy() was renamed to clone() to be more consistent with ClanLib API
    • DisplayWindowDescription::set_decorations() was removed since it was identical to show_caption()
    • BlendMode, BufferControl, PolygonRasterizer and Pen have all been replaced with state classes. BlendState and DepthStencilState, RasterizerState
    • GraphicContext standard shader support moved into a new Canvas class. Fonts, Images and Sprites now use the Canvas class
    • Fonts are now always character height as opposed to cell height. Previously you could switch between the formats by using the sign of the height value. This caused confusion and was not portable. Multiply the font height by 64/72 roughly converts it (26-->23, 34-->29)
    • The Font_Sprite and Font_System have been merged into Font.
    • Font_Vector renamed to VectorFont, and does not inherit Font.
  • clanGL1
    • Target removed, merged into clanGL.

ClanLib 2.3

Version 2.3.8: Not released yet

No breaking changes from 2.3.7

Version 2.3.7: Release 14 June 2013

No breaking changes from 2.3.6

Version 2.3.6: Release 26 March 2012

No breaking changes from 2.3.5

Version 2.3.5: Release 23 February 2012

No breaking changes from 2.3.4

Version 2.3.4: Release 2 December 2011

These breaking changes were required to fix current functionality.

  • clanCore
    • CL_CPU_ExtensionX86 "sse5" enum was replaced with xop, avx, aes, fma3, fma4.
  • clanDisplay (linux)
    • Double click events are now fixed on Linux. Unfortunately, there was a fault in some examples that did not hook this event. The examples are now fixed:
      CL_Slot slot_mouse_down = window.get_ic().get_mouse().sig_key_down().connect(this, &App::on_mouse_down); CL_Slot slot_mouse_dblclick = window.get_ic().get_mouse().sig_key_dblclk().connect(this, &App::on_mouse_down);
  • clanGL (linux)
    • libxrender-dev is now a dependency for linux transparent windows. If you do not require transparent windows, and libxrender-dev is not found, ClanLib will still compile.

Version 2.3.3: Release 5 September 2011

No breaking changes from 2.3.2

Version 2.3.2: Release 19 August 2011

No breaking changes from 2.3.1

Version 2.3.1: Release 29 July 2011

The sqlite3 amalgamation is now a dependency. On Win32, Find it in the new dependancy libraries package. On Linux, "sudo apt-get install libsqlite3-dev"

Version 2.3.0: Release 26 July 2011

  • Important - ClanLib requires C++0x. GCC, Visual Studio 2008 SP1 and Visual Studio 2010 support this.
  • clanCore
    • smart pointers removed
      CL_WeakPtr has been #defined to std::weak_ptr
      CL_SharedPtr has been #defined to std:shared_ptr
      CL_AutoPtr has been removed. Use CL_UniquePtr instead (Use cl_move to transfer ownership)
      "weakptr->foobar()" --> "weakptr.lock()->foobar()"
      "if (myshared_ptr.is_null())" --> "if ( ! my_new_shared )"
      Removed CL_UnknownSharedPtr, use cl_dynamic_pointer_cast instead (defined to std::dynamic_pointer_cast)
    • Changed cl_clamp to use (val,min,max) parameter order instead of (min,max,val) to match OpenGL
    • CL_MemoryPool removed
    • For OpenCL compatibility, cl_int8 now represents 8 cl_int's with 32 byte alignment.
    • Renamed cl_int8-->cl_char, cl_int16-->cl_short, cl_int32->cl_int, cl_int64->cl_long. NOTE: ClanLib 2.3.1, this changed again to "cl_byte8, cl_ubyte16..." datatypes. Use these instead of ClanLib 2.2.x "cl_int8, cl_uint16..." datatypes
  • clanDisplay
    • CL_GraphicContext::create_worker_gc() removed. This function did not work, also it makes ClanLib implementation more complex. We currently share data between different OpenGL contexts using CL_SharedGCData and wglShareLists. It will be tricky to get it right when also using multiple threads. That is also assuming Windows and Linux graphic card drivers fully support it.
    • Removed the graphic context from CL_Font::get_font_metrics. It was not required
    • CL_TextureGroup no longer requires a CL_GraphicContext in constructor.
    • CL_Font_Freetype no longer requires a CL_GraphicContext in constructor.
    • CL_Sprite no longer has a constructor that only takes a CL_GraphicContext.
    • CL_Font's by default have sub-pixel rendering enabled. To disable it, use CL_FontDescription set_subpixel(false)
    • CL_Font's have antialias enabled by default (not applicable when sub-pixel rendering enabled). Thus, CL_FontDescription get_anti_alias_set() function was removed.
    • Removed CL_PolygonRasterizer::get_face_fill_mode_front() and CL_PolygonRasterizer::get_face_fill_mode_back(), replaced with CL_PolygonRasterizer::get_face_fill_mode() (Changed for OpenGL 3.0).
  • clanGUI
    • CL_GUIManager::exec() no longer accepts the "loop_until_complete" parameter. If you still require this functionality. Use CL_GUIWindowManagerTexture's process() function. Remember to call CL_KeepAlive::process() manually.
  • clanNetwork
    • CL_NetGameServer::get_event_arrived was removed.
    • CL_NetGameServer is now CL_KeepAlive enabled, so just by calling CL_KeepAlive::process() the network events will be processed. Remember to create the CL_NetGameServer object in the same thread that calls CL_KeepAlive::process()!
  • clanGL
    • The "CL_" OpenGL defines have been renamed to use the "GL_" prefix. Also updated to the OpenGL 4.1 specification.
    • The "CL" OpenGL datatype prefix now use the "GL" prefix. For example, CLint was changed to GLint
    • The "cl" OpenGL functions have been renamed use the standard gl prefix. For example, clBindBuffer is now glBindBuffer
  • clanGL1
    • The "CL_" OpenGL defines have been renamed to use the "GL_" prefix.
    • The "CL" OpenGL datatype prefix now use the "GL" prefix. For example, CLint was changed to GLint
  • clanCSSLayout
    • Numerious breaking changes. Treat this ClanLib component as rewritten. It is now stable.