]> git.tdb.fi Git - libs/gl.git/blob - source/texture2darray.h
Actually use the light color in cooktorrance shader
[libs/gl.git] / source / 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, PixelFormat, DataType, const void *);
31         void layer_image(unsigned, unsigned, const Graphics::Image &);
32
33         unsigned get_layers() const { return get_depth(); }
34 };
35
36 } // namespace GL
37 } // namespace Msp
38
39 #endif