46 lines
1.5 KiB
C#
Executable File
46 lines
1.5 KiB
C#
Executable File
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);
|
|
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;
|
|
}
|
|
} |