sample clean-up and new sphere object (#134)

* Add missing method to query the type of a light

* IcoSphere now generates front facing triangles

* Add a fairly generic sphere object to use in samples

it provides an ico sphere with normal, and reuses
the same vertex/index buffer for each new instance.
Each instance can have its own material, size and
position.

currently it’s not possible to change the # of
subdivisions.

* FilamentApp now provides a “default” pbr material

this makes it easier to create renderables for
testing.

* clean-up lightbulb and add spheres for each light

lightbulb now has less hardcoded things and it
spawns a small sphere for each light.
This commit is contained in:
Mathias Agopian
2018-08-23 21:12:46 -07:00
committed by Romain Guy
parent 8f1d9bcd26
commit 7a14aadb28
14 changed files with 337 additions and 66 deletions

View File

@@ -155,6 +155,13 @@ Java_com_google_android_filament_LightManager_nBuilderBuild(JNIEnv *env, jclass
return jboolean(builder->build(*engine, (Entity &) entity) == LightManager::Builder::Success);
}
extern "C" JNIEXPORT jint JNICALL
Java_com_google_android_filament_LightManager_nGetType(JNIEnv* env,
jclass type, jlong nativeLightManager, jint i) {
LightManager *lm = (LightManager *) nativeLightManager;
return (jint)lm->getType((LightManager::Instance) i);
}
extern "C" JNIEXPORT void JNICALL
Java_com_google_android_filament_LightManager_nSetPosition(JNIEnv *env, jclass type,
jlong nativeLightManager, jint i, jfloat x, jfloat y, jfloat z) {