X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Ftexture3d.h;h=21893abc07e5fc19c4915cb34c4882086d5bdf36;hb=160e9eea29bd10034733d59507fa1bcca36be401;hp=3538f6bba82018b85edd68a69f6686c52e991460;hpb=6065f6622cc275dc0b20baaf7c267e71169d18f3;p=libs%2Fgl.git diff --git a/source/core/texture3d.h b/source/core/texture3d.h index 3538f6bb..21893abc 100644 --- a/source/core/texture3d.h +++ b/source/core/texture3d.h @@ -3,7 +3,7 @@ #include #include -#include "texture.h" +#include "texture3d_backend.h" namespace Msp { namespace GL { @@ -12,8 +12,10 @@ namespace GL { Three-dimensional texture. Consists of an array of texels in the shape of a right cuboid. Texture coordinates have a principal range of [0, 1]. */ -class Texture3D: public Texture +class Texture3D: public Texture3DBackend { + friend Texture3DBackend; + public: class Loader: public Msp::DataFile::DerivedObjectLoader { @@ -33,9 +35,8 @@ protected: unsigned height; unsigned depth; unsigned levels; - unsigned allocated; - Texture3D(GLenum); + Texture3D(unsigned); public: Texture3D(); @@ -46,10 +47,6 @@ public: it can't be changed. */ void storage(PixelFormat fmt, unsigned wd, unsigned ht, unsigned dp, unsigned lv = 0); - /** Allocates storage for the texture. The contents are initially - undefined. If storage has already been allocated, does nothing. */ - void allocate(unsigned level); - /** Updates the contents of the entire texture. Storage must be defined beforehand. The image data must have dimensions and format matching the defined storage. */