Skip to content

helcl42/PreVEngine

Repository files navigation

PreVEngine

Codacy Badge

PreVEngine is a Vulkan-based rendering engine with OpenXR support, designed for cross-platform development. It provides a modular architecture for rendering, input handling, and XR integration.

Platform Status
Windows Windows - CI Build/Test
Linux (Wayland) Linux (Wayland) - CI Build/Test
Linux (XCB) Linux (XCB) - CI Build/Test
Android Android - CI Build/Test
MacOS MacOS - CI Build/Test
iOS iOS - CI Build/Test
OpenXR Platform Status
Windows Windows OpenXR - CI Build/Test
Linux (Wayland) Linux (Wayland) OpenXR - CI Build/Test
Linux (XCB) Linux (XCB) OpenXR - CI Build/Test
Android Android OpenXR - CI Build/Test

Here is a video:

PreVEngine In Action

Clone

git clone --recurse-submodules https://github.com/helcl42/PreVEngine` # to clone with submodules.

Download Dependencies

  • Install Vulkan SDK for you platform: link.
  • Download platform prebuilt binaries (assimp) by executing the follwing command.
python Scripts/download_dependencies.py

Note: If you have a problem with the script, the package is hosted on Google Drive. You can download it directly from the link. Just unpack it in the root folder of the repositor.

Build Linux & Windows & MacOS

mkdir build && cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
ninja

Build Android

  • Make sure you have JDK-17 and NDK-25+ installed.
mkdir build && cd build
cmake -DANDROID=ON -DANDROID_ABI=arm64-v8a ..
cd ../Examples/PreVEngineExample/platform/android
chmod a+x gradlew && ./gradlew clean build

Alternatively import to android studio from location Examples/PreVEngineExample/platform/android and deploy as usuall

Build iOS

  • Generate Xcode project
mkdir build && cd build
cmake -G Xcode -DCMAKE_BUILD_TYPE=Debug -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_DEPLOYMENT_TARGET=13.0 -DCMAKE_OSX_ARCHITECTURES="arm64" -DENABLE_VK_LOADER=OFF ..
  • Open in Xcode.
  • Add reference to MoltenVK framework.
  • Add all assets to app bundle resources.

OpenXR

  • To enable OpenXR enable cmake option
option(ENABLE_XR "Enable XR" ON)

Compile Shaders

The project provides a script for batch shader compilation

# without OpenXR
python Scripts/compile_shaders.py --input_folder Examples/PreVEngineExample/assets/Shaders/ --output_folder build/Examples/PreVEngineExample/assets/Shaders/ --compile_serial --compiler_args '-DMAX_VIEW_COUNT=1 ' --force_compile_all

# with OpenXR enabled 
python Scripts/compile_shaders.py --input_folder Examples/PreVEngineExample/assets/Shaders/ --output_folder build/Examples/PreVEngineExample/assets/Shaders/ --compile_serial --compiler_args '-DMAX_VIEW_COUNT=2 ' --compiler_args '-DENABLE_XR=1 ' --force_compile_all

3rd Party Dependencies

  • Assimp: Used for model loading.
  • GLM: Great Math library.
  • VMA: Vulkan Memory Allocator.
  • stb_image: Used for image loading.
  • volk: Multiplatform loader for Vulkan.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A multiplatform Vulkan based rendering engine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors