X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Ftexture2darray.h;h=98cb1bdc13917871abcd21b2742ab0e367e57b46;hp=662fbad8c71c7ac8de37fed1280e47062ccaa0f1;hb=HEAD;hpb=160e9eea29bd10034733d59507fa1bcca36be401 diff --git a/source/core/texture2darray.h b/source/core/texture2darray.h index 662fbad8..98cb1bdc 100644 --- a/source/core/texture2darray.h +++ b/source/core/texture2darray.h @@ -7,9 +7,10 @@ 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 Texture2DArrayBackend { @@ -25,7 +26,11 @@ public: void external_image(unsigned, const std::string &); }; + /** 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(); }