Implement Headless SwapChain mode.
This is useful for unit tests. The content of the swapchain can be read to main memory with Renderer::readPixels(). This PR doesn't implement this new feature in the following backends and platforms (TODO): VulkanDriver.cpp MetalDriver.mm PlatformWGL.cpp PlatformWebGL.cpp PlatformCocoaTouchGL.mm
This commit is contained in:
committed by
Mathias Agopian
parent
dd45703d73
commit
bf72adbb57
@@ -59,6 +59,13 @@ Java_com_google_android_filament_Engine_nCreateSwapChain(JNIEnv* env,
|
||||
return (jlong) engine->createSwapChain(win, (uint64_t) flags);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jlong JNICALL
|
||||
Java_com_google_android_filament_Engine_nCreateSwapChainHeadless(JNIEnv* env,
|
||||
jclass klass, jlong nativeEngine, jint width, jint height, jlong flags) {
|
||||
Engine* engine = (Engine*) nativeEngine;
|
||||
return (jlong) engine->createSwapChain(width, height, (uint64_t) flags);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jlong JNICALL
|
||||
Java_com_google_android_filament_Engine_nCreateSwapChainFromRawPointer(JNIEnv*,
|
||||
jclass, jlong nativeEngine, jlong pointer, jlong flags) {
|
||||
|
||||
Reference in New Issue
Block a user