Manages a texture resource, including loading, unloading, and providing access to texture data. Supports both SDL and OpenGL renderers.
bool Load(IRenderer& pRenderer, const std::string& pFilename);
Loads a texture from file using the specified renderer.
void Unload();
Unloads the texture and frees associated resources
void SetActive() const;
Set active texture.
⚠️ OpenGL only.
void UpdateInfo(int& pWidth, int& pHeight);
Updates the width and height information of the texture
void OverrideTextureSize(int pWidth, int pHeight);
Overrides the texture size with custom width and height (in pixels)
Vector3D GetTextureSize();
Returns the texture size in pixel.
SDL_Texture* GetSdlTexture() const;
Returns the SDL texture.
inline unsigned int& GetId();
Returns the texture OpenGl ID.