X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture1d.h;fp=source%2Ftexture1d.h;h=9957eeb466fedab882f10e84df69e46d2f9b55d2;hp=0000000000000000000000000000000000000000;hb=744dced516f11d072dc6176fdf2df7e464b9782e;hpb=22455b5c64c0319fcafff1d6106b26d1f8da5263 diff --git a/source/texture1d.h b/source/texture1d.h new file mode 100644 index 00000000..9957eeb4 --- /dev/null +++ b/source/texture1d.h @@ -0,0 +1,33 @@ +#ifndef MSP_GL_TEXTURE1D_H_ +#define MSP_GL_TEXTURE1D_H_ + +#include "datatype.h" +#include "pixelformat.h" +#include "texture.h" + +namespace Msp { +namespace GL { + +class Texture1D: public Texture +{ +private: + PixelFormat ifmt; + unsigned width; + unsigned allocated; + +public: + Texture1D(); + + void storage(PixelFormat, unsigned); + void allocate(unsigned); + void image(unsigned, PixelFormat, DataType, const void *); + unsigned get_width() const { return width; } + +private: + unsigned get_level_size(unsigned); +}; + +} // namespace GL +} // namespace Msp + +#endif