Implement a query to check if combination of texture format, pixel data format and type is valid. (#8452)

This will help Filament users to perform this check beforehand.
This commit is contained in:
Konstantin Sakhin
2025-02-18 16:05:03 -08:00
committed by GitHub
parent 1b59e24e99
commit 62b8a60527
5 changed files with 34 additions and 0 deletions
@@ -68,6 +68,16 @@ Java_com_google_android_filament_Texture_nIsTextureSwizzleSupported(JNIEnv*, jcl
return (jboolean) Texture::isTextureSwizzleSupported(*engine);
}
extern "C" JNIEXPORT jboolean JNICALL
Java_com_google_android_filament_Texture_nValidatePixelFormatAndType(JNIEnv*, jclass,
jint internalFormat, jint pixelDataFormat, jint pixelDataType) {
return (jboolean) Texture::validatePixelFormatAndType(
(Texture::InternalFormat) internalFormat,
(Texture::Format) pixelDataFormat,
(Texture::Type) pixelDataType
);
}
// Texture::Builder...
extern "C" JNIEXPORT jlong JNICALL