40 typedef size_t size_type;
41 typedef gli::format format_type;
42 typedef gli::target target_type;
43 typedef storage::dim_type dim_type;
44 typedef storage::data_type data_type;
53 dim_type
const & Dimensions,
67 size_type BaseLayer, size_type MaxLayer,
68 size_type BaseFace, size_type MaxFace,
69 size_type BaseLevel, size_type MaxLevel);
85 target_type
target()
const{
return this->Target;}
88 format_type
format()
const;
106 size_type
faces()
const;
118 dim_type
dimensions(size_type Level = 0)
const;
121 size_type
size()
const;
125 template <
typename genType>
126 size_type
size()
const;
129 size_type
size(size_type Level)
const;
133 template <
typename genType>
134 size_type
size(size_type Level)
const;
140 template <
typename genType>
144 void const *
data()
const;
147 template <
typename genType>
148 genType
const *
data()
const;
151 void *
data(size_type Layer, size_type Face, size_type Level);
154 void const *
data(size_type Layer, size_type Face, size_type Level)
const;
157 template <
typename genType>
158 genType *
data(size_type Layer, size_type Face, size_type Level);
161 template <
typename genType>
162 genType
const *
data(size_type Layer, size_type Face, size_type Level)
const;
169 template <
typename genType>
170 void clear(genType
const & Texel);
174 size_type
offset(size_type Layer, size_type Face, size_type Level)
const;
182 std::shared_ptr<storage> Storage;
183 target_type
const Target;
184 format_type
const Format;
185 size_type
const BaseLayer;
186 size_type
const MaxLayer;
187 size_type
const BaseFace;
188 size_type
const MaxFace;
189 size_type
const BaseLevel;
190 size_type
const MaxLevel;
199 #include "./core/texture.inl"
size_type max_face() const
Return the max face of the texture instance, effectively a memory offset to the beginning of the last...
texture()
Create an empty texture instance.
OpenGL Image (gli.g-truc.net)
void * data()
Return a pointer to the beginning of the texture instance data.
size_type levels() const
Return max_level() - base_level() + 1.
size_type size() const
Return the memory size of a texture instance storage in bytes.
size_type base_layer() const
Return the base layer of the texture instance, effectively a memory offset in the actual texture stor...
size_type faces() const
Return max_face() - base_face() + 1.
void clear()
Clear the entire texture storage with zeros.
dim_type dimensions(size_type Level=0) const
Return the dimensions of a texture instance: width, height and depth.
size_type offset(size_type Layer, size_type Face, size_type Level) const
Compute the relative memory offset to access the data for a specific layer, face and level...
size_type base_face() const
Return the base face of the texture instance, effectively a memory offset in the actual texture stora...
size_type base_level() const
Return the base level of the texture instance, effectively a memory offset in the actual texture stor...
format_type format() const
Return the texture instance format.
target_type target() const
Return the target of a texture instance.
size_type max_level() const
Return the max level of the texture instance, effectively a memory offset to the beginning of the las...
bool empty() const
Return whether the texture instance is empty, no storage or description have been assigned to the ins...
Genetic texture class. It can support any target.
size_type layers() const
Return max_layer() - base_layer() + 1.
OpenGL Image (gli.g-truc.net)
size_type max_layer() const
Return the max layer of the texture instance, effectively a memory offset to the beginning of the las...