diff options
Diffstat (limited to 'src/client/render/render.hh')
| -rw-r--r-- | src/client/render/render.hh | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/client/render/render.hh b/src/client/render/render.hh new file mode 100644 index 0000000..ca98e6f --- /dev/null +++ b/src/client/render/render.hh @@ -0,0 +1,62 @@ +#ifndef CLIENT_RENDER_RENDER_HH_ +#define CLIENT_RENDER_RENDER_HH_ + +#include <algorithm> +#include <array> +#include <chrono> +#include <cmath> +#include <fstream> +#include <iostream> +#include <optional> +#include <ranges> +#include <unordered_map> + +#include <epoxy/gl.h> // this has to go before SDL2 +#include <epoxy/glx.h> + +#include <SDL2/SDL.h> +#include <SDL2/SDL_opengl.h> + +#include <glm/glm.hpp> +#include <glm/gtc/matrix_access.hpp> +#include <glm/gtc/matrix_transform.hpp> +#include <glm/gtc/type_ptr.hpp> + +#include <ft2build.h> +#include FT_FREETYPE_H + +#include "client/render/camera.hh" +#include "client/render/program.hh" +#include "shared/shared.hh" +#include "shared/world.hh" + +namespace client { +namespace render { + +void init(); +void quit() noexcept; + +// Getters +int get_fps() noexcept; +SDL_Window* const& get_sdl_window() noexcept; +const glm::ivec2& get_window_size() noexcept; + +// Update +void update_uniforms() noexcept; +void swap_window() noexcept; + +// Render +void render_rectangle(const glm::vec2& pos, const glm::vec2& size, + const glm::vec4& colour) noexcept; +void render_text(const std::string_view text, const unsigned int size, + const bool is_centered, const bool is_vcentered, + const glm::vec4& colour, const glm::mat4& matrix) noexcept; +void render_cube_outline(const glm::vec3& pos, + const glm::vec4& colour) noexcept; + + + +} // namespace render +} // namespace client + +#endif |
