treballant en sdl3gpu
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
#include "core/rendering/shader_backend.hpp"
|
||||
|
||||
class Screen {
|
||||
public:
|
||||
@@ -19,9 +22,20 @@ class Screen {
|
||||
void decZoom();
|
||||
void setZoom(int zoom);
|
||||
|
||||
// Shaders i vídeo
|
||||
void toggleShaders();
|
||||
void toggleSupersampling();
|
||||
void toggleAspectRatio();
|
||||
void toggleIntegerScale();
|
||||
void nextShaderPreset(); // Futur: ciclar presets
|
||||
void setActiveShader(Rendering::ShaderType type);
|
||||
void applyCurrentPostFXPreset();
|
||||
void applyCurrentCrtPiPreset();
|
||||
|
||||
// Getters
|
||||
[[nodiscard]] auto isFullscreen() const -> bool { return fullscreen_; }
|
||||
[[nodiscard]] auto getZoom() const -> int { return zoom_; }
|
||||
[[nodiscard]] auto isHardwareAccelerated() const -> bool;
|
||||
[[nodiscard]] auto getWindow() -> SDL_Window* { return window_; }
|
||||
[[nodiscard]] auto getRenderer() -> SDL_Renderer* { return renderer_; }
|
||||
|
||||
@@ -31,12 +45,16 @@ class Screen {
|
||||
|
||||
void adjustWindowSize();
|
||||
void calculateMaxZoom();
|
||||
void initShaders();
|
||||
|
||||
static Screen* instance_;
|
||||
|
||||
SDL_Window* window_{nullptr};
|
||||
SDL_Renderer* renderer_{nullptr};
|
||||
SDL_Texture* texture_{nullptr}; // 320x200 streaming, ARGB8888
|
||||
SDL_Texture* texture_{nullptr}; // 320x200 streaming, ABGR8888 (fallback SDL_Renderer)
|
||||
|
||||
// Backend GPU (nullptr si no disponible o desactivat)
|
||||
std::unique_ptr<Rendering::ShaderBackend> shader_backend_;
|
||||
|
||||
int zoom_{3};
|
||||
int max_zoom_{6};
|
||||
|
||||
Reference in New Issue
Block a user