mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
remove temporary files after compilation
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
#include <cstdio>
|
||||||
|
|
||||||
|
|
||||||
namespace love {
|
namespace love {
|
||||||
namespace graphics {
|
namespace graphics {
|
||||||
@@ -55,7 +57,12 @@ namespace love {
|
|||||||
std::string command = std::string("glslc -fauto-bind-uniforms ") + inputFileName + " -o " + outputFileName;
|
std::string command = std::string("glslc -fauto-bind-uniforms ") + inputFileName + " -o " + outputFileName;
|
||||||
system(command.c_str());
|
system(command.c_str());
|
||||||
|
|
||||||
return readFile(outputFileName);
|
auto result = readFile(outputFileName);
|
||||||
|
|
||||||
|
std::remove(inputFileName.c_str());
|
||||||
|
std::remove(outputFileName.c_str());
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShaderStage::ShaderStage(love::graphics::Graphics* gfx, ShaderStageType stage, const std::string& glsl, bool gles, const std::string& cachekey)
|
ShaderStage::ShaderStage(love::graphics::Graphics* gfx, ShaderStageType stage, const std::string& glsl, bool gles, const std::string& cachekey)
|
||||||
|
|||||||
Reference in New Issue
Block a user