18 void clear(glm::vec4 color)
override;
30 bool load_font(
const std::string&,
const std::string&,
int)
override;
33 std::shared_ptr<Texture>
load_texture(
const std::string& path)
override;
35 std::shared_ptr<Texture>
get_texture(
const std::string& path)
override;
42 int z_index,
bool flip_h,
bool flip_v,
const UberShader& uber_shader)
override;
44 void draw_rect(
Rect2 rect,
float rotation,
const glm::vec4& color,
bool filled,
int z_index)
override;
46 void draw_text(
const std::string& text,
float x,
float y,
float rotation,
float scale,
const glm::vec4& color,
47 const std::string& font_alias,
int z_index,
const UberShader& uber_shader,
int ft_size)
override;
49 void draw_line(
float x1,
float y1,
float x2,
float y2,
float width,
float rotation,
const glm::vec4& color,
int z_index)
override;
51 void draw_triangle(
float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float rotation,
const glm::vec4& color,
bool filled,
52 int z_index)
override;
54 void draw_circle(
float cx,
float cy,
float rotation,
float radius,
const glm::vec4& color,
bool filled,
int segments,
55 int z_index)
override;
57 void draw_polygon(
const std::vector<glm::vec2>& points,
float rotation,
const glm::vec4& color,
bool filled,
int z_index)
override;
59 void flush()
override;
68 void* device_ =
nullptr;
69 void* queue_ =
nullptr;
70 void* pipeline_ =
nullptr;
71 void* metal_layer_ =
nullptr;
72 void* sampler_ =
nullptr;
74 SDL_MetalView metal_view_ =
nullptr;
75 glm::vec4 clear_color_{0, 0, 0, 1};
88 void clear(glm::vec4)
override {
101 bool load_font(
const std::string&,
const std::string&,
int)
override {
107 std::shared_ptr<Texture>
get_texture(
const std::string&)
override {
115 int z_index,
bool flip_h,
bool flip_v,
const UberShader& uber_shader)
override {
120 void draw_text(
const std::string&,
float,
float,
float,
float,
const glm::vec4&,
const std::string&,
int,
const UberShader&,
123 void draw_line(
float,
float,
float,
float,
float,
float,
const glm::vec4&,
int)
override {
125 void draw_triangle(
float,
float,
float,
float,
float,
float,
float,
const glm::vec4&,
bool,
int)
override {
127 void draw_circle(
float,
float,
float,
float,
const glm::vec4&,
bool,
int,
int)
override {
129 void draw_polygon(
const std::vector<glm::vec2>&,
float,
const glm::vec4&,
bool,
int)
override {
Base class for all renderers.
Definition: ember_core.h:109
Font struct.
Definition: engine_structs.h:137
Float rectangle struct.
Definition: engine_structs.h:33
Texture base class.
Definition: engine_structs.h:14
UberShader shader effects for rendering texts and sprites.
Definition: shader.h:8