This commit is contained in:
2025-10-24 18:22:15 +02:00
parent 5d1c6c6d99
commit 7959baeed9
3 changed files with 5 additions and 4 deletions

View File

@@ -2,6 +2,7 @@
#include <SDL3/SDL.h> #include <SDL3/SDL.h>
#include <array>
#include <cstring> #include <cstring>
#include <stdexcept> #include <stdexcept>
#include <vector> #include <vector>
@@ -463,7 +464,7 @@ void OpenGLShader::render() {
// Restaurar estados OpenGL // Restaurar estados OpenGL
glUseProgram(old_program); glUseProgram(old_program);
glBindTexture(GL_TEXTURE_2D, old_texture); glBindTexture(GL_TEXTURE_2D, old_texture);
if (was_texture_enabled == 0u) { if (was_texture_enabled == 0U) {
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
} }
glBindVertexArray(old_vao); glBindVertexArray(old_vao);

View File

@@ -30,7 +30,7 @@ class OpenGLShader : public ShaderBackend {
void render() override; void render() override;
void setTextureSize(float width, float height) override; void setTextureSize(float width, float height) override;
void cleanup() override final; void cleanup() final;
[[nodiscard]] auto isHardwareAccelerated() const -> bool override { return is_initialized_; } [[nodiscard]] auto isHardwareAccelerated() const -> bool override { return is_initialized_; }
private: private:

View File

@@ -340,8 +340,8 @@ class Game {
static void updatePlayerDrawList(const Players& elements, Players& draw_list); // Actualiza draw_list tras cambios en los z_order static void updatePlayerDrawList(const Players& elements, Players& draw_list); // Actualiza draw_list tras cambios en los z_order
static void renderPlayerDrawList(const Players& draw_list); // Dibuja en el orden definido static void renderPlayerDrawList(const Players& draw_list); // Dibuja en el orden definido
static auto findPlayerIndex(const Players& elems, const std::shared_ptr<Player>& who) -> size_t; static auto findPlayerIndex(const Players& elems, const std::shared_ptr<Player>& who) -> size_t;
void sendPlayerToBack(Players& elements, const std::shared_ptr<Player>& who, Players& draw_list); // Envia al jugador al fondo de la pantalla static void sendPlayerToBack(Players& elements, const std::shared_ptr<Player>& who, Players& draw_list); // Envia al jugador al fondo de la pantalla
void bringPlayerToFront(Players& elements, const std::shared_ptr<Player>& who, Players& draw_list); // Envia al jugador al frente de la pantalla static void bringPlayerToFront(Players& elements, const std::shared_ptr<Player>& who, Players& draw_list); // Envia al jugador al frente de la pantalla
// --- Varios --- // --- Varios ---
void onPauseStateChanged(bool is_paused); void onPauseStateChanged(bool is_paused);