Migrate TextureLoader to filament-utils.

This commit is contained in:
Philip Rideout
2020-01-17 09:36:51 -08:00
parent 067dad2d38
commit ca2da39614
3 changed files with 5 additions and 4 deletions

View File

@@ -36,4 +36,5 @@ android {
dependencies {
implementation deps.kotlin
implementation project(':filament-android')
implementation project(':filament-utils-android')
}

View File

@@ -25,6 +25,7 @@ import android.view.SurfaceView
import android.view.animation.LinearInterpolator
import com.google.android.filament.*
import com.google.android.filament.utils.*
import com.google.android.filament.android.UiHelper
import java.nio.ByteBuffer
@@ -34,11 +35,10 @@ import kotlin.math.cos
import kotlin.math.sin
class MainActivity : Activity() {
// Make sure to initialize Filament first
// This loads the JNI library needed by most API calls
// Make sure to initialize the correct Filament JNI layer.
companion object {
init {
Filament.init()
Utils.init()
}
}
@@ -218,7 +218,7 @@ class MainActivity : Activity() {
}
private fun loadImageBasedLight() {
ibl = loadIbl(assets, "envs/venetian_crossroads_2k", engine)
ibl = loadIbl(assets, "envs/flower_road_no_sun_2k", engine)
ibl.indirectLight.intensity = 40_000.0f
}