Implement query to check if texture format is mipmappable (#8442)

* Implement query to check if texture format is mipmappable

This will allow Filament's users to perform check beforehand.

* add java bindings

* add javascript binding
This commit is contained in:
Konstantin Sakhin
2025-02-13 17:30:09 -06:00
committed by GitHub
parent 0dd5dc6d75
commit 2b54e7dd97
7 changed files with 37 additions and 0 deletions

View File

@@ -53,6 +53,14 @@ Java_com_google_android_filament_Texture_nIsTextureFormatSupported(JNIEnv*, jcla
(Texture::InternalFormat) internalFormat);
}
extern "C" JNIEXPORT jboolean JNICALL
Java_com_google_android_filament_Texture_nIsTextureFormatMipmappable(JNIEnv*, jclass,
jlong nativeEngine, jint internalFormat) {
Engine *engine = (Engine *) nativeEngine;
return (jboolean) Texture::isTextureFormatMipmappable(*engine,
(Texture::InternalFormat) internalFormat);
}
extern "C" JNIEXPORT jboolean JNICALL
Java_com_google_android_filament_Texture_nIsTextureSwizzleSupported(JNIEnv*, jclass,
jlong nativeEngine) {