Skip to content

Commit

Permalink
Get shadertoy header and footer sources from table instead of file fo…
Browse files Browse the repository at this point in the history
…r release, adding a prototype to ShaderFunctions.h so it is accessible.
  • Loading branch information
jimbo00000 committed Sep 18, 2014
1 parent 53a710a commit f7cce7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Scene/ShaderToy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ void ShaderToy::CompileShader()

const GLuint vertSrc = loadShaderFile(vs.c_str(), GL_VERTEX_SHADER);
const std::string shaderToyDir = "../shaders/";
const std::string src1 = GetShaderSourceFromFile("rwwtt_header.glsl");
const std::string src1 = GetShaderSourceFromTable("rwwtt_header.glsl");
const std::string src2 = GetShaderSourceFromFile(m_sourceFile.c_str(), shaderToyDir);
const std::string src3 = GetShaderSourceFromFile("rwwtt_footer.glsl");
const std::string src3 = GetShaderSourceFromTable("rwwtt_footer.glsl");

GLuint fragSrc = 0;
GLuint shaderId = glCreateShader(GL_FRAGMENT_SHADER);
Expand Down
1 change: 1 addition & 0 deletions src/Util/GL/ShaderFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ void printProgramInfoLog(GLuint obj);
const std::string GetShaderSourceFromFile(
const char* filename,
const std::string path=std::string("../hardcoded_shaders/"));
const GLchar* GetShaderSourceFromTable(const char* filename);
const std::string GetShaderSource(const char* filename);
GLuint loadShaderFile(const char* filename, const unsigned long Type);

Expand Down

0 comments on commit f7cce7e

Please sign in to comment.