12 #include "../type.hpp"
13 #include "../format.hpp"
16 #include <glm/gtc/round.hpp>
17 #include <glm/gtx/component_wise.hpp>
18 #include <glm/gtx/integer.hpp>
19 #include <glm/gtx/bit.hpp>
20 #include <glm/gtx/raw_data.hpp>
21 #include <glm/gtx/wrap.hpp>
23 static_assert(GLM_VERSION >= 97,
"GLI requires at least GLM 0.9.7");
30 typedef extent3d extent_type;
31 typedef size_t size_type;
33 typedef glm::byte data_type;
40 extent_type
const & Extent,
46 size_type size()
const;
47 size_type layers()
const;
49 size_type faces()
const;
53 extent_type block_count(size_type Level)
const;
54 extent_type extent(size_type Level)
const;
57 data_type
const*
const data()
const;
60 size_type base_offset(
63 size_type Level)
const;
65 size_type image_offset(extent1d
const& Coord, extent1d
const& Extent)
const;
67 size_type image_offset(extent2d
const& Coord, extent2d
const& Extent)
const;
69 size_type image_offset(extent3d
const& Coord, extent3d
const& Extent)
const;
73 storage_linear
const& StorageSrc,
74 size_t LayerSrc,
size_t FaceSrc,
size_t LevelSrc, extent_type
const& BlockIndexSrc,
75 size_t LayerDst,
size_t FaceDst,
size_t LevelDst, extent_type
const& BlockIndexDst,
76 extent_type
const& BlockCount);
79 size_type Level)
const;
81 size_type BaseLevel, size_type MaxLevel)
const;
83 size_type BaseFace, size_type MaxFace,
84 size_type BaseLevel, size_type MaxLevel)
const;
87 size_type
const Layers;
88 size_type
const Faces;
89 size_type
const Levels;
90 size_type
const BlockSize;
91 extent_type
const BlockCount;
92 extent_type
const BlockExtent;
93 extent_type
const Extent;
94 std::vector<data_type> Data;
98 #include "storage_linear.inl"
ivec3 block_extent(format Format)
Return the dimensions in texels of the block for a format.
format
Texture data format.
void copy(texture_src_type const &TextureSrc, size_t LayerSrc, size_t FaceSrc, size_t LevelSrc, texture_dst_type &TextureDst, size_t LayerDst, size_t FaceDst, size_t LevelDst)
Copy a specific image of a texture.
Namespace where all the classes and functions provided by GLI are exposed.
size_t block_size(format Format)
Return the size in bytes of a block for a format.
T levels(vecType< T, P > const &Extent)
Compute the number of mipmaps levels necessary to create a mipmap complete texture.