IkeikeP / vulkan-hpp-triangle-android

A vulkan-hpp implementation of the popular triangle.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vulkan-hpp Triangle for Android

A minimalist implementation of the "hello triangle" in C++ using Vulkan-hpp. Supports Windows & Android.
For whoever is learning vulkan by following the vulkan-tutorial and wants to quickly check the Vulkan-hpp equivalent code, this is for you. And with no surprises, most of the vulkan logic was based on that tutorial.

Highlights:

  • C++ first (e.g. avoided Java where possible)
  • Terminal friendly with no need to resort to IDEs like Visual Studio
  • Modern and clean CMake
  • Some inline comments explaining vulkan code
  • Android support with clutter free gradle files

Build

Windows

mkdir build
cd build
cmake .. -G Ninja # add "-DCMAKE_BUILD_TYPE=Release" for release mode
ninja

Note: For MSVC, these commands need to be run within a Developer Command Prompt.

Android

Open Android Studio, Sync Project and then press make.

On the terminal:

cd android
gradlew assembleDebug

Dependencies

  • SDL 2 (for Window management)

Requirements

  • CMake 3.16.0
  • Vulkan SDK
  • C++ Compiler (e.g. MSVC or clang)
  • Ninja or other build system such as Visual Studio
  • Android Studio / Android SDK and NDK

About

A vulkan-hpp implementation of the popular triangle.

License:MIT License


Languages

Language:C 72.5%Language:C++ 16.4%Language:Objective-C 3.5%Language:Java 2.3%Language:Shell 2.1%Language:M4 1.5%Language:CMake 0.9%Language:Assembly 0.2%Language:Makefile 0.2%Language:Perl 0.1%Language:JavaScript 0.1%Language:PowerShell 0.1%Language:HTML 0.0%Language:Metal 0.0%Language:Roff 0.0%Language:Python 0.0%Language:Batchfile 0.0%Language:GLSL 0.0%