Back to Filament

setActiveFeatureLevel

docs/android/dokka/filament-android/com.google.android.filament/-engine/set-active-feature-level.md

1.75.01.9 KB
Original Source

//filament-android/com.google.android.filament/Engine/setActiveFeatureLevel

setActiveFeatureLevel

[main]
open fun setActiveFeatureLevel(featureLevel: Engine.FeatureLevel): Engine.FeatureLevel

Activate all features of a given feature level. If an explicit feature level is not specified at Engine initialization time via featureLevel, the default feature level is FEATURE_LEVEL_0 on devices not compatible with GLES 3.0; otherwise, the default is ::FEATURE_LEVEL_1. The selected feature level must not be higher than the value returned by getActiveFeatureLevel and it's not possible lower the active feature level. Additionally, it is not possible to modify the feature level at all if the Engine was initialized at FEATURE_LEVEL_0.

Return

the active feature level.

Parameters

main

featureLevelthe feature level to activate. If featureLevel is lower than getActiveFeatureLevel, the current (higher) feature level is kept. If featureLevel is higher than getSupportedFeatureLevel, or if the engine was initialized at feature level 0, an exception is thrown, or the program is terminated if exceptions are disabled.

See also

Engine.Builder
getSupportedFeatureLevel
getActiveFeatureLevel

Throws

RuntimeExceptionif the feature level cannot be set.