Init.
This commit is contained in:
52
Source/Rendering/Renderer.cs
Executable file
52
Source/Rendering/Renderer.cs
Executable file
@@ -0,0 +1,52 @@
|
||||
using System.Drawing;
|
||||
using System.Numerics;
|
||||
|
||||
namespace DaggerFramework.Rendering
|
||||
{
|
||||
public abstract class Renderer
|
||||
{
|
||||
// INIT
|
||||
public abstract void Initialize(RendererSettings settings);
|
||||
// WINDOW
|
||||
public abstract Vector2 WindowSize { get; }
|
||||
public abstract void CreateWindow(string title, Vector2 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();
|
||||
|
||||
// DRAWING
|
||||
public abstract void BeginFrame();
|
||||
public abstract void EndFrame();
|
||||
public abstract void ClearBackground(Color color);
|
||||
public abstract double GetFrameTime();
|
||||
public abstract int LoadTexture(Texture2d texture);
|
||||
/// <summary>
|
||||
/// Temporary workaround for Raylib's LoadImageFromMemory.
|
||||
/// </summary>
|
||||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public abstract int LoadTexture(string path);
|
||||
public abstract void SetTransform(Vector2 position, float rotation = 0.0f);
|
||||
public abstract void SetTransform(Matrix4x4 transform);
|
||||
public abstract void DrawCircle(float radius, Color color);
|
||||
public abstract void DrawRectangle(Vector2 size, Color color);
|
||||
public abstract void DrawDebugText(Vector2 position, string text, int fontSize, Color color);
|
||||
public abstract void DrawTexture(int id, Color tint);
|
||||
}
|
||||
|
||||
public enum Msaa
|
||||
{
|
||||
None,
|
||||
Msaa2x,
|
||||
Msaa4x,
|
||||
Msaa8x
|
||||
}
|
||||
public struct RendererSettings
|
||||
{
|
||||
public Msaa Msaa;
|
||||
public bool UseVSync;
|
||||
public bool Fullscreen;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user