X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture3d.h;h=a0e96f4247aa7a90507aa39f9ebb86f94deb2f40;hp=50e4555aa56cca44e3ec0d66ee09d2641a81f3ab;hb=f14435e58bfa0fa697a06ba9a454bb30cd37d9d8;hpb=b617c5d7b5283ad260a77f01e42e6170cabbc03d diff --git a/source/texture3d.h b/source/texture3d.h index 50e4555a..a0e96f42 100644 --- a/source/texture3d.h +++ b/source/texture3d.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspgl -Copyright © 2007 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_GL_TEXTURE3D_H_ #define MSP_GL_TEXTURE3D_H_ @@ -23,17 +16,21 @@ private: unsigned width; unsigned height; unsigned depth; - int border; + unsigned allocated; public: Texture3D(); - void storage(PixelFormat, unsigned, unsigned, unsigned, int); - void image(int, PixelFormat, DataType, const void *); - void sub_image(int, int, int, unsigned, unsigned, unsigned, PixelFormat, DataType, const void *); + 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