44 size_type
const & Layers,
45 size_type
const & Faces,
46 size_type
const & Levels,
47 format_type
const &
Format,
54 format_type
const &
Format,
60 format_type
format()
const;
68 size_type
faces()
const;
74 size_type
size()
const;
75 template <
typename genType>
76 size_type
size()
const;
79 template <
typename genType>
81 void const *
data()
const;
82 template <
typename genType>
83 genType
const *
data()
const;
86 template <
typename genType>
87 void clear(genType
const & Texel);
102 void *
const compute_data();
103 size_type compute_size()
const;
108 , BaseLayer(0), MaxLayer(0)
109 , BaseFace(0), MaxFace(0)
110 , BaseLevel(0), MaxLevel(0)
123 : Storage(Layers, Faces, Levels, Format, Dimensions)
125 , BaseLayer(0), MaxLayer(Layers - 1)
126 , BaseFace(0), MaxFace(Faces - 1)
127 , BaseLevel(0), MaxLevel(Levels - 1)
128 , Data(this->compute_data())
129 , Size(this->compute_size())
137 , Format(Storage.
format())
138 , BaseLayer(0), MaxLayer(Storage.
layers() - 1)
139 , BaseFace(0), MaxFace(Storage.
faces() - 1)
140 , BaseLevel(0), MaxLevel(Storage.
levels() - 1)
141 , Data(this->compute_data())
142 , Size(this->compute_size())
155 , BaseLayer(BaseLayer), MaxLayer(MaxLayer)
156 , BaseFace(BaseFace), MaxFace(MaxFace)
157 , BaseLevel(BaseLevel), MaxLevel(MaxLevel)
158 , Data(this->compute_data())
159 , Size(this->compute_size())
164 assert(!this->
empty());
169 template <
typename genType>
172 assert(!this->
empty());
175 return this->
size() /
sizeof(genType);
188 template <
typename genType>
191 assert(!this->
empty());
194 return reinterpret_cast<genType *
>(this->
data());
197 template <
typename genType>
200 assert(!this->
empty());
203 return reinterpret_cast<genType
const *
>(this->
data());
208 return this->Storage.
empty();
264 memset(this->data<glm::byte>(), 0, this->size<glm::byte>());
267 template <
typename genType>
270 assert(!this->
empty());
273 genType*
Data = this->data<genType>();
274 size_type const TexelCount = this->size<genType>();
276 for(
size_type TexelIndex = 0; TexelIndex < TexelCount; ++TexelIndex)
277 *(Data + TexelIndex) = Texel;
280 void *
const texture::compute_data()
285 return this->Storage.
data() + offset;
290 assert(!this->
empty());
308 #include "texture1d.inl"
309 #include "texture1d_array.inl"
310 #include "texture2d.inl"
311 #include "texture2d_array.inl"
312 #include "texture3d.inl"
313 #include "texture_cube.inl"
314 #include "texture_cube_array.inl"
OpenGL Image (gli.g-truc.net)
OpenGL Image (gli.g-truc.net)
OpenGL Image (gli.g-truc.net)
OpenGL Image (gli.g-truc.net)
std::uint32_t block_size(format const &Format)
size_type baseFace() const
size_type baseLayer() const
size_type maxLayer() const
size_type layer_size(size_type const &BaseFace, size_type const &MaxFace, size_type const &BaseLevel, size_type const &MaxLevel) const
OpenGL Image (gli.g-truc.net)
size_type const BaseLayer
OpenGL Image (gli.g-truc.net)
size_t imageAddressing(storage const &Storage, size_t const &LayerOffset, size_t const &FaceOffset, size_t const &LevelOffset)
OpenGL Image (gli.g-truc.net)
format_type format() const
size_type maxLevel() const
size_type const BaseLevel
OpenGL Image (gli.g-truc.net)
size_type maxFace() const
size_type baseLevel() const
format_type format() const
OpenGL Image (gli.g-truc.net)