X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Ftexture2dmultisample.h;h=20c0f864b531311563353afc8fa2e9417f022c97;hb=6cee6c490ded0981c4da3f9f4ec74a41555e1a4e;hp=8c3275c0b3758fcbad92dd2a8c34ec557684c0a4;hpb=38712d8ecc57d043a2419ffbaeeb57f7a6586f14;p=libs%2Fgl.git diff --git a/source/core/texture2dmultisample.h b/source/core/texture2dmultisample.h index 8c3275c0..20c0f864 100644 --- a/source/core/texture2dmultisample.h +++ b/source/core/texture2dmultisample.h @@ -6,6 +6,15 @@ namespace Msp { namespace GL { +/** +Two-dimensional multisample texture, consisting of a rectancular array of +texels with multiple samples each. + +The contents of multisample textures can not be set through API. Their primary +use is as Framebuffer attachments. + +Multisample textures can't have mipmaps. +*/ class Texture2DMultisample: public Texture2DMultisampleBackend { friend Texture2DMultisampleBackend; @@ -16,8 +25,11 @@ private: unsigned samples = 0; public: - void storage(PixelFormat fmt, unsigned wd, unsigned ht, unsigned sm); + /** Sets storage dimensions, format and sample count and allocates memory + for the texture. */ + void storage(PixelFormat, unsigned wd, unsigned ht, unsigned sm); + virtual void image(unsigned, const void *); virtual void image(const Graphics::Image &, unsigned = 0); unsigned get_width() const { return width; } @@ -25,7 +37,7 @@ public: unsigned get_samples() const { return samples; } virtual AsyncLoader *load(IO::Seekable &, const Resources * = 0) { return 0; } - virtual std::uint64_t get_data_size() const; + virtual std::size_t get_data_size() const; virtual void unload() { } };