-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrenderer.h
More file actions
36 lines (30 loc) · 721 Bytes
/
renderer.h
File metadata and controls
36 lines (30 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once
#include "debug.h"
#include "chunk_draw.h"
#include "mesh.h"
#include "shader.h"
#include "texture.h"
#include "vao.h"
#include "vbo.h"
#include "ebo.h"
#include "world.h"
void clear_screen();
class Renderer {
Shader world_shader;
Texture world_texture;
VAO world_vao;
VBO world_vbo;
EBO world_ebo;
Shader font_shader;
Texture font_texture;
VAO font_vao;
VBO font_vbo;
public:
explicit Renderer(glm::vec2 window_size);
void render_world(const Mesh &mesh, const std::vector<ChunkDraw> &draws,
const glm::mat4 &view, bool wireframe,
bool update_vertices) const;
void render_ui(const Debug &debug) const;
private:
glm::mat4 world_proj;
};