Skip to content

Instantly share code, notes, and snippets.

View g40's full-sized avatar

Jerry Evans g40

  • London and the South West of England
View GitHub Profile
@g40
g40 / fontcaching.cpp
Created April 23, 2022 11:01 — forked from brht0/fontcaching.cpp
Simple Text rendering system for OpenGL with GLFW using SDL_ttf and font caching with demo
/* Declarations */
#include <GLFW/glfw3.h>
#include <SDL2/SDL_ttf.h>
#include <string>
class Font{
public:
Font(const char* filename, int resolution);
void RenderText(std::string text, double x, double y, double textHeight, SDL_Color color);