GLI 0.5.1

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

texture2d.hpp
Go to the documentation of this file.
1
29 #ifndef GLI_CORE_TEXTURE2D_INCLUDED
30 #define GLI_CORE_TEXTURE2D_INCLUDED
31
32 #include "image.hpp"
33
34 namespace gli
35 {
36 class texture2DArray;
37 class textureCube;
38 class textureCubeArray;
39
41 class texture2D
42 {
43 public:
44 typedef storage::dimensions2_type dimensions_type;
45 typedef storage::texcoord2_type texcoord_type;
46 typedef storage::size_type size_type;
47 typedef gli::format format_type;
48
49 public:
50 texture2D();
51
53 explicit texture2D(
54 size_type const & Levels,
55 format_type const & Format,
56 dimensions_type const & Dimensions);
57
59 explicit texture2D(
60 format_type const & Format,
61 dimensions_type const & Dimensions);
62
64 explicit texture2D(
65 storage const & Storage);
66
68 explicit texture2D(
69 storage const & Storage,
70 format_type const & Format,
71 size_type BaseLayer,
72 size_type MaxLayer,
73 size_type BaseFace,
74 size_type MaxFace,
75 size_type BaseLevel,
76 size_type MaxLevel);
77
79 explicit texture2D(
80 texture2D const & Texture,
81 size_type const & BaseLevel,
82 size_type const & MaxLevel);
83
85 explicit texture2D(
86 texture2DArray const & Texture,
87 size_type const & BaseLayer,
88 size_type const & BaseLevel,
89 size_type const & MaxLevel);
90
92 explicit texture2D(
93 textureCube const & Texture,
94 size_type const & BaseFace,
95 size_type const & BaseLevel,
96 size_type const & MaxLevel);
97
99 explicit texture2D(
100 textureCubeArray const & Texture,
101 size_type const & BaseLayer,
102 size_type const & BaseFace,
103 size_type const & BaseLevel,
104 size_type const & MaxLevel);
105
106 operator storage() const;
107 image operator[] (size_type const & Level) const;
108
109 bool empty() const;
110 format_type format() const;
111 dimensions_type dimensions() const;
112 size_type layers() const;
113 size_type faces() const;
114 size_type levels() const;
115
116 size_type size() const;
117 void * data();
118 void const * data() const;
119
120 template <typename genType>
121 size_type size() const;
122 template <typename genType>
123 genType * data();
124 template <typename genType>
125 genType const * data() const;
126
127 void clear();
128 template <typename genType>
129 void clear(genType const & Texel);
130 template <typename genType>
131 genType fetch(dimensions_type const & TexelCoord, size_type const & Level);
132
133 size_type baseLayer() const;
134 size_type maxLayer() const;
135 size_type baseFace() const;
136 size_type maxFace() const;
137 size_type baseLevel() const;
138 size_type maxLevel() const;
139
140 private:
141 storage Storage;
142 size_type BaseLayer;
143 size_type MaxLayer;
144 size_type BaseFace;
145 size_type MaxFace;
146 size_type BaseLevel;
147 size_type MaxLevel;
148 format_type Format;
149 };
150 }//namespace gli
151
152 #endif//GLI_CORE_TEXTURE2D_INCLUDED
gli::texture2D::maxLevel
size_type maxLevel() const
gli::texture2DArray
Definition: texture2d_array.hpp:36
image.hpp
OpenGL Image (gli.g-truc.net)
gli::texture2D::clear
void clear()
gli::texture2D::format_type
gli::format format_type
Definition: texture2d.hpp:47
gli::storage::dimensions2_type
glm::uvec2 dimensions2_type
Definition: storage.hpp:70
gli::image
Image.
Definition: image.hpp:42
gli::texture2D::operator[]
image operator[](size_type const &Level) const
gli::texture2D::levels
size_type levels() const
gli::texture2D::texture2D
texture2D()
gli::texture2D::data
void * data()
gli::texture2D::layers
size_type layers() const
gli::texture2D::maxFace
size_type maxFace() const
gli::texture2D::baseFace
size_type baseFace() const
gli::storage
Definition: storage.hpp:66
gli::texture2D::baseLayer
size_type baseLayer() const
gli::texture2D
texture2D
Definition: texture2d.hpp:41
gli::texture2D::fetch
genType fetch(dimensions_type const &TexelCoord, size_type const &Level)
gli::texture2D::empty
bool empty() const
gli::texture2D::size
size_type size() const
gli::texture2D::dimensions
dimensions_type dimensions() const
gli::textureCube
Definition: texture_cube.hpp:39
gli::storage::size_type
std::size_t size_type
Definition: storage.hpp:78
gli::format
format
Definition: format.hpp:34
gli::texture2D::dimensions_type
storage::dimensions2_type dimensions_type
Definition: texture2d.hpp:44
gli::texture2D::format
format_type format() const
gli::textureCubeArray
Definition: texture_cube_array.hpp:39
gli::texture2D::texcoord_type
storage::texcoord2_type texcoord_type
Definition: texture2d.hpp:45
gli::texture2D::size_type
storage::size_type size_type
Definition: texture2d.hpp:46
gli::texture2D::maxLayer
size_type maxLayer() const
gli::storage::texcoord2_type
glm::vec2 texcoord2_type
Definition: storage.hpp:75
gli::texture2D::baseLevel
size_type baseLevel() const
gli::texture2D::faces
size_type faces() const