]> git.tdb.fi Git - libs/gl.git/blob - source/core/texture2darray.h
Set viewport and scissor before clear commands
[libs/gl.git] / source / core / texture2darray.h
1 #ifndef MSP_GL_TEXTURE2DARRAY_H_
2 #define MSP_GL_TEXTURE2DARRAY_H_
3
4 #include "texture2darray_backend.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 Texture2DArrayBackend
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         void layer_image(unsigned, unsigned, const void *);
29         void layer_image(unsigned, unsigned, const Graphics::Image &);
30
31         unsigned get_layers() const { return get_depth(); }
32 };
33
34 } // namespace GL
35 } // namespace Msp
36
37 #endif