VERSIÓ 1.5.15:

- [FIX] Els shaders funcionen correctament al canviar zoom o fullscreen
This commit is contained in:
Raimon @ quifisraimon committed 2026-10-08 08:59:25 +02:00
1 parent 7aebcfe055
commit 8ae82936dc
2 files changed
+7 -7

No files matched your search

+6 -6
View File
@@ -29,7 +29,7 @@ namespace backend
SDL_Point win_size = {640, 480}; SDL_Point win_size = {640, 480};
SDL_FPoint tex_size = {320, 240}; SDL_FPoint tex_size = {320, 240};
bool can_use_opengl = false; bool can_use_opengl = false;
bool using_opengl = false; bool enabled = false;
const char *vShaderSource = nullptr; const char *vShaderSource = nullptr;
const char *fShaderSource = nullptr; const char *fShaderSource = nullptr;
@@ -155,7 +155,7 @@ namespace backend
{ {
programId = 0; programId = 0;
can_use_opengl = false; can_use_opengl = false;
using_opengl = false; //using_opengl = false;
} }
void reinit() void reinit()
@@ -210,12 +210,12 @@ namespace backend
fShaderSource = fshader; fShaderSource = fshader;
programId = 0; programId = 0;
can_use_opengl = false; can_use_opengl = false;
using_opengl = false; //using_opengl = false;
reinit(); reinit();
} }
void enable() { if (can_use_opengl) using_opengl = true; } void enable() { enabled = true; }
void disable() { using_opengl = false; } void disable() { enabled = false; }
void render() void render()
{ {
@@ -225,7 +225,7 @@ namespace backend
SDL_RenderClear(backend::video::renderer); SDL_RenderClear(backend::video::renderer);
SDL_FlushRenderer(backend::video::renderer); SDL_FlushRenderer(backend::video::renderer);
if (using_opengl) if (can_use_opengl && enabled)
{ {
GLint oldProgramId; GLint oldProgramId;
if (programId != 0) if (programId != 0)
+1 -1
View File
@@ -1,3 +1,3 @@
#pragma once #pragma once
#define MINI_VERSION "1.5.14" #define MINI_VERSION "1.5.15"