X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Ftexture2dmultisample.h;h=8e234835e182fee9f6845b3ed4783a5ec7f00cde;hp=9710ad7847b131baefc4889c396d54163e53b20f;hb=HEAD;hpb=160e9eea29bd10034733d59507fa1bcca36be401 diff --git a/source/core/texture2dmultisample.h b/source/core/texture2dmultisample.h index 9710ad78..8e234835 100644 --- a/source/core/texture2dmultisample.h +++ b/source/core/texture2dmultisample.h @@ -6,29 +6,35 @@ 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; private: - unsigned width; - unsigned height; - unsigned samples; + unsigned width = 0; + unsigned height = 0; + unsigned samples = 0; public: - Texture2DMultisample(); - - 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; } unsigned get_height() const { return height; } 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 void unload() { } }; } // namespace GL