unificats els shaders glsl en un sol fitxer
corregida la inicialització de opengl i shaders
This commit is contained in:
@@ -56,7 +56,6 @@ Screen::Screen()
|
||||
#endif
|
||||
|
||||
// Inicializa los shaders
|
||||
SDL_RenderTexture(renderer_, game_canvas_, nullptr, nullptr);
|
||||
loadShaders();
|
||||
shader::init(window_, game_canvas_, shader_source_);
|
||||
}
|
||||
@@ -227,7 +226,7 @@ void Screen::renderInfo() {
|
||||
// Carga el contenido del archivo GLSL
|
||||
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";
|
||||
const std::string GLSL_FILE = "crtpi.glsl";
|
||||
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