Files
ndk-samples/hello-vulkan
Dan Albert aa52693f43 Remove obsolete, duplicate, and useless docs.
License text, setup instructions, and support info do not need to be
duplicated into every README, since they're already in the top-level
README. They were originally in each sample because the samples used to
each be separate Android Studio projects with different requirements
that could be checkout out independently in Android Studio. This is no
longer the case.

Most of the docs also included text along the lines of "This sample uses
the new Android Studio with CMake support", which hasn't been new since
2015, so doesn't really need to be said.

The prerequisites were mostly not true. Android Studio is not required
for any of this. Cloning the repo and running `./gradlew build` is
sufficient to build all the samples. They also were not being kept
up-to-date at all, since they mostly said "Android Studio 2.2 or newer",
which was definitely not true. I'm not what the oldest version of
Android Studio that will work here is, but I don't actually test
anything but the latest so claiming anything otherwise is just
misleading.

I haven't pruned or edited any of the real content of the docs. I'm sure
there are plenty of edits to be made there and a lot of expansion to do,
but those changes will be less mechanical and will happen separately.
2025-09-25 20:41:14 +00:00
..

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:

Screenshots

Vulkan Triangle example

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