X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Ftexture3d.h;h=2a8f653cd04422c333a1dcb81e937978dee38fda;hb=e92de029768eef5f0fd744329e589161b46d0762;hp=1f50e056d8cb286d8e99b4c739f83e5f09c777bd;hpb=7aaec9a70b8d7733429bec043f8e33e02956f266;p=libs%2Fgl.git diff --git a/source/core/texture3d.h b/source/core/texture3d.h index 1f50e056..2a8f653c 100644 --- a/source/core/texture3d.h +++ b/source/core/texture3d.h @@ -2,6 +2,7 @@ #define MSP_GL_TEXTURE3D_H_ #include +#include #include "texture.h" namespace Msp { @@ -27,14 +28,13 @@ public: void storage_levels(PixelFormat, unsigned, unsigned, unsigned, unsigned); }; -private: +protected: unsigned width; unsigned height; unsigned depth; unsigned levels; unsigned allocated; -protected: Texture3D(GLenum); public: Texture3D(); @@ -53,11 +53,19 @@ public: undefined. If storage has already been allocated, does nothing. */ void allocate(unsigned level); +private: + void allocate_(unsigned); + +public: /** Updates the contents of the entire texture. Storage must be defined beforehand. The image data must have dimensions and format matching the defined storage. */ void image(unsigned level, const void *data); +private: + void image_(unsigned, const void *); + +public: DEPRECATED void image(unsigned level, PixelComponents comp, DataType type, const void *data); /** Updates a cuboid-shaped region of the texture. Storage must be defined @@ -83,7 +91,7 @@ public: unsigned get_depth() const { return depth; } protected: unsigned get_n_levels() const; - void get_level_size(unsigned, unsigned &, unsigned &, unsigned &) const; + LinAl::Vector get_level_size(unsigned) const; public: virtual AsyncLoader *load(IO::Seekable &, const Resources * = 0) { return 0; }