GitXplorerGitXplorer
a

getting-started-with-vulkan-on-android-codelab

public
17 stars
9 forks
1 issues

Commits

List of commits on branch codelab/end.
Verified
46ca24a428201a748efd54c5acb00bc238667c5b

fix: typo in hellovk.h comment (#4)

TTheFakeMontyOnTheRun committed 22 days ago
Unverified
9b1893aec7a2045b8d172140cefcea0e6acb1a2c

fix: broken link on README.md

TTheFakeMontyOnTheRun committed 23 days ago
Unverified
cf5e1b0f983928191ece33a432d43cd2a3245147

[codelab] step: apply texture

HHakimHauston committed 10 months ago
Unverified
2f80677b46aaaabfb874e4316f7fe39d8ab11117

[codelab] step: rotate triangle

HHakimHauston committed 10 months ago
Unverified
c5cceb3cdab46901304f3f6b95eb2c55d543abf2

[codelab] step: update uniform buffer, record command buffer, and draw

HHakimHauston committed 10 months ago
Unverified
671b5c300caf6bae84e798a94db4b2ab88984457

[codelab] step: create command pool and command buffer

HHakimHauston committed 10 months ago

README

The README file for this repository.

Hello VK

Hello VK is an Android C++ sample that draws the simple, but traditional Hello World Triangle.

Aside from the base functionality the source code also covers convenient features such as:

Pre-requisites

  • Android Studio 4.2+ with NDK bundle.

Getting Started

  1. Download Android Studio
  2. Launch Android Studio.
  3. Open the sample directory.
  4. Open File/Project Structure...
  • Click Download or Select NDK location.
  1. Click File/Sync Project with Gradle Files.
  2. Click Run/Run 'app'.

Validation layers

As the validation layer is a sizeable download, we chose to not ship them within the apk. As such in order to enable validation layer, please follow the simple steps below:

  1. Download the latest android binaries from: https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases
  2. Place them in their respective ABI folders located in: app/src/main/jniLibs
  3. Go to hellovk.h, search for 'bool enableValidationLayers = false' and toggle that to true.

Extra information:

As Vulkan is well documented we will not provide detailed instructions regarding the innerworkings of Vulkan. You should however, find useful comments and references regarding the android to vulkan bridge. We chose to use Android Glue for a seamless experience. More details here: https://developer.android.com/reference/games/game-activity/group/android-native-app-glue

These vulkan tutorials should hopefully cover everything needed to understand the workings of the Vulkan app: https://vulkan-tutorial.com https://vkguide.dev/docs/chapter-1/vulkan_init_flow/

Lastly, you will notice that the Kotlin file is somewhat redundant. Luckily, if you do not require any additional/custom application behaviour, the Android(Kotlin) source files can be completely removed and the AndroidManifest.xml tweaked as specified here: https://developer.android.com/ndk/samples/sample_na

Support

If you've found an error in these samples, please file an issue.

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.