| 0.8.2 API documentation

- Main Page
- Namespaces
- Classes
- Files

- File List

texture2d_array.hpp
Go to the documentation of this file.
1
4 #pragma once
5
6 #include "texture2d.hpp"
7
8 namespace gli
9 {
11 class texture2d_array : public texture
12 {
13 public:
14 typedef extent2d extent_type;
15
16 public:
18 texture2d_array();
19
21 texture2d_array(
22 format_type Format,
23 extent_type const& Extent,
24 size_type Layers,
25 size_type Levels,
26 swizzles_type const& Swizzles = swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA));
27
29 texture2d_array(
30 format_type Format,
31 extent_type const& Extent,
32 size_type Layers,
33 swizzles_type const& Swizzles = swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA));
34
36 explicit texture2d_array(
37 texture const& Texture);
38
40 texture2d_array(
41 texture const& Texture,
42 format_type Format,
43 size_type BaseLayer, size_type MaxLayer,
44 size_type BaseFace, size_type MaxFace,
45 size_type BaseLevel, size_type MaxLevel,
46 swizzles_type const& Swizzles = swizzles_type(SWIZZLE_RED, SWIZZLE_GREEN, SWIZZLE_BLUE, SWIZZLE_ALPHA));
47
49 texture2d_array(
50 texture2d_array const& Texture,
51 size_type BaseLayer, size_type MaxLayer,
52 size_type BaseLevel, size_type MaxLevel);
53
55 texture2d operator[](size_type Layer) const;
56
58 extent_type extent(size_type Level = 0) const;
59
61 template <typename gen_type>
62 gen_type load(extent_type const& TexelCoord, size_type Layer, size_type Level) const;
63
65 template <typename gen_type>
66 void store(extent_type const& TexelCoord, size_type Layer, size_type Level, gen_type const& Texel);
67 };
68 }//namespace gli
69
70 #include "./core/texture2d_array.inl"
gli::format
format
Texture data format.
Definition: format.hpp:12
gli::texture2d
2d texture
Definition: texture2d.hpp:12
gli::texture2d_array::operator[]
texture2d operator[](size_type Layer) const
Create a view of the texture identified by Layer in the texture array.
gli::texture2d_array::store
void store(extent_type const &TexelCoord, size_type Layer, size_type Level, gen_type const &Texel)
Write a texel to a texture. The texture format must be uncompressed.
gli::texture
Genetic texture class. It can support any target.
Definition: texture.hpp:14
gli::texture2d_array::load
gen_type load(extent_type const &TexelCoord, size_type Layer, size_type Level) const
Fetch a texel from a texture. The texture format must be uncompressed.
gli
Namespace where all the classes and functions provided by GLI are exposed.
Definition: clear.hpp:6
texture2d.hpp
Include to use 2d textures.
gli::texture2d_array::extent
extent_type extent(size_type Level=0) const
Return the dimensions of a texture instance: width and height.
gli::texture2d_array
2d array texture
Definition: texture2d_array.hpp:11
gli::texture2d_array::texture2d_array
texture2d_array()
Create an empty texture 2D array.