API renames, change ref renderer to in renderer in IDrawable, make Layer implement IDrawable.
This commit is contained in:
@@ -6,15 +6,24 @@ namespace DaggerFramework.Rendering
|
||||
public abstract class Renderer
|
||||
{
|
||||
// INIT
|
||||
public abstract void CreateAndInitialize(WindowSettings windowSettings, RendererSettings renderSettings);
|
||||
public abstract void Initialize(RendererSettings settings);
|
||||
|
||||
// UTIL
|
||||
public abstract bool ShouldRun { get; }
|
||||
|
||||
// WINDOW
|
||||
public abstract Vector2 WindowSize { get; }
|
||||
public abstract void CreateWindow(string title, Vector2 size);
|
||||
public void CreateWindow(WindowSettings windowSettings)
|
||||
{
|
||||
CreateWindow(windowSettings.Title, windowSettings.Size);
|
||||
}
|
||||
public abstract void SetWindowTitle(string title);
|
||||
public abstract void SetWindowVSync(bool value);
|
||||
public abstract void SetTargetFps(int fps);
|
||||
public abstract bool WindowShouldClose();
|
||||
public abstract void CloseWindow();
|
||||
public abstract void Shutdown();
|
||||
|
||||
// DRAWING
|
||||
public abstract void BeginFrame();
|
||||
@@ -43,5 +52,22 @@ namespace DaggerFramework.Rendering
|
||||
public Msaa Msaa;
|
||||
public bool UseVSync;
|
||||
public bool Fullscreen;
|
||||
|
||||
public static RendererSettings Default => new RendererSettings()
|
||||
{
|
||||
UseVSync = true,
|
||||
};
|
||||
}
|
||||
|
||||
public struct WindowSettings
|
||||
{
|
||||
public string Title;
|
||||
public Vector2 Size = new Vector2(640, 480);
|
||||
|
||||
public WindowSettings(string title, Vector2 size)
|
||||
{
|
||||
Title = title;
|
||||
Size = size;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user