X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture3d.h;h=15d244dec10f116eca42f8c53515e3994720e90a;hb=5172d32d67595ea0b70184fadcfcb8e023cccbc8;hp=ec3b57ba5f594942ab3ffa3f3cab5555a45f7e51;hpb=e92458a4a0e6191bff549a8b316dbbbd7c56e90f;p=libs%2Fgl.git diff --git a/source/texture3d.h b/source/texture3d.h index ec3b57ba..15d244de 100644 --- a/source/texture3d.h +++ b/source/texture3d.h @@ -9,6 +9,7 @@ Distributed under the LGPL #define MSP_GL_TEXTURE3D_H_ #include +#include "datatype.h" #include "pixelformat.h" #include "texture.h" @@ -19,20 +20,24 @@ class Texture3D: public Texture { private: PixelFormat ifmt; - sizei width; - sizei height; - sizei depth; - int border; + unsigned width; + unsigned height; + unsigned depth; + unsigned allocated; public: Texture3D(); - void storage(PixelFormat, sizei, sizei, sizei, int); - void image(int, PixelFormat, DataType, const void *); - void sub_image(int, int, int, sizei, sizei, sizei, PixelFormat, DataType, const void *); - void load_image(const std::string &fn, int dp=-1); - sizei get_width() const { return width; } - sizei get_height() const { return height; } - sizei get_depth() const { return depth; } + void storage(PixelFormat, unsigned, unsigned, unsigned); + void allocate(unsigned); + void image(unsigned, PixelFormat, DataType, const void *); + void sub_image(unsigned, int, int, int, unsigned, unsigned, unsigned, PixelFormat, DataType, const void *); + void load_image(const std::string &fn, int dp = -1); + unsigned get_width() const { return width; } + unsigned get_height() const { return height; } + unsigned get_depth() const { return depth; } +private: + void require_storage(); + void get_level_size(unsigned, unsigned &, unsigned &, unsigned &); }; } // namespace GL