NEW API: add RGBM flag to Texture.

This change will allow the skybox use a compressed texture format.

For now, the old internal format "RGBM" is still honored, but in a
forthcoming change we will replace the enum with UNUSED.
This commit is contained in:
Philip Rideout
2018-10-05 14:31:42 -07:00
parent 06fc8e2f4c
commit c6cef9ff9c
15 changed files with 85 additions and 17 deletions

View File

@@ -100,6 +100,13 @@ Java_com_google_android_filament_Texture_nBuilderFormat(JNIEnv *env, jclass type
builder->format((Texture::InternalFormat) format);
}
extern "C" JNIEXPORT void JNICALL
Java_com_google_android_filament_Texture_nBuilderRgbm(JNIEnv *env, jclass type,
jlong nativeBuilder, jboolean enable) {
Texture::Builder *builder = (Texture::Builder *) nativeBuilder;
builder->rgbm(enable);
}
extern "C" JNIEXPORT jlong JNICALL
Java_com_google_android_filament_Texture_nBuilderBuild(JNIEnv *env, jclass type,
jlong nativeBuilder, jlong nativeEngine) {
@@ -150,6 +157,12 @@ Java_com_google_android_filament_Texture_nGetInternalFormat(JNIEnv *env, jclass
return (jint) texture->getFormat();
}
extern "C" JNIEXPORT jboolean JNICALL
Java_com_google_android_filament_Texture_nGetRgbm(JNIEnv *env, jclass type, jlong nativeTexture) {
Texture *texture = (Texture *) nativeTexture;
return texture->isRgbm();
}
extern "C" JNIEXPORT jint JNICALL
Java_com_google_android_filament_Texture_nSetImage(JNIEnv *env, jclass type_, jlong nativeTexture,
jlong nativeEngine, jint level, jint xoffset, jint yoffset, jint width, jint height,