1 #ifndef MSP_GL_TEXTURE2DARRAY_H_
2 #define MSP_GL_TEXTURE2DARRAY_H_
4 #include "texture2darray_backend.h"
10 An array of two-dimensional textures. It behaves much like a 3D texture, but
11 mipmapping and filtering is not applied on the third dimension. When sampling
12 the texture, the third coordinate is not normalized and is rounded to the
13 nearest integer to select the layer.
15 class Texture2DArray: public Texture2DArrayBackend
18 class Loader: public Msp::DataFile::DerivedObjectLoader<Texture2DArray, Texture3D::Loader>
21 Loader(Texture2DArray &);
22 Loader(Texture2DArray &, Collection &);
26 void external_image(unsigned, const std::string &);
29 /** Replaces contents of a single layer. Allocated storage must exist. The
30 image data is interpreted according to the storage format and must have
31 width and height matching the selected mipmap level. */
32 void layer_image(unsigned, unsigned, const void *);
34 void layer_image(unsigned, unsigned, const Graphics::Image &);
36 unsigned get_layers() const { return get_depth(); }