Allow Java / Kotlin to enable the experimental Vulkan backend.

We still do not compile the Vulkan backend for Android by default, this
simply makes it possible to use the samples on Vulkan with a one-line
change, which is useful for testing purposes.

This change also makes it so that the materials used for the samples
include SPIR-V. This makes them fatter but they are merely samples.

I still consider Vulkan on Android to be experimental, there are some
features that need to be implemented.
This commit is contained in:
Philip Rideout
2018-12-12 16:54:39 -08:00
parent fac084dfdf
commit 125f79e5e0
5 changed files with 21 additions and 9 deletions

View File

@@ -22,9 +22,9 @@ using namespace filament;
using namespace utils;
extern "C" JNIEXPORT jlong JNICALL
Java_com_google_android_filament_Engine_nCreateEngine(JNIEnv*, jclass,
Java_com_google_android_filament_Engine_nCreateEngine(JNIEnv*, jclass, jlong backend,
jlong sharedContext) {
return (jlong) Engine::create(Engine::Backend::OPENGL, nullptr, (void*) sharedContext);
return (jlong) Engine::create((Engine::Backend) backend, nullptr, (void*) sharedContext);
}
extern "C" JNIEXPORT void JNICALL