MoonWorks/src/FrameLimiterSettings.cs

37 lines
970 B
C#
Raw Normal View History

namespace MoonWorks
{
public enum FrameLimiterMode
{
2023-09-19 20:19:41 +00:00
/// <summary>
/// The game will render at the maximum possible framerate that the computing resources allow. <br/>
/// Note that this may lead to overheating, resource starvation, etc.
/// </summary>
Uncapped,
2023-09-19 20:19:41 +00:00
/// <summary>
/// The game will render no more than the specified frames per second.
/// </summary>
Capped
}
2023-09-19 20:47:19 +00:00
/// <summary>
2023-09-19 20:48:50 +00:00
/// The Game's frame limiter setting. Specifies uncapped framerate or a maximum rendering frames per second value. <br/>
/// Note that this is separate from the Game's Update timestep and can be a different value.
2023-09-19 20:47:19 +00:00
/// </summary>
public struct FrameLimiterSettings
{
public FrameLimiterMode Mode;
2023-09-19 20:19:41 +00:00
/// <summary>
/// If Mode is set to Capped, this is the maximum frames per second that will be rendered.
2023-09-19 20:19:41 +00:00
/// </summary>
public int Cap;
public FrameLimiterSettings(
FrameLimiterMode mode,
int cap
) {
Mode = mode;
Cap = cap;
}
}
}