A high-performance Android CPU rendering template based on Blend2D and Nuklear UI. Designed for developers who need a lightweight, efficient, and modular starting point for native Android graphics applications.
| Android Version | Support Status | Notes |
|---|---|---|
| Android 5.0 - 5.1 | ✅ Fully Supported | API Level 21-22 |
| Android 6.0 | ✅ Fully Supported | API Level 23 |
| Android 7.0 - 7.1 | ✅ Fully Supported | API Level 24-25 |
| Android 8.0 - 8.1 | ✅ Fully Supported | API Level 26-27 |
| Android 9.0 | ✅ Fully Supported | API Level 28 |
| Android 10.0 | ✅ Fully Supported | API Level 29 |
| Android 11.0 | ✅ Fully Supported | API Level 30 |
| Android 12.0 - 12.1 | ✅ Fully Supported | API Level 31-32 |
| Android 13.0 | ✅ Fully Supported | API Level 33 |
| Android 14.0 | ✅ Fully Supported | API Level 34 |
| Android 15.0 | ✅ Fully Supported | API Level 35 |
| Android 16.0 | ✅ Fully Supported | API Level 36 |
- Android Device: Android 5.0 (Lollipop) or higher.
- Permissions: Requires System-level or Root privileges for Surface access.
git clone https://github.com/Tomatosauce9/Android-CPU-Render-Template.git
cd Android-CPU-Render-TemplateBefore building, ensure your NDK environment variable is set (or modify the path in the command below):
#Set NDK path (Windows PowerShell example; use 'export' for Linux)
$env:NDK_ROOT = "C:/Your/Path/To/android-ndk-r27c"
#Create and enter build directory
mkdir build && cd build
#Configure CMake project
cmake .. -G "Ninja" \
-DCMAKE_TOOLCHAIN_FILE="$env:NDK_ROOT/build/cmake/android.toolchain.cmake" \
-DANDROID_ABI=arm64-v8a \
-DANDROID_NATIVE_API_LEVEL=21 \
-DCMAKE_BUILD_TYPE=Release
#Execute build
cmake --build .After a successful build, push the binary to your device and set the necessary permissions:
# Push the binary to the device
adb push outputs/arm64-v8a/CPURenderTemplate /data/local/tmp/
# Grant execute permission
adb shell "chmod +x /data/local/tmp/CPURenderTemplate"
# Execute the binary (requires root)
adb shell su -c "/data/local/tmp/CPURenderTemplate"Android-CPU-Render-Template/
├── src/ # Core Source Code
│ ├── AndroidRender/ # Rendering: Handles ANativeWindow & Pixel buffer submission
│ ├── Config/ # Config System: Binary Save/Load & Global state management
│ └── Menu/ # UI Logic: Immediate-mode menu layouts via Nuklear
├── third_party/ # External Dependencies
│ ├── blend2d/ # High-performance 2D Vector Graphics Engine
│ ├── native_surface/ # Native Window Creator/Bridge
│ ├── nuklear/ # Lightweight IMGUI Framework
│ └── touch/ # Android Touch Event Parsing Module
├── outputs/ # Build Outputs (Binaries)
├── CMakeLists.txt # CMake Configuration
├── README.md # Project Documentation (English)
└── README-cn.md # Project Documentation (Chinese)
Issues and Pull Requests are always welcome!
- Fork the Project.
- Create your Feature Branch (git checkout -b feature/AmazingFeature).
- Commit your changes (git commit -m 'Add some AmazingFeature').
- Push to the Branch (git push origin feature/AmazingFeature).
- Open a Pull Request.
This project is licensed under the MIT License.
- AFan4724/AndroidSurfaceImgui-Enhanced - Thanks for providing core source code inspiration.
- Blend2D - For the high-performance 2D vector rendering core.
- Nuklear - For the lightweight immediate-mode UI solution.
- All Contributors & Testers - Thank you for your support and feedback!