ENH: Embed shader source in binary.

This commit is contained in:
David Allemang
2023-01-27 09:35:29 -05:00
parent fff18e481f
commit b228f76658
8 changed files with 120 additions and 22 deletions

View File

@@ -19,7 +19,9 @@ namespace cgl{
glProgramParameteri(id, GL_PROGRAM_SEPARABLE, GL_TRUE);
}
ShaderProgram(const std::string &src) : ShaderProgram() {
explicit ShaderProgram(const std::string_view &src) : ShaderProgram(std::string(src)) {}
explicit ShaderProgram(const std::string &src) : ShaderProgram() {
Shader<mode> sh(src);
attach(sh);