VOX
A little voxel engine
Loading...
Searching...
No Matches
TextRenderer.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <string>
5
6#include <ft2build.h>
7#include FT_FREETYPE_H
8
9#define THROW_CHECK(f, msg) if (f) { throw std::runtime_error(msg); }
10
12{
13
14public:
15
18
19 void initialize();
20 void destroy();
21
22 void renderText(const std::string & text, int x, int y, int font_size, void * target, int width, int height);
23
24private:
25
26 FT_Library m_ft;
27 FT_Face m_face;
28};
Definition: TextRenderer.hpp:12
void initialize()
Definition: TextRenderer.cpp:14
TextRenderer()
Definition: TextRenderer.cpp:6
~TextRenderer()
Definition: TextRenderer.cpp:10
void renderText(const std::string &text, int x, int y, int font_size, void *target, int width, int height)
Definition: TextRenderer.cpp:26
void destroy()
Definition: TextRenderer.cpp:20