src/inc/shader.hpp
std::string load_file(std::string path)
{
	std::ifstream file(path);

	if (!file.is_open())
	{
		std::cout << "Could not open file \"" << path << "\"." << std::endl;

		exit(6);
	}

	std::stringstream buffer;

	buffer << file.rdbuf() << "\0";

	return buffer.str();
}
// Load a file as a string. The string must have two or more null-terminator
// characters as a suffix, otherwise OpenGL will not parse the contents
// correctly.
Load a file as a string. The string must have two or more null-terminator
characters as a suffix, otherwise OpenGL will not parse the contents
correctly.
Load a file as a string . The string must have two or more null - terminator characters as a suffix otherwise OpenGL will not parse the contents correctly .
std::string load_file(std::string path)
{
	std::ifstream file(path);
	if (!file.is_open())
	{
		std::cout << "Could not open file \"" << path << "\"." << std::endl;
		exit(6);
	}
	std::stringstream buffer;
	buffer << file.rdbuf() << "\0";
	return buffer.str();
}
std :: string load_file ( std :: string path ) { std :: ifstream file ( path ) ; if ( ! file . is_open ( ) ) { std :: cout << " \" " << path << " \" " << std :: endl ; exit ( 6 ) ; } std :: stringstream buffer ; buffer << file . rdbuf ( ) << " \0 " ; return buffer . str ( ) ; }
Load a file as a string.
Load a file as a string .