integrat Asset amb ResourceHelper
This commit is contained in:
@@ -224,8 +224,10 @@ void Screen::renderInfo() {
|
||||
void Screen::loadShaders() {
|
||||
if (shader_source_.empty()) {
|
||||
const std::string GLSL_FILE = param.game.game_area.rect.h == 256 ? "crtpi_256.glsl" : "crtpi_240.glsl";
|
||||
std::ifstream f(Asset::get()->get(GLSL_FILE).c_str());
|
||||
shader_source_ = std::string((std::istreambuf_iterator<char>(f)), std::istreambuf_iterator<char>());
|
||||
auto data = Asset::get()->loadData(GLSL_FILE);
|
||||
if (!data.empty()) {
|
||||
shader_source_ = std::string(data.begin(), data.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user