65 glm::vec4 color, std::string s) {
76 unsigned int h =
heightText(scale, w + 100, s);
82 glm::vec4 color,
unsigned int maxWidth, std::string s) {
101 glm::vec4 color,
unsigned int width, std::string s) {
107 std::vector<glm::vec2> vertices, uvs;
109 vertices.emplace_back(x, y);
110 vertices.emplace_back(x + w, y);
111 vertices.emplace_back(x + w, y + h);
112 vertices.emplace_back(x, y + h);
113 vertices.emplace_back(x, y);
115 uvs.emplace_back(0.0f, 0.0f);
116 uvs.emplace_back(1.0f, 0.0f);
117 uvs.emplace_back(1.0f, 1.0f);
118 uvs.emplace_back(0.0f, 1.0f);
119 uvs.emplace_back(0.0f, 0.0f);
Default Font Implementation.
void bufferData(int elem, int size, void *data)
static void drawTextWrapped(unsigned int x, unsigned int y, float scale, glm::vec4 color, unsigned int maxWidth, std::string s)
static unsigned int widthText(float scale, std::string s)
static void drawTextWrapped(unsigned int x, unsigned int y, float scale, glm::vec4 color, unsigned int maxWidth, std::string s)
String handling utilities.
static void drawText(unsigned int x, unsigned int y, float scale, glm::vec4 color, std::string s)
static int initialize(std::string f)
static int initialize(std::string font)
OpenGL Shader Implementation.
static void drawTextCentered(unsigned int x, unsigned int y, float scale, glm::vec4 color, unsigned int width, std::string s)
static unsigned int widthText(float scale, std::string s)
static unsigned int heightText(float scale, unsigned int maxWidth, std::string s)
static unsigned int heightText(float scale, unsigned int maxWidth, std::string s)
static unsigned int widthText(float scale, std::string s)
static void drawText(unsigned int x, unsigned int y, float scale, glm::vec4 color, std::string s)
static LogLevel & get(int level)
TrueType Font Implementation.
static int initialize(std::string font="")
bool stringEndsWith(std::string s, std::string suffix, bool casesensitive=false)
static void drawTextWrapped(unsigned int x, unsigned int y, float scale, glm::vec4 color, unsigned int maxWidth, std::string s)
static unsigned int widthText(float scale, std::string s)
static unsigned int heightText(float scale, unsigned int maxWidth, std::string s)
static void drawGL(ShaderBuffer &vertices, ShaderBuffer &uvs, glm::vec4 color, unsigned int texture, TextureStorage store=TextureStorage::SYSTEM, unsigned int mode=GL_TRIANGLES, ShaderTexture *target=nullptr, Shader &shader=textShader)
static std::string fontName
static void drawTextWrapped(unsigned int x, unsigned int y, float scale, glm::vec4 color, unsigned int maxWidth, std::string s)
static void drawText(unsigned int x, unsigned int y, float scale, glm::vec4 color, std::string s)
static void drawFontBox(unsigned int x, unsigned int y, unsigned int w, unsigned int h)
static void drawText(unsigned int x, unsigned int y, float scale, glm::vec4 color, std::string s)
static unsigned int heightText(float scale, unsigned int maxWidth, std::string s)
Tomb Raider Level Editor Font loader.