09786b9d85b1c59f08cd79ede9de77328d891ae7
dl engine
Language / 语言
Framework Introduction
dl (drawing library) is a development framework based on C++ language, integrating various C/C++ open source libraries.
Core Design Principles
- Use the latest C++ standards
- Non-commercial, free
- Integrate various open source libraries for easy use
- Suitable for developing various native applications, biased towards game engine scenarios
- Interface uniformity, cross-platform compatibility
Supported Platforms
| Platform | Windows10 | Linux | Android | MacOS | IOS |
|---|---|---|---|---|---|
| Compilation | OK | OK | OK | OK | TODO |
| Drawing | OK | OK | OK | OK | TODO |
| File | OK | OK | OK | OK | TODO |
| Audio | OK | OK | OK | OK | TODO |
| OPENSSL | OK | OK | TODO | OK | TODO |
| Input | OK | OK | Partial | OK | TODO |
| Network | OK | OK | OK | OK | TODO |
Directory Structure
├── build/ # Build-related files and scripts
├── dl/ # Core engine code
│ ├── base/ # Basic data structures and tools
│ ├── io/ # Input/output functionality
│ ├── math/ # Math library
│ ├── memory/ # Memory management
│ ├── misc/ # Miscellaneous functionality
│ ├── render/ # Rendering system
│ ├── script/ # Script support
│ ├── system/ # System functionality
│ ├── tool/ # Tool classes
│ ├── ui/ # UI system
│ └── vk/ # Vulkan rendering
├── document/ # Documentation
├── project/ # Project examples and tests
├── redist/ # Runtime libraries
├── res/ # Required resource files
├── shader/ # Shader code
└── third/ # Third-party libraries
Notes
❗ Do not check the option to pull submodules when cloning the repository
❗ No release version yet, non-commercial, welcome to join
Third-party Library List
| Function Category | Library | Description |
|---|---|---|
| 📜 Script Related | angelscript | C++-like strongly typed scripting language (no longer used) |
| 📜 Script Related | lua | Lua scripting language |
| 📜 Script Related | LuaBridge3 | Lua binding library |
| 🌐 Network Communication | asio | Network library, may enter standard library in the future |
| 🌐 Network Communication | curl | Communication protocol library (supports https with OpenSSL) |
| 🌐 Network Communication | openssl | Encryption library |
| 🎵 Audio Processing | flac | FLAC audio format library |
| 🎵 Audio Processing | ogg | OGG audio format library |
| 🎵 Audio Processing | openal-soft | OpenAL audio library |
| 🎵 Audio Processing | vorbis | OGG format related library |
| 🎵 Audio Processing | minimp3 | MP3 format library |
| 🎵 Audio Processing | midifile | MIDI library (not yet used) |
| 🎵 Audio Processing | rtmidi | MIDI library |
| 🎨 Graphics/Image | freetype | Font parsing library |
| 🎨 Graphics/Image | libwebp | WebP format library |
| 🎨 Graphics/Image | lunasvg | SVG format library |
| 🎨 Graphics/Image | stb_image | Common image format parsing library |
| 🎨 Graphics/Image | tinygltf | GLTF format library |
| 🎨 Graphics/Image | tinyobjloader | OBJ format parsing library |
| 🚜 Physics Engine | box2d | 2D rigid body physics engine (not yet integrated, planned) |
| 🚜 Physics Engine | JoltPhysics | 3D physics engine |
| 📊 Data Parsing | json | JSON parsing library |
| 📊 Data Parsing | libiconv | Character encoding conversion library |
| 📊 Data Parsing | OpenXLSX | XLSX format parsing library |
| 📊 Data Parsing | tinyxml2 | XML format parsing library |
| 📊 Data Parsing | uchardet | Character set detection (not yet used) |
| 🗜️ Compression | lz4 | LZ4 compression algorithm library |
| 🗜️ Compression | zlib | Compression format library |
| 🛠️ Development & Debugging | CrashRpt | Crash collection tool (Windows only) |
| 🛠️ Development & Debugging | googletest | Unit test library |
| 🛠️ Development & Debugging | infoware | Hardware information retrieval |
| 🛠️ Development & Debugging | mimalloc | Memory allocator |
| 🛠️ Development & Debugging | vld | Memory leak detection (Windows only) |
| 🔧 General Tools | fmt | Format library, similar to std::format |
| 🔧 General Tools | glfw | Window library (doesn't support Android, needs separate handling) |
| 🔧 General Tools | qrcodegen | QR code generation library |
| 🔧 General Tools | simde | SIMD instruction library |
| 🔧 General Tools | sqlite | SQLite library |
| 🔧 General Tools | wcwidth | Character width detection |
| 🔧 General Tools | cpp-subprocess | Subprocess library |
| 🔧 General Tools | ktx | KTX texture compression format library |
| 🔧 General Tools | magic_enum | Enum static reflection |
| 📋 Unused/Planned | better-enums | Better enums (not yet used) |
| 📋 Unused/Planned | BigNumber | Big number class (not yet used) |
Installation Guide
Windows
- Install VS2022+ (including C++ environment, CMake tools)
- Install Vulkan SDK: https://vulkan.lunarg.com/sdk/home
- Open the project folder with VS, select the root CMakeLists.txt
- Select A.Windows x64 Debug at the top, then compile and execute dl_test.exe
Linux (Ubuntu)
- Download VS Code: https://code.visualstudio.com/#alt-downloads
- Install VS Code, Git, Vulkan SDK, GLFW, etc.
// To improve download speed, please set up a domestic mirror in "Software & Updates" first
sudo apt update
//---------------------Install VS Code-----------------------
//1. Download and install from official website
sudo dpkg -i *.deb // Switch to the VS Code installation package directory to install
//2. Search and install from store
//---------------------Install CMake, Clang, etc.--------------------------
sudo apt install cmake
sudo apt install clang
sudo apt install xorg-dev
//---------------------Install Vulkan SDK-------------------
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.3.268-jammy.list https://packages.lunarg.com/vulkan/1.3.268/lunarg-vulkan-1.3.268-jammy.list
sudo apt update
sudo apt install vulkan-sdk
- Open the project folder, select the root CMakeLists.txt to generate
- Install VS Code related plugins, CMake, C++, etc.
- Select B.Linux Clang at the bottom to compile and execute dl_test
Linux (CentOS)
# Install clang
sudo dnf install clang clang-tools-extra -y
# Install cmake
sudo dnf install cmake -y
# Install curl
sudo dnf install libcurl-devel -y
# Clone repository
cd /opt
git clone https://gitee.com/lveyou/dl.git
# Parse dl
mkdir -p out
cd out
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DODE_WITH_DEMOS=false -DDL_EASY=true ..
# Compile
make -j4
# Clone subproject
git submodule update --init --recursive project/dl_chess_server/
Android
- Install Android Studio
- Install Vulkan SDK: https://vulkan.lunarg.com/sdk/home
- Open the build/android directory with Android Studio to compile and execute
MacOS
- Install CMake
# Install brew, skip if already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew install cmake
- Install Vulkan SDK: https://vulkan.lunarg.com/sdk/home
- Compile, execute in the dl root directory
mkdir -p out
cd out
cmake ..
make -j4
Usage Instructions
Compile dl_test to view test programs, or directly download the preview release version
Discussion Group
QQ Group: 512001256
Languages
C++
94.5%
CMake
1.8%
GLSL
1.5%
Lua
1.1%
PHP
0.4%
Other
0.6%