Use properties in Renderer.
This commit is contained in:
@@ -25,23 +25,37 @@ namespace DaggerFramework.Rendering
|
||||
/// Indicates if the renderer will render the next frame.
|
||||
/// </summary>
|
||||
public abstract bool ShouldRun { get; }
|
||||
/// <summary>
|
||||
/// Target frames per second for rendering.
|
||||
/// </summary>
|
||||
public abstract int TargetFps { get; set; }
|
||||
public abstract bool VSync { get; set; }
|
||||
|
||||
// WINDOW
|
||||
/// <summary>
|
||||
/// The size of the render window.
|
||||
/// </summary>
|
||||
public abstract Vector2 WindowSize { get; }
|
||||
|
||||
public abstract string WindowTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Active monitor's size.
|
||||
/// </summary>
|
||||
public abstract Vector2 MonitorSize { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a window.
|
||||
/// </summary>
|
||||
/// <param name="windowSettings">Window settings to use to create the window.</param>
|
||||
public abstract void CreateWindow(WindowSettings windowSettings);
|
||||
|
||||
// TODO: use properties for these.
|
||||
public abstract void SetWindowTitle(string title);
|
||||
public abstract void SetWindowVSync(bool value);
|
||||
public abstract void SetTargetFps(int fps);
|
||||
public abstract bool WindowShouldClose();
|
||||
protected abstract void SetWindowTitle(string title);
|
||||
protected abstract void SetWindowVSync(bool value);
|
||||
protected abstract void SetTargetFps(int fps);
|
||||
protected abstract int GetMonitorWidth(int monitorId);
|
||||
protected abstract int GetMonitorHeight(int monitorId);
|
||||
protected abstract int GetCurrentMonitor();
|
||||
protected abstract bool WindowShouldClose();
|
||||
public abstract void Shutdown();
|
||||
|
||||
// DRAWING
|
||||
@@ -135,10 +149,14 @@ namespace DaggerFramework.Rendering
|
||||
public Msaa Msaa;
|
||||
public bool UseVSync;
|
||||
public bool Fullscreen;
|
||||
public int TargetFps = 60;
|
||||
|
||||
public RendererSettings() { }
|
||||
|
||||
public static RendererSettings Default => new RendererSettings()
|
||||
{
|
||||
UseVSync = true,
|
||||
TargetFps = 60
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user