#include <string>
#include <msp/linal/vector.h>
-#include "texture.h"
+#include "texture3d_backend.h"
namespace Msp {
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<Texture3D, Texture::Loader>
{
};
protected:
- unsigned width;
- unsigned height;
- unsigned depth;
- unsigned levels;
+ unsigned width = 0;
+ unsigned height = 0;
+ unsigned depth = 0;
+ unsigned levels = 0;
- Texture3D(GLenum);
+ Texture3D(unsigned);
public:
- Texture3D();
+ Texture3D() = default;
/** Defines storage structure for the texture. If lv is zero, the number
of mipmap levels is automatically determined from storage dimensions.