mystery/src/graphics/shader.cpp
// Reads a shader file and returns it in string format
Reads a shader file and returns it in string format
Reads a shader file and returns it in string format
std::string Shader::ParseShaderFile(const std::string& filepath) {
			std::ifstream file_stream(filepath);
			std::string line;
			std::stringstream string_stream;
			while (getline(file_stream, line)) {
				string_stream << line << '\n';
			}
			return string_stream.str();
		}
std :: string Shader :: ParseShaderFile ( const std :: string & filepath ) { std :: ifstream file_stream ( filepath ) ; std :: string line ; std :: stringstream string_stream ; while ( getline ( file_stream , line ) ) { string_stream << line << ' \n ' ; } return string_stream . str ( ) ; }
Reads a shader file and returns it in string format
Reads a shader file and returns it in string format