]> git.tdb.fi Git - libs/gl.git/blob - source/core/texture2darray.h
Add push_back_nocopy to NodeContainer for clarity
[libs/gl.git] / source / core / texture2darray.h
1 #ifndef MSP_GL_TEXTURE2DARRAY_H_
2 #define MSP_GL_TEXTURE2DARRAY_H_
3
4 #include "texture3d.h"
5
6 namespace Msp {
7 namespace GL {
8
9 /**
10 An array of two-dimensional textures.  It's very much like a 3D texture, with
11 two important differences: there's no filtering nor mipmapping along the third
12 dimension.
13 */
14 class Texture2DArray: public Texture3D
15 {
16 public:
17         class Loader: public Msp::DataFile::DerivedObjectLoader<Texture2DArray, Texture3D::Loader>
18         {
19         public:
20                 Loader(Texture2DArray &);
21                 Loader(Texture2DArray &, Collection &);
22         private:
23                 void init();
24
25                 void external_image(unsigned, const std::string &);
26         };
27
28         Texture2DArray();
29
30         void layer_image(unsigned, unsigned, const void *);
31         DEPRECATED void layer_image(unsigned, unsigned, PixelComponents, DataType, const void *);
32         void layer_image(unsigned, unsigned, const Graphics::Image &);
33
34         unsigned get_layers() const { return get_depth(); }
35 };
36
37 } // namespace GL
38 } // namespace Msp
39
40 #endif