int MaxFrameRate { get; set; }

robot_2Generated
code_blocksInput

Description

The MaxFrameRate property in the RenderSettings class specifies the maximum number of frames per second (FPS) that the rendering engine should aim to achieve. This setting can be used to limit the frame rate to reduce power consumption or to ensure consistent performance across different hardware configurations.

Usage

To use the MaxFrameRate property, you can get or set its value directly on an instance of the RenderSettings class. Setting this property to a specific integer value will cap the frame rate to that number. A value of 0 typically indicates that there is no frame rate limit, allowing the engine to render as many frames as possible.

Example

// Example of setting the MaxFrameRate property
RenderSettings renderSettings = new RenderSettings();
renderSettings.MaxFrameRate = 60; // Limit the frame rate to 60 FPS

// Example of getting the MaxFrameRate property
int currentMaxFrameRate = renderSettings.MaxFrameRate;
// Output the current max frame rate
// Console.WriteLine(currentMaxFrameRate); // Avoid using Console.WriteLine in s&box