Skip to content

This repository contains a Vulkan Framework designed to enable developers to get up and running quickly for creating sample content and rapid prototyping. It is designed to be easy to build and have the basic building blocks needed for creating an Android APK with Vulkan functionality, input system, as well as other helper utilities for loading …

License

Notifications You must be signed in to change notification settings

SnapdragonStudios/adreno-gpu-vulkan-code-sample-framework

Repository files navigation

Vulkan Code Sample Framework

The Adreno™ GPU Vulkan Code Sample Framework is a lightweight collection of C++ classes and sample projects to demonstrate Vulkan rendering features on the Qualcomm Snapdragon Adreno™ GPU.

Both Android and Microsoft Windows build targets are supported (some samples may require/target Qualcomm Adreno™ specific Vulkan extensions).

Prerequisites

Windows

Android

Getting the vkSampleFramework project

The framework uses submodules for both external code dependencies and to get the shared assets for the sample projects (vkSampleFrameworkAssets).

git clone --recursive https://github.com/quic/adreno-gpu-vulkan-code-sample-framework

Will clone the vkSampleFramework and its submodules.

Subsequent pulls can be done with

git pull --recurse-submodules

Build Setup

Windows

Ensure CMake is in the Windows PATH

Android

Create project/android/local.properties with the location of our cmake install eg:

cmake.dir=C\:\\Tools\\cmake\\3.10.2.4988404

If necessary, also include on local.properties the ndk and sdk locations eg:

ndk.dir=C\:\\Users\\yourname\\AppData\\Local\\Android\\Sdk\\ndk\\21.0.6113669
sdk.dir=C\:\\Users\\yourname\\AppData\\Local\\Android\\Sdk

Create project/android/gradle.properties with the location of our jdk and build heap space parameter, eg:

org.gradle.java.home=C\:\\Program Files\\Java\\jdk-11
org.gradle.jvmargs=-Xms512M -Xmx4G

Note: Setting up the jdk location does not affect the Java version used to launch the Gradle client VM, so make sure your JAVA_HOME is set to a valid java version (this is specially true if you receive errors in the format: Unsupported class file major version XX)

Building

In the root folder there is a batch file for building and packaging on each platform

01_BuildAndroid.bat

02_BuildWindows.bat

Android uses Gradle and CMake to build an Android .apk for each sample.

Windows uses CMake to build a Visual Studio solution that is then built using Visual Studio (and can then be opened in the Visual Studio IDE). An .exe is output for each sample.

The Windows Visual Studio file is written to project\windows\solution\vkSampleFramework.sln. Once created for the first time it can be opened and used in Visual Studio 2019 (VS2019 has full support for editing CMakeLists.txt). When using VS2019 to compile and run, be sure to point the debugger to the correct 'Working Directory' for each sample.

Note: Depending on your sample you might need to perform certain steps before running these batch files, see the readme on the desired sample for more information about this.

Running

See the Samples folder for instructions on building assets and running individual samples.

Directory Structure

  • /framework Contains the sample framework code.
  • /framework/external Contains external projects used by the framework (mostly as git submodules)
  • /project Platform specific top level build files and build tools.
  • /samples Samples that use the framework.

License

Adreno™ GPU Vulkan Code Sample Framework is licensed under the BSD 3-clause “New” or “Revised” License. Check out the LICENSE for more details.

About

This repository contains a Vulkan Framework designed to enable developers to get up and running quickly for creating sample content and rapid prototyping. It is designed to be easy to build and have the basic building blocks needed for creating an Android APK with Vulkan functionality, input system, as well as other helper utilities for loading …

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages