Prisma Engine targets Android using Vulkan 1.1+ as its rendering API and GameActivity as the native app entry point. The Android project lives underDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Excurs1ons/PrismaEngine/llms.txt
Use this file to discover all available pages before exploring further.
projects/android/PrismaAndroid/ and can be built either through Android Studio or via Gradle on the command line. Gradle automatically compiles GLSL shaders to SPIR-V during the build, so you never need to run glslc manually — drop .vert and .frag files into the assets directory and the plugin handles the rest.
Requirements
- Android NDK r25 or later — set
ANDROID_NDK_HOMEin your environment - Android Studio — for IDE-based builds and device deployment (optional for command-line builds)
- Vulkan 1.3 support on the target device — most devices released after 2020 qualify
- CMake 3.20 or later — bundled with Android Studio, or install separately
Project directory structure
The Android Studio project is self-contained underprojects/android/PrismaAndroid/.
projects/android/PrismaAndroid/app/src/main/cpp/. The native entry point (android_main) is implemented in src/runtime/android/AndroidRuntime.cpp.
Building with Gradle
Gradle is the recommended way to produce an APK. It invokes CMake internally for the native layer and handles asset bundling, shader compilation, and packaging in a single step. To open the project in Android Studio, choose File → Open and select theprojects/android/PrismaAndroid directory. Android Studio detects the Gradle project automatically.
Building with CMake presets
You can build the native engine and runtime layers directly with CMake presets. All Android presets targetarm64-v8a.
ANDROID_NDK_HOME before configuring if Gradle is not managing the NDK for you:
Automatic shader compilation
The Android Gradle plugin compiles GLSL shaders to SPIR-V automatically during the build. You do not need to runglslc or any shader compiler manually.
- Source location:
app/src/main/assets/shaders/**/*.vert,**/*.frag - Output location:
build/intermediates/shader_assets/**/*.spv - APK inclusion: the compiled
.spvfiles are bundled into the APK automatically
app/src/main/assets/shaders/ and the plugin picks them up on the next Gradle build. Shared GLSL sources (used on both Linux and Android) live in resources/common/shaders/glsl/.
Loading assets at runtime
On Android, all file I/O goes through the AndroidAssetManager — standard filesystem paths are not available for APK assets. The engine provides helpers in src/runtime/android/ShaderVulkan.* and src/runtime/android/TextureAsset.* that wrap AssetManager calls.
projects/android/PrismaAndroid/app/src/main/assets/. Textures, fonts, and other non-shader assets are placed there directly; shaders are compiled from assets/shaders/ at build time and their .spv outputs are included automatically.
Audio
AAudio (Android’s native low-latency audio API) is planned but not yet implemented. The current audio backend on Android is SDL3, enabled via
PRISMA_ENABLE_AUDIO_SDL3. The PRISMA_ENABLE_AUDIO_AAUDIO option will be introduced in a future release.Conditional compilation
Use the standard platform guards when writing Android-specific code:PRISMA_ENABLE_* options are defined in cmake/DeviceOptions.cmake.