ClanLib is a cross platform C++ toolkit library.

Overview

ClanLib

ClanLib is a cross platform toolkit library with a primary focus on game creation. The library is Open Source and free for commercial use, under the ClanLib License

Documentation

The documentation can be found in Documentation folder. To view the complete official documentation, including the API you may use doxygen to build it. On Linux, type 'make docs' after running configure. On Windows, point doxygen to clanlib.doxygen in the Documentation folder.

Feature List

- Very liberal zlib style [License][license]
- Fully Supports Windows, Mac OS X and Linux
- Partial support for mobile platforms
- OpenGL and Direct3D render targets
- High-performant shader based render architecture
- High level 2D graphics with fonts, sprites and animations
- Network library with game interfaces
- Sound supporting wav and ogg-vorbis
- UI supporting Flexbox positioning and CSS layouts
- Basic cross platform runtime (threading, file I/O, XML/DOM, etc.)
- Template based signal library (type-safe callbacks)
- Integrated resource management
- No support libraries required for the Microsoft build
Comments
  • Signal.callback

    Signal.callback

    I used some c++11 magic and renewed the signal and callback classes. They are now classes with variadic templates and accept as many arguments as needed. Also removed the Slot(-container) class, because it's useless in my opinion. Maybe some documentation could be made.

    I know that this is a big cut, because I removed the Slot class, but really, you don't need it. I understand if you don't accept the new signal class, but at least the callback thing - commit 6e9a8e2, a8cdc7f, f5d02b3, d060716, 9ec1533 - aren't breaking any API (at least it shouldn't). Let me hear your doubt about it.

    opened by hellow554 22
  • Remove low interest ClanLib modules

    Remove low interest ClanLib modules

    This patch removes the following ClanLib modules: GUI (replaced by uicore) CSSLayout (no longer needed when GUI is gone) GameIDE (no community interest) Physics2D (no maintainer) Physics3D (no community interest) Scene3D (no community interest) SWRender (no community interest; obsolete - we live in a GPU world now) Database (no community interest) Sqlite (no community interest) Compute (no community interest; semi-obsolete in gaming context now that OpenGL has compute shaders)

    opened by dpjudas 7
  • Templatify NetGameEventDispatcher + some clean-up

    Templatify NetGameEventDispatcher + some clean-up

    • Templatify NetGameEventDispatcher to allow arbitrary number of parameters.
    • Remove redundant constructors for NetGameEvent.
    • Moved NetGameEvent::to_string(const NetGameEventValue &) to a static function in NetGameEventValue.
    • Rename NetGameEventValue::to_x() to ::get_x() because of new ::to_string().
    opened by keigen-shu 7
  • Renew signal and callback

    Renew signal and callback

    I used some c++11 magic and renewed the signal and callback classes. They are now classes with variadic templates and accept as many arguments as possible. Also removed the Slot(-container) class, because it's useless in my opinion. Maybe some documentation could be made.

    I know that this is a big cut, because I removed the Slot class, but really, you don't need it. I understand if you don't accept the new signal class, but at least the callback thing - commit 6e9a8e2, a8cdc7f, f5d02b3, d060716, 9ec1533 - aren't breaking any API (at least it shouldn't). Let me hear your doubt about it.

    opened by hellow554 7
  • Rejection of imp->

    Rejection of imp->

    In the clanlib's architecture is widely practiced that behind the class there is an implementation. This speeds up the compilation of the library itself at the expense of the optimality of the final code. Is it generally justified for libraries?

    opened by ArtHome12 6
  • Remake `IODevice` from `int` to `size_t`

    Remake `IODevice` from `int` to `size_t`

    IODevice is written in С 32bits style with int to use for indicate the amounts instead size_t, to return -1 as error. It still works but not safety on a 64-bit architecture.

    I would like to hear the developers' opinion - will accepted the commit that change int to size_t and -1 to SIZE_MAX?

    opened by ArtHome12 5
  • Style improvments.

    Style improvments.

    Replace assigning with member initialization. Add virtual destructors to basic classes. Replace c-style cast with cpp-style cast. Some minor style improvements.

    opened by LethalGhost 5
  • Fixed big_int_impl

    Fixed big_int_impl

    I'm not a friend of this class, because it has nearly 3k lines of code (unmaintable) and is not used currently. There are good libraries out there and they are with good performance. Also rombust I'd like to ask you to test your code before commiting it, e.g. build one/two examples ;) How about automatic testing (e.g. all examples, as soon as a new commit has been made?) A jenkins server should do the job.

    opened by hellow554 5
  • OSX Changes

    OSX Changes

    Hi all,

    I was tinkering around with the OSX project and made some changes. I thought I would upload them so you could review and comment.

    I was mainly trying to get the signals and slots to work for the mouse and keyboard. Currently, the events and callbacks almost work correctly. However, I ran into a problem where I had to comment out part of the "if" check in signal_v4.h:

    void invoke(Param1 param1, Param2 param2, Param3 param3, Param4 param4) const
    {
        std::vector< std::shared_ptr<SlotCallback> > callbacks = impl->connected_slots;
        std::vector< std::shared_ptr<SlotCallback> >::size_type i, size;
        size = callbacks.size();
        for (i = 0; i < size; i++)
            if (/*callbacks[i]->valid &&*/ callbacks[i]->enabled)
                ((SlotCallback_v4<Param1, Param2, Param3, Param4> *) callbacks[i].get())->invoke(param1, param2, param3, param4);
    }
    

    I am not sure why the connected_slots are flagged as invalid. There's probably an error somewhere in my OSX implementation. They seem to work if you ignore the "valid" check. Hopefully, someone knows what would cause that.

    The event data itself also needs some work.

    The keyboard text data should be correct. However, the other values like ID and repeat count are wrong. The mouse data has similar issues. The mouse button ID should be correct. However, values like position will not be correct at the moment.

    The application window as a whole was unresponsive at first. I threaded the main call in applicationDidFinishLaunching so that function could return and give control back to the framework. Now, I don't know if that's the ideal solution. However, it fixed the unresponsiveness and I didn't notice and crazy concurrency problems (maybe they just haven't surfaced yet?). You can now resize the window and minimize it etc.

    Let me know what you think. Honestly, a lot of this code probably needs reviewed and sanitized. I don't fully understand your code base very well. So, I was just looking at how the Windows version was implemented and pushing forward.

    Thanks. Have a good one.

    opened by authenticate 5
  • ClanLib dedicated server is being removed at end of January

    ClanLib dedicated server is being removed at end of January

    The payment for the dedicated server hosting the ClanLib web pages will not be renewed in February 2018 (due to inactivity).

    Links to "clanlib.org" in the source should be modified to point to : https://github.com/sphair/ClanLib

    opened by rombust 4
  •  Properly implement DPR into clan::InputDevice.

    Properly implement DPR into clan::InputDevice.

    The unit used for mouse positioning was switched from Device Dependent Pixel (hardware pixel unit) to Device Independent Pixel (DPI-scaled pixel unit) in the DPR patch on January. This commit brings back DDP positioning for pointing devices and adds DIP positioning into clan::InputDevice as separate functions.

    • InputDevice::get_position() and InputEvent::mouse_pos are in integer hardware pixel units like in ClanLib 3.x.
    • InputDevice::get_dip_position() and InputEvent::mouse_dip_pos are in the new floating-point DIP pixel unit.

    Note that the UI API has not changed at all; the module still uses DIP unit on everything. PointerEvent's pos() and set_pos() uses the DIP unit.

    P/S: Implemented for Linux and Windows; only tested on Linux. I also removed Doxygen comments and added override keyword on the member functions of InputDeviceProvider implementors

    opened by keigen-shu 4
  • can't compile Examples/Display_Render/MapMode

    can't compile Examples/Display_Render/MapMode

    i can't compile the MapMode example. it fails with

    g++ -I Sources -I ./ pkg-config --cflags clanApp-4.1 clanDisplay-4.1 clanCore-4.1 clanGL-4.1 clanUI-4.1 -pthread -c Sources/options.cpp -o Sources/options.o g++ -I Sources -I ./ pkg-config --cflags clanApp-4.1 clanDisplay-4.1 clanCore-4.1 clanGL-4.1 clanUI-4.1 -pthread -c Sources/app.cpp -o Sources/app.o g++ -I Sources -I ./ pkg-config --cflags clanApp-4.1 clanDisplay-4.1 clanCore-4.1 clanGL-4.1 clanUI-4.1 -pthread -c ../../ThemeAero/Sources/theme.cpp -o ../../ThemeAero/Sources/theme.o ../../ThemeAero/Sources/theme.cpp: In static member function ‘static std::shared_ptrclan::ListBoxView Theme::create_listbox()’: ../../ThemeAero/Sources/theme.cpp:237:55: error: cannot bind non-const lvalue reference of type ‘std::shared_ptrclan::ScrollBarView&’ to an rvalue of type ‘std::shared_ptrclan::ScrollBarView’ 237 | initialize_scrollbar(listbox->scrollbar_x_view(), true); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~ ../../ThemeAero/Sources/theme.cpp:52:72: note: initializing argument 1 of ‘static void Theme::initialize_scrollbar(std::shared_ptrclan::ScrollBarView&, bool)’ 52 | void Theme::initialize_scrollbar(std::shared_ptrclan::ScrollBarView &scrollbar, bool isHorizontal) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ ../../ThemeAero/Sources/theme.cpp:238:55: error: cannot bind non-const lvalue reference of type ‘std::shared_ptrclan::ScrollBarView&’ to an rvalue of type ‘std::shared_ptrclan::ScrollBarView’ 238 | initialize_scrollbar(listbox->scrollbar_y_view(), false); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~ ../../ThemeAero/Sources/theme.cpp:52:72: note: initializing argument 1 of ‘static void Theme::initialize_scrollbar(std::shared_ptrclan::ScrollBarView&, bool)’ 52 | void Theme::initialize_scrollbar(std::shared_ptrclan::ScrollBarView &scrollbar, bool isHorizontal) | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ make: *** [../../Makefile.conf:23: ../../ThemeAero/Sources/theme.o] Error 1`

    g++ 11.2.0 is used

    opened by BlackMage2 1
  • /usr/share/doc/clanlib-4.1/Reference/html/Core.html is not formatted

    /usr/share/doc/clanlib-4.1/Reference/html/Core.html is not formatted

    For my compile the Reference/html/Core.html isn't well formated. All Text on this site is in a < pre > box. my doxygen version was 1.8.17. I can't explain why.

    opened by BlackMage2 3
  • Clanlib fails to build on aarch64

    Clanlib fails to build on aarch64

    Clanlib 4.1.0 fails to build on aarch64. Error log:

    [  183s] System/detect_cpu_ext.cpp: In function 'detect_cpu_extension':
    [  183s] System/detect_cpu_ext.cpp:81:4: error: impossible constraint in 'asm'
    [  183s]    81 |    __cpuid((int*)cpuinfo, 0x1);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:86:4: error: impossible constraint in 'asm'
    [  183s]    86 |    __cpuid((int*)cpuinfo, 0x80000000);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:90:4: error: impossible constraint in 'asm'
    [  183s]    90 |    __cpuid((int*)cpuinfo, 0x80000001);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:95:4: error: impossible constraint in 'asm'
    [  183s]    95 |    __cpuid((int*)cpuinfo, 0x80000000);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:99:4: error: impossible constraint in 'asm'
    [  183s]    99 |    __cpuid((int*)cpuinfo, 0x80000001);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:104:4: error: impossible constraint in 'asm'
    [  183s]   104 |    __cpuid((int*)cpuinfo, 0x80000000);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:108:4: error: impossible constraint in 'asm'
    [  183s]   108 |    __cpuid((int*)cpuinfo, 0x80000001);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:113:4: error: impossible constraint in 'asm'
    [  183s]   113 |    __cpuid((int*)cpuinfo, 0x1);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:118:4: error: impossible constraint in 'asm'
    [  183s]   118 |    __cpuid((int*)cpuinfo, 0x1);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:123:4: error: impossible constraint in 'asm'
    [  183s]   123 |    __cpuid((int*)cpuinfo, 0x1);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:128:4: error: impossible constraint in 'asm'
    [  183s]   128 |    __cpuid((int*)cpuinfo, 0x1);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:134:4: error: impossible constraint in 'asm'
    [  183s]   134 |    __cpuid((int*)cpuinfo, 0x80000000);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:138:4: error: impossible constraint in 'asm'
    [  183s]   138 |    __cpuid((int*)cpuinfo, 0x80000001);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:143:4: error: impossible constraint in 'asm'
    [  183s]   143 |    __cpuid((int*)cpuinfo, 0x1);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:148:4: error: impossible constraint in 'asm'
    [  183s]   148 |    __cpuid((int*)cpuinfo, 0x1);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:153:4: error: impossible constraint in 'asm'
    [  183s]   153 |    __cpuid((int*)cpuinfo, 0x80000000);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:157:4: error: impossible constraint in 'asm'
    [  183s]   157 |    __cpuid((int*)cpuinfo, 0x80000001);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:162:4: error: impossible constraint in 'asm'
    [  183s]   162 |    __cpuid((int*)cpuinfo, 0x1);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:167:4: error: impossible constraint in 'asm'
    [  183s]   167 |    __cpuid((int*)cpuinfo, 0x1);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:172:4: error: impossible constraint in 'asm'
    [  183s]   172 |    __cpuid((int*)cpuinfo, 0x1);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:177:4: error: impossible constraint in 'asm'
    [  183s]   177 |    __cpuid((int*)cpuinfo, 0x80000000);
    [  183s]       |    ^
    [  183s] System/detect_cpu_ext.cpp:181:4: error: impossible constraint in 'asm'
    [  183s]   181 |    __cpuid((int*)cpuinfo, 0x80000001);
    [  183s]       |    ^
    
    opened by ggardet 2
  • ClanLib 2.2 for super methane brothers

    ClanLib 2.2 for super methane brothers

    Was trying to get super methane brothers to compile from the dead again.

    https://sourceforge.net/projects/methane/

    However it needs ClanLib 2.2 , as clanlib.org as down currently there probably no hope this game building from source again. Options are to patch methane brothers to use more recent version of clanlib.

    opened by nixinator 4
  • clan::PathHelp::get_basepath win32 drive names

    clan::PathHelp::get_basepath win32 drive names

    This seems counter-intuitive auto result = clan::PathHelp::get_basepath("c:\ABC\DEF", PathHelp::path_type_file); result --> "\ABC". The c: is chopped off.

    opened by rombust 1
  • Property DisplayWindowDescription.is_topmost() does not work on Mac OS

    Property DisplayWindowDescription.is_topmost() does not work on Mac OS

    The code below creates window, which is not always on top

    `

    // Set the window description
    clan::DisplayWindowDescription desc_window;
    desc_window.set_title("Motion Learning");
    desc_window.set_topmost();
    desc_window.set_popup_window();
    desc_window.set_allow_resize(false);
    desc_window.set_layered(true);
    desc_window.show_caption(false);
    desc_window.set_size(clan::Size(1792, 828), false);
    
    // Open the windows
    window = clan::DisplayWindow(desc_window);
    

    `

    opened by kapulkin 2
Releases(v4.1.0)
  • v4.1.0(Apr 1, 2021)

    Significant changes since the ClanLib 4.0 release: Performance increase of clanUI Support of OpenGL ES3.2 (Using Visual Studio) Fixed clan::GameTime::get_time_elapsed_ms() accuracy Enhanced clanUI to reflect the UICore fork.

    Other changes worth of mentioning Updated clanSound on Linux to use ALSA. Previously this was accidentality disabled. Support Visual Studio 2019 Various API enhancements Various bug fixes

    Source code(tar.gz)
    Source code(zip)
  • v4.0.0(May 11, 2015)

    Significant changes since the ClanLib 3.0 branch:

    • Removed all the obsolete elements of ClanLib that were either abandoned, replaced by newer methodologies, moved to separate projects.
    • Removed base modules: Compute, CSSLayout, Database, GameIDE, GUI, Physics2D, Physics3D, Sqlite and SWRender
    • Introduced clanUI, that replaced clanGUI. This took the best ideas of clanGUI, to provide a faster, easier and more flexible UI framework.
    • New Prerequisite, a C++11 compiler is now required to compile ClanLib.
    Source code(tar.gz)
    Source code(zip)
    assimp_16apr2015.zip(33.75 MB)
    freetype2412.zip(2.48 MB)
    fribidi_0_19_5.zip(849.75 KB)
    zlib128.zip(714.49 KB)
  • 3.0.1(Dec 11, 2013)

    Release Date: 9 December 2013.

    See breaking changes.

    clanCore

    Fixed JsonValue bug with boolean assignment Added WorkQueue::get_items_queued()

    clanDisplay

    Fixed bug with the ClanLib batchers, that caused a memory overflow error when more than 4 textures are batched. Fix freetype font loader using bitmap fonts (thanks to ElGrotto) Apply Nightwind0 patch for Loading TTF fonts from resources in 3.0

    clanGUI

    Added GUIComponent.set_style Implement the Label::set_text_color, using set_style() Allow any GUI Component or GUI ThemePart to add additional CSS styles via the PropertyValue classes

    Source code(tar.gz)
    Source code(zip)
Owner
Kenneth Gangstø
Kenneth Gangstø
Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, C++ machine learning library designed for real-time gesture recognition.

Gesture Recognition Toolkit (GRT) The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, C++ machine learning library designed for re

Nicholas Gillian 793 Dec 29, 2022
Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit

CNTK Chat Windows build status Linux build status The Microsoft Cognitive Toolkit (https://cntk.ai) is a unified deep learning toolkit that describes

Microsoft 17.3k Dec 23, 2022
Lite.AI.ToolKit 🚀🚀🌟: A lite C++ toolkit of awesome AI models such as RobustVideoMatting🔥, YOLOX🔥, YOLOP🔥 etc.

Lite.AI.ToolKit ?? ?? ?? : A lite C++ toolkit of awesome AI models which contains 70+ models now. It's a collection of personal interests. Such as RVM, YOLOX, YOLOP, YOLOR, YoloV5, DeepLabV3, ArcFace, etc.

DefTruth 2.4k Jan 9, 2023
Zenotech 6 Oct 21, 2022
Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit

The Microsoft Cognitive Toolkit is a unified deep learning toolkit that describes neural networks as a series of computational steps via a directed graph.

Microsoft 17.3k Jan 6, 2023
A C++-based, cross platform ray tracing library

Visionaray A C++ based, cross platform ray tracing library Getting Visionaray The Visionaray git repository can be cloned using the following commands

Stefan Zellmann 409 Dec 29, 2022
RapidOCR - A cross platform OCR Library based on PaddleOCR & OnnxRuntime

RapidOCR (捷智OCR) 简体中文 | English 目录 RapidOCR (捷智OCR) 简介 近期更新 ?? 2021-12-18 update 2021-11-28 update 2021-11-13 update 2021-10-27 update 2021-09-13 upda

RapidAI-NG 754 Jan 4, 2023
MediaPipe offers cross-platform, customizable ML solutions for live and streaming media.

Cross-platform, customizable ML solutions for live and streaming media.

Google 20k Jan 9, 2023
ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator

ONNX Runtime is a cross-platform inference and training machine-learning accelerator compatible with deep learning frameworks, PyTorch and TensorFlow/Keras, as well as classical machine learning libraries such as scikit-learn, and more.

Microsoft 8k Jan 2, 2023
A Cross platform implement of Wenet ASR. It's based on ONNXRuntime and Wenet. We provide a set of easier APIs to call wenet models.

RapidASR: a new member of RapidAI family. Our visio is to offer an out-of-box engineering implementation for ASR. A cpp implementation of recognize-on

RapidAI-NG 97 Nov 17, 2022
The Forge Cross-Platform Rendering Framework PC Windows, Linux, Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2

The Forge is a cross-platform rendering framework supporting PC Windows 10 / 7 with DirectX 12 / Vulkan 1.1 with DirectX Ray Tracing API DirectX 11 Fa

The Forge / Confetti 3.4k Jan 1, 2023
A Cross-Platform(Web, Android, iOS) app to Generate Faces of People (These people don't actually exist) made using Flutter.

?? ?? Flutter Random Face Generator A flutter app to generate random faces. The Generated faces do not actually exist in real life (in other words you

Aditya 94 Jan 3, 2023
MaixPy3 is a Python3 toolkit based on cpython

MaixPy3 is a Python3 toolkit based on cpython, which simplifies the development of applications on Linux AI edge devices through Python programming.

Sipeed 139 Jan 2, 2023
🐸 Coqui STT is an open source Speech-to-Text toolkit which can run in real time on devices ranging from a Raspberry Pi 4 to high power GPU servers

Coqui STT ( ?? STT) is an open-source deep-learning toolkit for training and deploying speech-to-text models. ?? STT is battle tested in both producti

Coqui.ai 1.7k Jan 2, 2023
DyNet: The Dynamic Neural Network Toolkit

The Dynamic Neural Network Toolkit General Installation C++ Python Getting Started Citing Releases and Contributing General DyNet is a neural network

Chris Dyer's lab @ LTI/CMU 3.3k Dec 31, 2022
OpenVINO™ Toolkit repository

This toolkit allows developers to deploy pre-trained deep learning models through a high-level C++ Inference Engine API integrated with application logic.

OpenVINO Toolkit 3.9k Dec 31, 2022
A Modern C++ Data Sciences Toolkit

MeTA: ModErn Text Analysis Please visit our web page for information and tutorials about MeTA! Build Status (by branch) master: develop: Outline Intro

null 656 Dec 25, 2022
VNOpenAI 31 Dec 26, 2022