X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Ftexturecube.h;h=e5a0d04f554f6586f5a3552b96c039bb21bccce1;hb=f2bb1caa233930e1148613e9d5daa2c29b0fe271;hp=8bb5cf43131f101fb5089b7913d091a510ada681;hpb=24b24e2203c776aacd9744bb947f5cf47b03d328;p=libs%2Fgl.git diff --git a/source/core/texturecube.h b/source/core/texturecube.h index 8bb5cf43..e5a0d04f 100644 --- a/source/core/texturecube.h +++ b/source/core/texturecube.h @@ -2,7 +2,7 @@ #define MSP_GL_TEXTURECUBE_H_ #include -#include "texture.h" +#include "texturecube_backend.h" #include "vector.h" namespace Msp { @@ -30,8 +30,10 @@ All faces of a cube map texture must be allocated for it to be usable. Requires OpenGL version 1.3. */ -class TextureCube: public Texture +class TextureCube: public TextureCubeBackend { + friend TextureCubeBackend; + public: class Loader: public Msp::DataFile::DerivedObjectLoader { @@ -49,15 +51,13 @@ public: }; private: - unsigned size; - unsigned levels; + unsigned size = 0; + unsigned levels = 0; static const Vector3 directions[6]; static const unsigned orientations[12]; public: - TextureCube(); - /** Defines storage structure for the texture. If lv is zero, the number of mipmap levels is automatically determined from storage dimensions. @@ -78,7 +78,6 @@ public: void image(TextureCubeFace, const Graphics::Image &); virtual void image(const Graphics::Image &, unsigned = 0); - using Texture::image; unsigned get_size() const { return size; } private: @@ -103,8 +102,6 @@ public: virtual void unload() { } }; -unsigned get_gl_cube_face(TextureCubeFace); - void operator>>(const LexicalConverter &, TextureCubeFace &); } // namespace GL