This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Untested code, but should work with some tweaks (more or less) | |
struct Point{ | |
double x, y; | |
}; | |
struct Line{ | |
Point p1, p2; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to keep my sanity heres a simplified version of a texture demo for my future self | |
// original from: github.com/progschj/OpenGL-Examples/blob/master/03texture.cpp | |
#define GL_GLEXT_PROTOTYPES | |
#include <GLFW/glfw3.h> | |
#include <iostream> | |
#include <string> | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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); |