Class Texture¶
Defined in File texture.h
Inheritance Relationships¶
Base Type¶
public portal::renderer::RendererResource(Class RendererResource)
Derived Type¶
public portal::renderer::vulkan::VulkanTexture(Class VulkanTexture)
Class Documentation¶
-
class Texture : public portal::renderer::RendererResource¶
Abstract texture interface with mipmap, sampler, and cube texture support.
Wraps Image with texture-specific functionality: mipmap queries, sampler configuration, predefined texture IDs (missing/white/black), and texture type (2D/cube). Supports CPU buffer access and resizing.
Subclassed by portal::renderer::vulkan::VulkanTexture
Public Functions
-
virtual ImageFormat get_format() const = 0¶
Gets texture format.
-
virtual size_t get_width() const = 0¶
Gets texture width.
-
virtual size_t get_height() const = 0¶
Gets texture height.
-
virtual size_t get_depth() const = 0¶
Gets texture depth.
-
virtual glm::uvec3 get_size() const = 0¶
Gets texture size as 3D vector.
-
virtual uint32_t get_mip_level_count() const = 0¶
Gets mipmap level count.
-
virtual glm::uvec3 get_mip_size(uint32_t mip) const = 0¶
Gets dimensions of specific mip level.
- Parameters:
mip – Mip level index
- Returns:
Mip size (width/height/depth)
-
virtual void resize(const glm::uvec3 &size) = 0¶
Resizes texture.
- Parameters:
size – New size
-
virtual void resize(size_t width, size_t height, size_t depth) = 0¶
Resizes texture.
- Parameters:
width – New width
height – New height
depth – New depth
-
virtual bool loaded() const = 0¶
Checks if texture data is loaded.
-
virtual TextureType get_type() const = 0¶
Gets texture type (2D/cube)
Public Static Functions
-
static inline ResourceType static_type()¶
-
virtual ImageFormat get_format() const = 0¶