#pragma once #include #include #include #include #include "WallpaperEngine/Data/Assets/Texture.h" #include "WallpaperEngine/Data/Model/Types.h" namespace WallpaperEngine::Assets { using namespace WallpaperEngine::Data::Assets; /** * Base interface that describes the minimum information required for a texture * to be displayed by the engine */ class ITexture { public: virtual ~ITexture () = default; /** * @param imageIndex For animated textures, the frame to get the ID of * @return The OpenGL texture to use when rendering */ [[nodiscard]] virtual GLuint getTextureID (uint32_t imageIndex) const = 0; /** * @param imageIndex For animated textures, the frame to get the ID of * @return The texture's width */ [[nodiscard]] virtual uint32_t getTextureWidth (uint32_t imageIndex) const = 0; /** * @param imageIndex For animated textures, the frame to get the ID of * @return The texture's height */ [[nodiscard]] virtual uint32_t getTextureHeight (uint32_t imageIndex) const = 0; /** * @return The textures real width */ [[nodiscard]] virtual uint32_t getRealWidth () const = 0; /** * @return The textures real height */ [[nodiscard]] virtual uint32_t getRealHeight () const = 0; /** * @return The texture's memory format */ [[nodiscard]] virtual TextureFormat getFormat () const = 0; /** * @return The texture's settings */ [[nodiscard]] virtual uint32_t getFlags () const = 0; /** * @return The list of frames this texture has */ [[nodiscard]] virtual const std::vector& getFrames () const = 0; /** * @return The texture's resolution vector */ [[nodiscard]] virtual const glm::vec4* getResolution () const = 0; /** * @return If the texture is animated or not */ [[nodiscard]] virtual bool isAnimated () const = 0; }; } // namespace WallpaperEngine::Assets