BreakingChanges
From ClanLib Game SDK
This file describes breaking changes between versions.
ClanLib's version numbering information.
Version 3.0.0: Not released yet
(Significant breaking changes are only listed)
Compare the examples from ClanLib 2.3 and ClanLib 3.0 to determine the small differences.
- 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 supprted.
- ClanLib requires C++11 support
- 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 *"
- 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
- Target removed, merged into clanGL.
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.
- CL_CPU_ExtensionX86 "sse5" enum was replaced with xop, avx, aes, fma3, fma4.
- 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);
- 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
- 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).
- 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.
- 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()!
- 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
- 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
- Numerious breaking changes. Treat this ClanLib component as rewritten. It is now stable.
Version 2.2.13: Not released yet
Version 2.2.12: Release 19 August 2011
- No breaking changes from 2.2.11
Version 2.2.11: Release 29 July 2011
- No breaking changes from 2.2.10
Version 2.2.10: Release 20 July 2011
- No breaking changes from 2.2.9
Version 2.2.9: Release 10 June 2011
- No breaking changes from 2.2.8
Version 2.2.8: Release 08 April 2011
- No breaking changes from 2.2.7
Version 2.2.7: Release 21 March 2011
- No breaking changes from 2.2.6
Version 2.2.6: Release 14 January 2011
- No breaking changes from 2.2.5
Version 2.2.5: Released 5 November 2010
- This version is not binary compatible with the Version 2.2.4. Your application will need recompiled. There was a multithreading problem with CL_SharedPtr.
Version 2.2.4: Released 6 October 2010
- No breaking changes from 2.2.3
Version 2.2.3: Released 21 September 2010
- No breaking changes from 2.2.2
Version 2.2.2: Released 24 August 2010
- No breaking changes from 2.2.1
Version 2.2.1: Released 5 August 2010
- No breaking changes from 2.2.0
Version 2.2.0: Released 20 July 2010
- Separate Unicode builds removed
- CL_String is now an utf-8 string on all platforms. No need for cl_text wrapper around text, and there are no more -uc libraries generated.
- If you use cl_text a lot in your code. Visual Studio Find/Replace can remove them for you: Find="cl_text\({:q}\)", Replace="\1", Regular expressions enabled.
- If strings contain unicode. Save the source code as: UNICODE(UTF-8 without signature)
- Under Visual Studio, the default location for the compiled libraries have changed. The 32 and 64 bit versions of ClanLib libraries are now located under Win32 / x64 subdirectories in the selected target directory. You will need to change the Visual Studio VC++ Directories settings; adding Win32 and/or x64 dirs under Library Directories.
- GDI target has been renamed to SWRender
- gdi.h --> swrender.h
- CL_SetupGDI --> CL_SetupSWRender
- Display: CL_PixelBufferRef has been removed
- Instead, use CL_PixelBuffer and specify the source rectangle.
- Display: CL_PixelBuffer's CL_PixelFormat has been removed
- Instead, use CL_PixelBuffer.get_format() to obtain the format enum (for example cl_rgba8) and if you require the pixel masks etc, these have been moved into the CL_PixelBuffer API.
- Display: CL_FontPixelBuffer has got a new member "buffer_rect"
- If you use this class then you will need to set it to equal the desired rectangle of "buffer"
- Display: gl_*Matrix removed
- If you use CL_ProgramObjects with the GL target, you have to modify your programs if they contain gl_ModelViewMatrix, gl_ProjectionMatrix, gl_ModelViewProjectionMatrix, gl_NormalMatrix. Change these to cl_ModelViewMatrix, cl_ProjectionMatrix, cl_ModelViewProjectionMatrix, cl_NormalMatrix
- Remember to add:
"uniform mat4 cl_ModelViewMatrix;"
"uniform mat4 cl_ProjectionMatrix;"
"uniform mat4 cl_ModelViewProjectionMatrix;"
"uniform mat3 cl_NormalMatrix;"
- If you don't require all these uniforms, you can select which ones use want via the CL_ProgramMatrixFlags in gc.set_program_object(program, program_matrix_flags);
- (Note, program_matrix_flags defaults to cl_program_matrix_all_standard)
- Network: The IRC code has been removed
- If you require it, copy it directly into your application.
- Display: CL_DisplayWindow::update(const CL_Rect &rect) now returns a bool
- Return value false = Entire buffer updated, because the target does not support partial updates
- GUI: CL_LineEdit func_before_edit_changed and func_after_edit_changed, now pass the CL_InputEvent by reference
- GL: The OpenGL defines and functions have been updated to OpenGL 3.
- Legacy defines and functions have been removed.
- Display: Feature removal
- Removed - CL_TextureDepthMode()
- Replaced - CL_Texture::[set][get]_generate_mipmap() with CL_Texture::generate_mipmap()
- Revised - CL_DrawBuffer enum (removed AUX types)
- Revised - CL_PrimitivesType enum (removed QUADS and POLYGON's)
- Removed - CL_Pen::[is][enable]_point_antialiased()
- Removed - CL_Pen::[is][enable]_using_point_sprites()
- Removed - CL_Pen::[is][enable]_line_stippled()
- Removed - CL_Pen::[get][set]_min_point_size()
- Removed - CL_Pen::[get][set]_max_point_size()
- Removed - CL_Pen::[get][set]_point_distance_attenuation()
- Removed - CL_Pen::[get][set]_line_stipple_pattern()
- Removed - CL_Pen::[get][set]_line_stipple_repeat_count()
- Renamed - CL_TextureCompareMode::cl_comparemode_compare_r_to_texture to cl_comparemode_compare_ref_to_texture
- (From deprecated and removed features in OpenGL 3.3 Specification)
- Core: Removed CL_CSSImport, CL_CSSRuleSet, CL_CSSSelector from the API
- Core: Changed CL_CSSDocument::select to return a vector of prioritized CL_CSSProperty objects instead of rule-sets
- Core: Math - CL_Circle is now provided in templated form
- Templates defined for: int (CL_Circle), float (CL_Circlef), double (CL_Circled)
- Display: CL_DisplayWindowMode class removed
- Note, CL_ScreenInfo still exists, to returns the geometries of the attached screens and the index of the primary screen in the returned array (although, currently this is not implemented on linux)
- Display: Default blend equation changed
- It changed from
dest.rgba = src.a*src.rgba + (1-src.a)*dest.rgba
- to:
dest.rgb = src.a*src.rgb + (1-src.a)*dest.rgb
dest.a = src.a + (1-src.a)*dest.a
Version 2.1.3: Not released yet
- No breaking changes from 2.1.2
Version 2.1.2: Released 19 July 2010
- No breaking changes from 2.1.1
Version 2.1.1: Released 10 December 2009
- Display: CL_DisplayWindowMode is now considered obsolete
- On linux, this function does not do anything. It used to use the libxxf86vm library, but this caused various problems. It would only report the current mode on most system, and xf86vidmode is considered sort of deprecated by upstream xorg.
- (Note, since clanlib v2.x no longer changes the video resolution, CL_DisplayWindowMode has no real use).
- GL and GL1: Linux does not link with libxi
- There was no requirement to link with this library
- GL and GL1: Linux does not link with libgl
- Instead internally, ClanLib uses dlopen(). Your application now can use the libgl.so local on the machine it runs on (so it uses the configured driver on the machine, not the driver that the application was compiled with)
- General: The Microsoft windows themes have been removed from the Linux package
- Instead, a free GUI theme (GUIThemeBasic) is included for use with the ClanLib examples (or your application).
- Core: CL_Mat2 had an incorrect typedef
- "CL_Mat2<float> CL_Mat2d;" was changed to "CL_Mat2<double> CL_Mat2d;"
Version 2.1.0: Released 20 October 2009
- Display: CL_Sprite animation delay now uses milliseconds integers instead of float seconds
- There was a discrepancy between the documentation and what it actually did. Previously, using floats, we lost accuracy. Now control of animation speed should now be 100% accurate.
- CL_Sprite::update(int time_elapsed_ms) now refers to milliseconds instead of seconds
- If you previously did sprite.update(float), you now need to feed it a number 1000 as large (or stop dividing CL_System::get_time() by 1000.0f when calculating delta time). If you don't use a time parameter to sprite.update() it is calculated automatically as before.
- ClanLib library names changed
- To solve some problems with co-hosting different versions of ClanLib, and to better support breaking changes in the future, we've changed how ClanLib names its libraries under Unix. ClanLib now creates libclan21Core.so, libclan21Display.so (and so on), instead of naming it libclanCore.so and libclanDisplay.so. Every breaking release will increase the 2.x.0 number. Every backward compatible release will get a 2.1.x version.
- ClanSDL has moved out of the main package
- This was done because clanGDI is better and faster. ClanSDL is still available in the Contrib repository - read more about it on http://clanlib.org/development.html
- Core: CL_Line::clip() function has moved to CL_LineSegment::clip()
- It was placed in the wrong class in the last release. CL_Line is an line with an infinite length, thus requires a different clipping method.
- GL and GL1: CL_GraphicContext get_pixeldata() has been fixed
- The image is now no longer upside-down.
- Sound: CL_SoundBuffer_Session::set_frequency() no longer returns a bool on failure
- It's now always successful.
- Sound: CL_SoundFormat::sf_8bit_signed changed to sf_8bit_unsigned
- Sound: CL_EchoFilter "shift factor" paramter changed from int to float
- Sound: All sound filters now use floating point sounds (-1.0f to 1.0f) instead of integer (-32768 to 32767)
- Core: CL_File no longer has a default access parameter in its constructor
- Add CL_File::access_read, CL_File::access_write or CL_File::access_read_write.
- Core: CL_VirtualDirectory get_name() renamed to get_identifier()
- Core: CL_VirtualFileSystem get_name() renamed to get_identifier()
- Display: Changed tablet input device get_type() to return CL_InputDevice::tablet instead of CL_InputDevice::pointer
- Display: Changed tablet buttons to use CL_KEY_TABLETN, (where N is 1-10) instead of CL_MOUSE_LEFT etc
Version 2.0.4: Released 17 September 2009
- Display: CL_DisplayMessageQueue has been removed
- Use CL_KeepAlive::process() instead
- Display: CL_FontDescription, "copy" renamed to "clone" (Like CL_Sprite)
- Display: CL_Texture's copy_xxx_from functions CL_GraphicContext parameter is now not optional, and it has moved to the front of the function parameter list
- It was a bug with it being optional.
- Display: CL_Font_Sprite incorrectly used the CL_FontMetrics
- Thus positions may be different.
- GUI: CL_Window::func_close was removed
- Use func_close() (from CL_GUIComponent), but note, it returns a bool (true = message consumed) so you need to change your signature to bool on_close();
- GUI: Moved 'temporary' window cache parameter from CL_GUIComponent ctor to CL_DisplayWindowDescription
- GUI: set_tab_order_controller and set_tab_order are gone, the order is now the component tree
- GUI: CL_PopupMenu's func_item_selected() and func_keyboard_event() has been removed
- Use CL_PopupMenuItem's func_clicked() instead (returned from CL_PopupMenu::insert_item()).
- GUI: CL_Window::func_activation_lost and func_activation_gained was removed
- Use CL_GUIComponent::func_activated and func_deactivated instead.
- GUI: CL_GUIManager::exec() no longer takes an acceleratortable parameter
- Use set_accelerator_table(const CL_AcceleratorTable &table) instead if you use accelerators.
Version 2.0.3: Released 15 July 2009
- Display: CL_Font_Texture has been renamed to CL_Font_System
- Display: CL_Font_Freetype has been changed to use CL_TextureGroup, therefore CL_GraphicContext is required by it's constructor
- Display: CL_Font_Native has been removed (The pixel buffer based font)
- Display: CL_Texture and CL_RenderBuffer now use the CL_TextureFormat enum's (they used to use OpenGL defines)
- Example before: CL_RGB8 Now: cl_rgb8
- Display: CL_Texture no longer has the bool make_texture_nearest_power_of_two parameter in constructor
- Display: Numerous functions the pass CL_GraphicContext have been modified to pass by reference instead of by object
- Display/Core: CL_Timer moved
- The CL_Timer implementation no longer require any knowledge of the windowing system message queue, and therefore no longer requires any CL_DisplayWindow for creation. As a consequence of this change, CL_Timer has been moved to <ClanLib/Core/System/timer.h> and now uses the CL_KeepAlive system to invoke the timer callback.
- GUI: CL_GUIComponent::create_timer() removed
- As it is no longer required (see CL_Timer post above). To create a timer object, simply construct the CL_Timer object and start using it.
- Sound: CL_SoundFilter's are now passed as objects, instead of passing by address
- GUI: CL_GUIManager::set_named_font is now called register_font, get_named_font is named get_registered_font
- GUI: CL_GUIComponent now uses the CL_GUILayout as objects, instead of passing by address
- GUI: CL_GUIManager and CL_Component now uses the CL_GUITheme and CL_GUIWindowManager as objects, instead of passing by address
- GUI: CL_Window, CL_GUIComponent, CL_MainWindow no longer has a "CL_Rect geometry" parameter in constructor
- Use the CL_GUITopLevelDescription to set wanted geometry, either using set_position on it, or using the new convenience constructors including position.
- GUI: For toplevel-components, CL_GUIComponent::get_geometry() now returns CL_Rect(screenx,screeny,screenx+width,screeny+height) instead of earlier CL_Rect(0,0,width,height)
- GUI: CL_GUIComponent::invalidate_rect was renamed to request_repaint
- GUI: CL_GUIComponent::set_cliprect() now requires a gc parameter
- Core: API/Core/Math/math.h was renamed to cl_math.h
- Core: CL_Rect::shrink and expand now takes 4 parameters instead of a CL_Rect
Version 2.0.2 Released 18 May 2009
- No breaking changes since 2.0.1
Version 2.0.1 Released 28 April 2009
- Changes in Collision API if you use CL_Contour
- CL_Contour no longer exposes internal variables - use getter functions instead.
Version 2.0.0 Released 22 April 2009