Skip to content

Commit

Permalink
Added id on Texture asset to easily access the internal ID of the tex…
Browse files Browse the repository at this point in the history
…ture.
  • Loading branch information
bXi committed Jul 23, 2024
1 parent 428539a commit 3e5a506
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions assettypes/texture.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
* @brief Represents a texture asset for rendering images using SDL.
*/
struct TextureAsset {
int32_t id;
int width = -1; /**< Width of the texture. */
int height = -1; /**< Height of the texture. */
std::string filename; /**< Filename of the texture image file. */



SDL_Surface *surface = nullptr; /**< Pointer to the SDL surface representing the texture. */
SDL_Texture *texture = nullptr; /**< Pointer to the SDL texture. */
};
Expand Down

0 comments on commit 3e5a506

Please sign in to comment.