mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 05:46:48 +08:00
66 lines
2.0 KiB
C++
66 lines
2.0 KiB
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <memory>
|
|
|
|
#include <GL/glew.h>
|
|
#include <glm/vec4.hpp>
|
|
|
|
#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<FrameSharedPtr>& 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
|