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