Skip to content

Commit 9a93ea3

Browse files
committed
Update README.md
1 parent 28b45d1 commit 9a93ea3

1 file changed

Lines changed: 47 additions & 23 deletions

File tree

README.md

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,61 @@
11
# Pathfinder C++
22

3-
This is a C++ port of [Pathfinder 3](https://github.com/servo/pathfinder) with a Vulkan backend added.
3+
[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](LICENSE)
4+
[![C++ Standard](https://img.shields.io/badge/C%2B%2B-14-green.svg)](https://en.wikipedia.org/wiki/C%2B%2B14)
45

5-
## Requirements
6+
A high-performance, GPU-accelerated 2D vector graphics library, ported from the original Rust implementation of [Pathfinder 3](https://github.com/servo/pathfinder). This version brings the power of massivly parallel vector rasterization to the C++ ecosystem, with native **Vulkan**, **OpenGL**, and **Metal** backends.
67

7-
* C++14.
8-
* Hybrid mode: `Vulkan` / `OpenGL 3.3 (or higher)` / `OpenGL ES 3.0 (or higher)` / `WebGL2`.
9-
* GpuDriven mode: `Vulkan` / `OpenGL 4.3 (or higher)` / `OpenGL ES 3.1 (or higher)`.
8+
## 🚀 Key Features
109

11-
Notable: The GpuDriven mode has some limits in an OpenGL ES context because, for ES, it's impossible to read & write
12-
the same image in a single compute invocation.
10+
* **Massively Parallel Rasterization**: Leverages the GPU to rasterize complex vector scenes at high speeds.
11+
* **Dual Rendering Strategies**:
12+
* **Hybrid Mode**: CPU-assisted binning with hardware rasterization. Optimized for mobile devices and static path caching.
13+
* **GPU-Driven Mode**: Full compute-shader-based pipeline. Minimizes CPU overhead by moving binning and tiling entirely to the GPU.
14+
* **Advanced Effects**: Native support for shadows, blurs, gradients, and complex clipping paths.
15+
* **Cross-Platform**: Designed for Windows, Linux, macOS, Android, and Web (Wasm).
1316

14-
## Run demo
17+
## 🛠 Supported Backends
1518

16-
### Shader generation (Optional)
19+
| Backend | Hybrid Mode | GPU-Driven Mode | Notes |
20+
| :--- | :---: | :---: | :--- |
21+
| **Vulkan** ||| Best performance |
22+
| **OpenGL 4.3+** ||| Desktop standard |
23+
| **OpenGL ES 3.1+** ||* | *Limited by Storage Image access on some ES devices |
24+
| **OpenGL ES 3.0** ||| Compatibility mode |
25+
| **WebGL2** ||| Web target |
1726

18-
* Run `src/shaders/compile_and_convert.ps1` to generate embedded shader headers. You should have Vulkan SDK installed
19-
first.
27+
## 📦 Getting Started
2028

21-
### Windows / Linux / Mac
29+
### Prerequisites
30+
* C++14 compatible compiler.
31+
* CMake 3.15+.
32+
* Vulkan SDK (if building with Vulkan support or regenerating shaders).
2233

23-
* Initialize submodules.
24-
* Build and run the CMake project `demo/native/CMakeList.txt`.
34+
### Building the Library
35+
```bash
36+
git clone --recursive https://github.com/your-repo/pathfinder-cpp.git
37+
cd pathfinder-cpp
38+
mkdir build && cd build
39+
cmake ..
40+
make
41+
```
2542

26-
### Android
43+
## 🎮 Demos
44+
45+
### Windows / Linux / macOS
46+
The native demo uses a common application framework.
47+
1. Initialize submodules: `git submodule update --init --recursive`.
48+
2. Open the project in your favorite IDE (CLion, VS) and run the `demo` target.
2749

28-
* Copy `assets` into `demo/android/app/src/main`.
29-
* Open `demo/android` in Android Studio.
30-
* Build and run.
50+
### Android
51+
1. Copy `assets` into `demo/android/app/src/main`.
52+
2. Open `demo/android` in Android Studio.
53+
3. Deploy to a device supporting GLES 3.0+.
3154

32-
### Web
55+
### Web (Emscripten)
56+
1. Set up the Emscripten environment.
57+
2. Run `./build_wasm.sh`.
58+
3. Run `./demo/web/serve.sh` and visit `http://127.0.0.1:8000`.
3359

34-
* Set up emscripten environment.
35-
* Run `build_wasm.sh` to build the demo.
36-
* Run `demo/web/serve.sh` to serve a local website.
37-
* Open http://127.0.0.1:8000/.
60+
## 📜 Acknowledgments
61+
This project is a port of the [Pathfinder](https://github.com/servo/pathfinder) engine developed by the Servo project.

0 commit comments

Comments
 (0)