Continue adding opengl font support.
This commit is contained in:
parent
649079a5c7
commit
eef93efc29
37 changed files with 530 additions and 157 deletions
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -36,6 +36,8 @@ public:
|
|||
|
||||
std::vector<std::string> readLines();
|
||||
|
||||
std::string read();
|
||||
|
||||
static std::string getBaseFilename(const Path& path);
|
||||
|
||||
bool PathExists() const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue