Continue adding opengl font support.

This commit is contained in:
James Grogan 2022-11-15 15:50:36 +00:00
parent 649079a5c7
commit eef93efc29
37 changed files with 530 additions and 157 deletions

View file

@ -7,7 +7,7 @@
class Color
{
public:
Color(unsigned r, unsigned g, unsigned b, double a = 1.0);
Color(unsigned r = 0, unsigned g = 0, unsigned b = 0, double a = 1.0);
static std::shared_ptr<Color> CreateShared(unsigned r, unsigned g, unsigned b, double a = 1.0);
static std::unique_ptr<Color> Create(unsigned r, unsigned g, unsigned b, double a = 1.0);

View file

@ -113,6 +113,22 @@ std::vector<std::string> File::readLines()
return content;
}
std::string File::read()
{
if (!PathExists())
{
return {};
}
Open(false);
std::stringstream buffer;
buffer << mInHandle->rdbuf();
Close();
return buffer.str();
}
std::string File::getBaseFilename(const Path& path)
{
return path.stem().string();

View file

@ -36,6 +36,8 @@ public:
std::vector<std::string> readLines();
std::string read();
static std::string getBaseFilename(const Path& path);
bool PathExists() const;