| 126 | } |
| 127 | |
| 128 | void 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 | |
| 146 | bool Shader::isInitialized() |
| 147 | { |
no test coverage detected