API CHANGE: remove some Camera, Engine, and View deprecated APIs (#3965)
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
|
||||
#include <filament/Camera.h>
|
||||
|
||||
#include <utils/Entity.h>
|
||||
|
||||
#include <math/mat4.h>
|
||||
|
||||
using namespace filament;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include <filament/Camera.h>
|
||||
#include <filament/Engine.h>
|
||||
|
||||
#include <utils/Entity.h>
|
||||
@@ -120,15 +121,8 @@ Java_com_google_android_filament_Engine_nDestroyRenderer(JNIEnv*, jclass,
|
||||
|
||||
// Camera
|
||||
|
||||
extern "C" [[deprecated]] JNIEXPORT jlong JNICALL
|
||||
Java_com_google_android_filament_Engine_nCreateCamera(JNIEnv*, jclass,
|
||||
jlong nativeEngine) {
|
||||
Engine* engine = (Engine*) nativeEngine;
|
||||
return (jlong) engine->createCamera();
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jlong JNICALL
|
||||
Java_com_google_android_filament_Engine_nCreateCameraWithEntity(JNIEnv*, jclass,
|
||||
Java_com_google_android_filament_Engine_nCreateCamera(JNIEnv*, jclass,
|
||||
jlong nativeEngine, jint entity_) {
|
||||
Engine* engine = (Engine*) nativeEngine;
|
||||
Entity& entity = *reinterpret_cast<Entity*>(&entity_);
|
||||
@@ -143,12 +137,12 @@ Java_com_google_android_filament_Engine_nGetCameraComponent(JNIEnv*, jclass,
|
||||
return (jlong) engine->getCameraComponent(entity);
|
||||
}
|
||||
|
||||
extern "C" [[deprecated]] JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_Engine_nDestroyCamera(JNIEnv*, jclass,
|
||||
jlong nativeEngine, jlong nativeCamera) {
|
||||
extern "C" JNIEXPORT void JNICALL
|
||||
Java_com_google_android_filament_Engine_nDestroyCameraComponent(JNIEnv*, jclass,
|
||||
jlong nativeEngine, jint entity_) {
|
||||
Engine* engine = (Engine*) nativeEngine;
|
||||
Camera *camera = (Camera *) nativeCamera;
|
||||
engine->destroy(camera);
|
||||
Entity& entity = *reinterpret_cast<Entity*>(&entity_);
|
||||
engine->destroyCameraComponent(entity);
|
||||
}
|
||||
|
||||
// Scene
|
||||
|
||||
@@ -321,7 +321,7 @@ Java_com_google_android_filament_View_nSetDepthOfFieldOptions(JNIEnv *, jclass ,
|
||||
// View::DepthOfFieldOptions::Filter::MEDIAN value is actually 2
|
||||
eFilter = View::DepthOfFieldOptions::Filter::MEDIAN;
|
||||
}
|
||||
view->setDepthOfFieldOptions({.focusDistance = focusDistance, .cocScale = cocScale,
|
||||
view->setDepthOfFieldOptions({.cocScale = cocScale,
|
||||
.maxApertureDiameter = maxApertureDiameter, .enabled = (bool)enabled, .filter = eFilter,
|
||||
.nativeResolution = (bool)nativeResolution,
|
||||
.foregroundRingCount = (uint8_t)foregroundRingCount,
|
||||
|
||||
Reference in New Issue
Block a user