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.
space-war/include/tinyengine/renderer.hpp

28 lines
815 B
C++
Raw Normal View History

2022-01-30 21:24:16 +08:00
#pragma once
#include "pch.hpp"
2022-01-30 21:24:16 +08:00
#include "libmath.hpp"
#include "texture.hpp"
#include "glhelpfunc.hpp"
#include "shader.hpp"
#include "camera.hpp"
2022-01-30 21:24:16 +08:00
class Renderer final {
public:
static void Init();
static void Shutdown();
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);
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);
static const Color& GetDrawColor();
static void SetCamera(Camera& camera);
static void Update();
private:
static Color color_;
2022-01-30 21:24:16 +08:00
};