3#include "structure/math/spk_vector2.hpp"
4#include "structure/opengl/spk_texture_object.hpp"
63 Format _determineFormat(
int p_channels)
const;
75 void _loadFromData(
const std::vector<uint8_t> &p_pixelsAndEncodingData);
86 const std::vector<uint8_t> &p_pixelsAndEncodingData,
87 Filter p_filter =
Filter{Filtering::Linear, Filtering::Linear},
89 Mipmap p_mipmap = Mipmap::Activated);
100 const std::filesystem::path &p_path,
101 Filter p_filter =
Filter{Filtering::Linear, Filtering::Linear},
103 Mipmap p_mipmap = Mipmap::Activated);
114 const std::filesystem::path &p_path,
115 Filter p_filter =
Filter{Filtering::Linear, Filtering::Linear},
117 Mipmap p_mipmap = Mipmap::Activated);
127 const std::vector<uint8_t> &p_pixelsAndEncodingData,
128 Filter p_filter =
Filter{Filtering::Linear, Filtering::Linear},
130 Mipmap p_mipmap = Mipmap::Activated);
OpenGL::TextureObject::Format Format
Pixel format accepted by the underlying texture.
Definition spk_image.hpp:24
static Image fromRawData(const std::vector< uint8_t > &p_pixelsAndEncodingData, Filter p_filter=Filter{Filtering::Linear, Filtering::Linear}, Wrapper p_wrapper=Wrapper{Wrap::Repeat, Wrap::Repeat}, Mipmap p_mipmap=Mipmap::Activated)
Convenience factory that builds from encoded pixel data.
Definition spk_image.cpp:35
void _loadFromData(const std::vector< uint8_t > &p_pixelsAndEncodingData)
Populates the texture from encoded bytes already in memory.
Definition spk_image.cpp:62
OpenGL::TextureObject::Filtering Filtering
Filtering modes for minification and magnification.
Definition spk_image.hpp:26
Image(const std::vector< uint8_t > &p_pixelsAndEncodingData, Filter p_filter=Filter{Filtering::Linear, Filtering::Linear}, Wrapper p_wrapper=Wrapper{Wrap::Repeat, Wrap::Repeat}, Mipmap p_mipmap=Mipmap::Activated)
Builds an image from encoded pixel data already in memory.
Definition spk_image.cpp:21
static Image fromFile(const std::filesystem::path &p_path, Filter p_filter=Filter{Filtering::Linear, Filtering::Linear}, Wrapper p_wrapper=Wrapper{Wrap::Repeat, Wrap::Repeat}, Mipmap p_mipmap=Mipmap::Activated)
Convenience factory that loads from a file path.
Definition spk_image.cpp:30
OpenGL::TextureObject::Mipmap Mipmap
Mipmap generation policy.
Definition spk_image.hpp:34
void _loadFromFile(const std::filesystem::path &p_path)
Populates the texture from an image stored on disk.
Definition spk_image.cpp:57
OpenGL::TextureObject::Filter Filter
Pairing of min and mag filtering options.
Definition spk_image.hpp:28
OpenGL::TextureObject::Wrap Wrap
Texture coordinate wrapping modes.
Definition spk_image.hpp:30
OpenGL::TextureObject::Wrapper Wrapper
Pairing of wrap modes for the U and V axes.
Definition spk_image.hpp:32
static Region Whole
Represents the entire texture area.
Definition spk_image.hpp:55
CPU-staged 2D texture with activation and parameter controls.
Definition spk_texture_object.hpp:25
spk::ActivationStatus Mipmap
Indicates whether mipmaps are active.
Definition spk_texture_object.hpp:89
Wrap
Texture coordinate wrapping strategies.
Definition spk_texture_object.hpp:66
Filtering
Texture sampling algorithms for minification/magnification.
Definition spk_texture_object.hpp:43
Format
Supported GPU pixel formats.
Definition spk_texture_object.hpp:29
Normalized sub-area within the texture.
Definition spk_image.hpp:41
spk::Vector2 anchor
Normalized bottom-left corner of the region.
Definition spk_image.hpp:45
spk::Vector2 size
Normalized width and height of the region.
Definition spk_image.hpp:49
Filtering modes applied on minification and magnification.
Definition spk_texture_object.hpp:53
Wrapping policy along each texture axis.
Definition spk_texture_object.hpp:77