mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Fixed error when calling Shader::LoadFromFile multiple times on the same instance
This commit is contained in:
parent
91d56172b0
commit
2856090573
@ -96,6 +96,7 @@ bool Shader::LoadFromFile(const std::string& filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Read the shader code from the file
|
// Read the shader code from the file
|
||||||
|
myFragmentShader.clear();
|
||||||
std::string line;
|
std::string line;
|
||||||
while (std::getline(file, line))
|
while (std::getline(file, line))
|
||||||
myFragmentShader += line + "\n";
|
myFragmentShader += line + "\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user