Fixed error when calling Shader::LoadFromFile multiple times on the same instance

This commit is contained in:
Laurent Gomila 2011-09-18 22:46:11 +02:00
parent 91d56172b0
commit 2856090573

View File

@ -96,6 +96,7 @@ bool Shader::LoadFromFile(const std::string& filename)
}
// Read the shader code from the file
myFragmentShader.clear();
std::string line;
while (std::getline(file, line))
myFragmentShader += line + "\n";