X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexturecube.h;h=8d87c410d2f91e98032bc1ce47be5cad8a804f44;hb=804ad5d99c575b92e9d47421947e963a44f7a905;hp=0d23884f1458626b954f2a6badd871d38ff9026f;hpb=fac4decfa4744ac6dc7f13c0348b0ec1ec80f6a4;p=libs%2Fgl.git diff --git a/source/texturecube.h b/source/texturecube.h index 0d23884f..8d87c410 100644 --- a/source/texturecube.h +++ b/source/texturecube.h @@ -1,6 +1,7 @@ #ifndef MSP_GL_TEXTURECUBE_H_ #define MSP_GL_TEXTURECUBE_H_ +#include #include "datatype.h" #include "pixelformat.h" #include "texture.h" @@ -33,6 +34,17 @@ Requires OpenGL version 1.3. */ class TextureCube: public Texture { +public: + class Loader: public Msp::DataFile::DerivedObjectLoader + { + public: + Loader(TextureCube &); + private: + void image_data(TextureCubeFace, const std::string &); + void raw_data(TextureCubeFace, const std::string &); + void storage(PixelFormat, unsigned); + }; + private: PixelFormat ifmt; unsigned size; @@ -64,6 +76,8 @@ public: int x, int y, unsigned w, unsigned h, PixelFormat fmt, DataType type, const void *data); + void image(TextureCubeFace, const Graphics::Image &); + unsigned get_size() const { return size; } private: unsigned get_level_size(unsigned); @@ -86,6 +100,8 @@ public: Vector3 get_texel_direction(TextureCubeFace, unsigned, unsigned); }; +void operator>>(const LexicalConverter &, TextureCubeFace &); + } // namespace GL } // namespace Msp