procedural-3d-engine/android
2016-03-21 23:33:33 +01:00
..
base Frame rate independent animation updates 2016-03-11 20:09:12 +01:00
computeparticles Frame rate independent animation updates 2016-03-11 20:09:12 +01:00
images Android makefiles, manifest and icon (#97) 2016-03-20 16:27:32 +01:00
mesh Frame rate independent animation updates 2016-03-11 20:09:12 +01:00
screenshots Android examples and screenshots 2016-02-14 18:50:04 +01:00
texture Removed deprecated separate triangle and texture demos, replaced with android build files (wip) (#97) 2016-03-21 23:33:33 +01:00
triangle Removed deprecated separate triangle and texture demos, replaced with android build files (wip) (#97) 2016-03-21 23:33:33 +01:00
_build.bat Removed deprecated separate triangle and texture demos, replaced with android build files (wip) (#97) 2016-03-21 23:33:33 +01:00
_setup.bat Removed deprecated separate triangle and texture demos, replaced with android build files (wip) (#97) 2016-03-21 23:33:33 +01:00
build-texture.bat Removed deprecated separate triangle and texture demos, replaced with android build files (wip) (#97) 2016-03-21 23:33:33 +01:00
build-triangle.bat Removed deprecated separate triangle and texture demos, replaced with android build files (wip) (#97) 2016-03-21 23:33:33 +01:00
README.md Added Vulkan examples sources! 2016-02-16 15:07:25 +01:00
vulkanAndroid.sln Added Vulkan examples sources! 2016-02-16 15:07:25 +01:00

Vulkan examples and demos - Android

Building

The examples have been built using Visual Studio 2015 and require the Android NDK for building.

Vulkan on Android

Since Vulkan is not yet part of the Android OS (like OpenGL ES) the library and function pointers need to be dynamically loaded before using any of the Vulkan functions. See the vulkanandroid.h and vulkanandroid.cpp files in the base folder of the repositoy root for how this is done.

To run these examples you need a device with an Android image that suports Vulkan and has the libvulkan.so preinstalled!

Examples

Triangle

Demonstrates a basic Vulkan setup for Android for rendering a triangle. A real life application would encapulate most of the Vulkan object creation stuff (which is done in subsequent examples), so this is more of an example to study how Vulkan works. Also sets up a swap chain for presenting the rendered images to the windowing system.



Texture mapping

Loads a mipmapped texture from the asset manager and it on a simple quad. Shows how to upload a texture including mip maps to the gpu in an optimal (tiling) format. Also demonstrates how to display the texture using a combined image sampler with anisotropic filtering enabled.

Mesh loading and rendering

Uses syoyos' tinyobj loader to load and render a mesh from the asset manager. The mesh data is then converted to a fixed vertex layout matching the pipeline (and shader) layout descriptions.

Compute shader Particle system

Attraction based particle system. A shader storage buffer is used to store particle data and updated by a compute shader. The buffer is then used by the graphics pipeline for rendering.