setFrameRate

@PlatformGap(platforms = [FilamentPlatform.IOS, FilamentPlatform.JVM, FilamentPlatform.WEB], behavior = "no effect — only Android surfaces can switch the display frame rate.")
fun setFrameRate(frameRate: Float)

Sets the intended frame rate for this SwapChain.

Uses FrameRateCompatibility.DEFAULT and ChangeFrameRateStrategy.ONLY_IF_SEAMLESS.

Parameters

frameRate

The intended frame rate in frames per second. 0.0f clears/resets the rate.


@PlatformGap(platforms = [FilamentPlatform.IOS, FilamentPlatform.JVM, FilamentPlatform.WEB], behavior = "no effect — only Android surfaces can switch the display frame rate.")
fun setFrameRate(frameRate: Float, compatibility: SwapChain.FrameRateCompatibility, strategy: SwapChain.ChangeFrameRateStrategy)

Sets the intended frame rate for this SwapChain.

Parameters

frameRate

The intended frame rate in frames per second. 0.0f clears/resets the rate.

compatibility

Frame rate compatibility mode.

strategy

Change strategy for non-seamless transitions.