]> git.tdb.fi Git - libs/gl.git/blob - source/texture1d.h
Enable resource management on Texture2D
[libs/gl.git] / source / texture1d.h
1 #ifndef MSP_GL_TEXTURE1D_H_
2 #define MSP_GL_TEXTURE1D_H_
3
4 #include "datatype.h"
5 #include "pixelformat.h"
6 #include "texture.h"
7
8 namespace Msp {
9 namespace GL {
10
11 class Texture1D: public Texture
12 {
13 private:
14         PixelFormat ifmt;
15         unsigned width;
16         unsigned allocated;
17
18 public:
19         Texture1D();
20
21         void storage(PixelFormat, unsigned);
22         void allocate(unsigned);
23         void image(unsigned, PixelFormat, DataType, const void *);
24         unsigned get_width() const { return width; }
25
26 private:
27         unsigned get_level_size(unsigned);
28
29 public:
30         virtual AsyncLoader *load(IO::Seekable &) { return 0; }
31         virtual void unload() { }
32 };
33
34 } // namespace GL
35 } // namespace Msp
36
37 #endif