Arreglar degradado de fondo restaurando campo alpha en SDL_Vertex
- Identificado que SDL_RenderGeometry requiere campo alpha en SDL_Vertex - Restaurada implementación original con alpha=1.0f en todos los vértices - Eliminado código debug temporal y workaround con SDL_RenderFillRect - El degradado de fondo ahora funciona correctamente como en la versión original 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+7
-1
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <SDL3/SDL_events.h> // for SDL_Event
|
||||
#include <SDL3/SDL_stdinc.h> // for Uint64
|
||||
#include <SDL3/SDL_render.h> // for SDL_Vertex
|
||||
|
||||
#include <array> // for array
|
||||
#include <memory> // for unique_ptr, shared_ptr
|
||||
@@ -12,6 +13,7 @@
|
||||
#include "ball.h" // for Ball
|
||||
#include "window_manager.h" // for WindowManager
|
||||
#include "backends/renderer_interface.h" // for CRTParams, SpriteData
|
||||
#include "external/texture.h" // for Texture
|
||||
|
||||
class Engine {
|
||||
public:
|
||||
@@ -23,7 +25,7 @@ public:
|
||||
private:
|
||||
// Sistema de renderizado
|
||||
std::unique_ptr<vibe4::WindowManager> window_manager_;
|
||||
void* texture_data_ = nullptr; // Datos de textura para sprites
|
||||
std::shared_ptr<Texture> texture_ = nullptr; // Textura para sprites
|
||||
|
||||
// Estado del simulador
|
||||
std::vector<std::unique_ptr<Ball>> balls_;
|
||||
@@ -82,6 +84,10 @@ private:
|
||||
// Batch rendering
|
||||
std::vector<vibe4::SpriteData> sprite_batch_;
|
||||
|
||||
// Batch rendering directo (como el original)
|
||||
std::vector<SDL_Vertex> batch_vertices_;
|
||||
std::vector<int> batch_indices_;
|
||||
|
||||
// Métodos principales del loop
|
||||
void calculateDeltaTime();
|
||||
void update();
|
||||
|
||||
Reference in New Issue
Block a user