GLI 0.6.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

texture2d.hpp
Go to the documentation of this file.
1
29 #pragma once
30
31 #include "image.hpp"
32
33 namespace gli
34 {
35 class texture2DArray;
36 class textureCube;
37 class textureCubeArray;
38
40 class texture2D
41 {
42 public:
43 typedef storage::dim2_type dim_type;
44 typedef storage::texcoord2_type texcoord_type;
45 typedef storage::size_type size_type;
46 typedef storage::format_type format_type;
47 typedef storage::size_type layer_type;
48 typedef storage::size_type level_type;
49 typedef storage::size_type face_type;
50
51 public:
52 texture2D();
53
55 explicit texture2D(
56 size_type const & Levels,
57 format_type const & Format,
58 dim_type const & Dimensions);
59
61 explicit texture2D(
62 format_type const & Format,
63 dim_type const & Dimensions);
64
66 explicit texture2D(
67 storage const & Storage);
68
70 explicit texture2D(
71 storage const & Storage,
72 format_type const & Format,
73 size_type BaseLayer,
74 size_type MaxLayer,
75 size_type BaseFace,
76 size_type MaxFace,
77 size_type BaseLevel,
78 size_type MaxLevel);
79
81 explicit texture2D(
82 texture2D const & Texture,
83 size_type const & BaseLevel,
84 size_type const & MaxLevel);
85
87 explicit texture2D(
88 texture2DArray const & Texture,
89 size_type const & BaseLayer,
90 size_type const & BaseLevel,
91 size_type const & MaxLevel);
92
94 explicit texture2D(
95 textureCube const & Texture,
96 size_type const & BaseFace,
97 size_type const & BaseLevel,
98 size_type const & MaxLevel);
99
101 explicit texture2D(
102 textureCubeArray const & Texture,
103 size_type const & BaseLayer, size_type const & BaseFace,
104 size_type const & BaseLevel, 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 dim_type dimensions() const;
112 size_type layers() const;
113 size_type faces() const;
114 size_type levels() const;
115 glm::ivec4 swizzle() const;
116
117 size_type size() const;
118 void * data();
119 void const * data() const;
120
121 template <typename genType>
122 size_type size() const;
123 template <typename genType>
124 genType * data();
125 template <typename genType>
126 genType const * data() const;
127
128 void clear();
129 template <typename genType>
130 void clear(genType const & Texel);
131 template <typename genType>
132 genType fetch(dim_type const & TexelCoord, size_type const & Level);
133
134 size_type baseLayer() const;
135 size_type maxLayer() const;
136 size_type baseFace() const;
137 size_type maxFace() const;
138 size_type baseLevel() const;
139 size_type maxLevel() const;
140
141 private:
142 storage Storage;
143 size_type BaseLayer;
144 size_type MaxLayer;
145 size_type BaseFace;
146 size_type MaxFace;
147 size_type BaseLevel;
148 size_type MaxLevel;
149 format_type Format;
150 };
151 }//namespace gli
152
153
gli::texture2D::maxLevel
size_type maxLevel() const
gli::texture2DArray
Definition: texture2d_array.hpp:35
gli::storage::size_type
size_t size_type
Definition: storage.hpp:68
gli::texture2D::fetch
genType fetch(dim_type const &TexelCoord, size_type const &Level)
gli::texture2D::dimensions
dim_type dimensions() const
gli::texture2D::clear
void clear()
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::storage::texcoord2_type
texcoord2_t texcoord2_type
Definition: storage.hpp:65
gli
Definition: addressing.hpp:33
gli::texture2D::format_type
storage::format_type format_type
Definition: texture2d.hpp:46
gli::texture2D::baseFace
size_type baseFace() const
gli::storage
Definition: storage.hpp:56
gli::texture2D::baseLayer
size_type baseLayer() const
gli::texture2D
texture2D
Definition: texture2d.hpp:40
gli::texture2D::level_type
storage::size_type level_type
Definition: texture2d.hpp:48
gli::texture2D::empty
bool empty() const
image.hpp
OpenGL Image (gli.g-truc.net)
gli::texture2D::size
size_type size() const
gli::textureCube
Definition: texture_cube.hpp:38
gli::texture2D::face_type
storage::size_type face_type
Definition: texture2d.hpp:49
gli::image
Image.
Definition: image.hpp:41
gli::texture2D::format
format_type format() const
gli::texture2D::swizzle
glm::ivec4 swizzle() const
gli::texture2D::dim_type
storage::dim2_type dim_type
Definition: texture2d.hpp:43
gli::textureCubeArray
Definition: texture_cube_array.hpp:38
gli::texture2D::texcoord_type
storage::texcoord2_type texcoord_type
Definition: texture2d.hpp:44
gli::texture2D::size_type
storage::size_type size_type
Definition: texture2d.hpp:45
gli::texture2D::maxLayer
size_type maxLayer() const
gli::texture2D::layer_type
storage::size_type layer_type
Definition: texture2d.hpp:47
gli::storage::dim2_type
dim2_t dim2_type
Definition: storage.hpp:60
gli::texture2D::baseLevel
size_type baseLevel() const
gli::texture2D::faces
size_type faces() const
gli::format
format
Definition: format.hpp:33