Skip to content

Commit

Permalink
Merge pull request #258 from Bigfoot71/master
Browse files Browse the repository at this point in the history
Added overloads for const std::string& and const char* arguments
  • Loading branch information
RobLoach authored Oct 9, 2023
2 parents 0929959 + bbe66b2 commit a3c520a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/Shader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class Shader : public ::Shader {
return ::LoadShader(vsFileName.c_str(), fsFileName.c_str());
}

static ::Shader Load(const char* vsFileName, const char* fsFileName) {
return ::LoadShader(vsFileName, fsFileName);
}

/**
* Load a shader from memory.
*
Expand All @@ -54,6 +58,10 @@ class Shader : public ::Shader {
return ::LoadShaderFromMemory(vsCode.c_str(), fsCode.c_str());
}

static ::Shader LoadFromMemory(const char* vsCode, const char* fsCode) {
return ::LoadShaderFromMemory(vsCode, fsCode);
}

GETTERSETTER(unsigned int, Id, id)
GETTERSETTER(int*, Locs, locs)

Expand Down

0 comments on commit a3c520a

Please sign in to comment.