MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / compileShaderFile

Method compileShaderFile

GUI/OpenGL/Shader.cpp:128–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128void Shader::compileShaderFile(GLenum whichShader, const std::string &filename)
129{
130 std::ifstream fp;
131 fp.open(filename.c_str(), std::ios_base::in);
132 if(fp)
133 {
134 std::ostringstream output;
135 output << fp.rdbuf();
136 fp.close();
137
138 compileShaderString(whichShader, output.str());
139 }
140 else
141 {
142 std::cerr << "Error occurred while loading shader: " << filename << std::endl;
143 }
144}
145
146bool Shader::isInitialized()
147{

Callers 6

initShadersMethod · 0.80
createShaderMethod · 0.80
createShaderMethod · 0.80
initShadersMethod · 0.80
createShaderMethod · 0.80
initShadersMethod · 0.80

Calls 4

openMethod · 0.45
c_strMethod · 0.45
closeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected