X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Ftexture2darray.h;h=98cb1bdc13917871abcd21b2742ab0e367e57b46;hb=e1be82a4dfce8d90358c506f65be09da4dc9d5ec;hp=21930f882e813a1240b5fe30eda5deb87b2c30f0;hpb=6065f6622cc275dc0b20baaf7c267e71169d18f3;p=libs%2Fgl.git diff --git a/source/core/texture2darray.h b/source/core/texture2darray.h index 21930f88..98cb1bdc 100644 --- a/source/core/texture2darray.h +++ b/source/core/texture2darray.h @@ -1,17 +1,18 @@ #ifndef MSP_GL_TEXTURE2DARRAY_H_ #define MSP_GL_TEXTURE2DARRAY_H_ -#include "texture3d.h" +#include "texture2darray_backend.h" namespace Msp { namespace GL { /** -An array of two-dimensional textures. It's very much like a 3D texture, with -two important differences: there's no filtering nor mipmapping along the third -dimension. +An array of two-dimensional textures. It behaves much like a 3D texture, but +mipmapping and filtering is not applied on the third dimension. When sampling +the texture, the third coordinate is not normalized and is rounded to the +nearest integer to select the layer. */ -class Texture2DArray: public Texture3D +class Texture2DArray: public Texture2DArrayBackend { public: class Loader: public Msp::DataFile::DerivedObjectLoader @@ -25,9 +26,11 @@ public: void external_image(unsigned, const std::string &); }; - Texture2DArray(); - + /** Replaces contents of a single layer. Allocated storage must exist. The + image data is interpreted according to the storage format and must have + width and height matching the selected mipmap level. */ void layer_image(unsigned, unsigned, const void *); + void layer_image(unsigned, unsigned, const Graphics::Image &); unsigned get_layers() const { return get_depth(); }