- Canvis que vaig fer fa 2 messos, però no sé en què estava pensant, he de arreglar-ho.

This commit is contained in:
2023-02-13 11:50:37 +01:00
parent d230259e42
commit 908ffa6d55
5 changed files with 62 additions and 22 deletions

View File

@@ -12,7 +12,6 @@ class Texture
private:
// Objetos y punteros
uint8_t *pixels; // Los pixels de esta textura
SDL_Texture *texture; // La textura SDL sobre la que pintaremos (debe haber sido creada con SDL_TEXTUREACCESS_STREAMING)
SDL_Renderer *renderer; // Renderizador donde dibujar la textura
// Variables
@@ -23,7 +22,7 @@ private:
public:
// Constructor
Texture(SDL_Renderer *renderer, SDL_Texture *texture, std::string path = "", bool verbose = false);
Texture(SDL_Renderer *renderer, std::string path = "", bool verbose = false);
// Destructor
~Texture();
@@ -32,7 +31,7 @@ public:
bool loadFromFile(std::string path, bool verbose = false);
// Crea una textura en blanco
bool createBlank(int width, int height, SDL_TextureAccess = SDL_TEXTUREACCESS_STREAMING);
bool createBlank(SDL_Renderer *renderer, int width, int height, SDL_TextureAccess = SDL_TEXTUREACCESS_STREAMING);
// Libera la memoria de la textura
void unload();