GithubHelp home page GithubHelp logo

walklook / adreno-gpu-vulkan-code-sample-framework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snapdragonstudios/adreno-gpu-vulkan-code-sample-framework

0.0 0.0 0.0 13.5 MB

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 res

License: Other

C++ 96.96% C 0.96% CMake 1.97% Batchfile 0.11%

adreno-gpu-vulkan-code-sample-framework's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.