This repository has been archived on 2022-10-27. You can view files and clone it, but cannot push or open issues or pull requests.
2022-01-30 21:24:16 +08:00
|
|
|
#pragma once
|
2022-02-03 22:33:33 +08:00
|
|
|
#include "pch.hpp"
|
2022-01-30 21:24:16 +08:00
|
|
|
#include "libmath.hpp"
|
|
|
|
#include "texture.hpp"
|
|
|
|
#include "glhelpfunc.hpp"
|
2022-02-03 22:33:33 +08:00
|
|
|
#include "shader.hpp"
|
|
|
|
#include "camera.hpp"
|
2022-01-30 21:24:16 +08:00
|
|
|
|
|
|
|
class Renderer final {
|
|
|
|
public:
|
|
|
|
static void Init();
|
|
|
|
static void Shutdown();
|
2022-02-03 22:33:33 +08:00
|
|
|
static void SetClearColor(const Color&);
|
|
|
|
static void SetDrawColor(const Color&);
|
2022-01-30 21:24:16 +08:00
|
|
|
static void Clear();
|
|
|
|
static void DrawLine(const Point& p1, const Point& p2);
|
|
|
|
static void DrawRect(const Rect& rect);
|
|
|
|
static void FillRect(const Rect& rect);
|
2022-02-03 22:33:33 +08:00
|
|
|
static void DrawTexture(const Texture& texture, const Mat44& transform, const Color& color = Color{1, 1, 1, 1});
|
2022-01-30 21:24:16 +08:00
|
|
|
static void SetViewport(int x, int y, int w, int h);
|
2022-02-03 22:33:33 +08:00
|
|
|
static const Color& GetDrawColor();
|
|
|
|
static void SetCamera(Camera& camera);
|
|
|
|
static void Update();
|
|
|
|
|
|
|
|
private:
|
|
|
|
static Color color_;
|
2022-01-30 21:24:16 +08:00
|
|
|
};
|