@Gooey My wrong.. :D I've pasted it wrong..
It should be:
std::string vertSourceString = FileUtils::read_file(m_VertPath);
const char* vertSource = vertSourceString.c_str();
glShaderSource(vertex, 1, &vertSource, NULL);
But I've posted this:
std::string vertSourceString = FileUtils::read_file(m_VertPath);
std::string fragSourceString = FileUtils::read_file(m_FragPath);
const char* vertSource = FileUtils::read_file(m_VertPath).c_str();
const char* fragSource = FileUtils::read_file(m_FragPath).c_str();
glShaderSource(vertex, 1, vertSourceString.c_str(), NULL);
So other thing, when I put cout to print the fragSource of FragSourceString
std::cout << "Fragment source file: " << fragSource << std::endl;
this prints the content of the shader..