]> git.tdb.fi Git - libs/gl.git/blob - source/texture3d.h
Drop Id tags and copyright notices from files
[libs/gl.git] / source / texture3d.h
1 #ifndef MSP_GL_TEXTURE3D_H_
2 #define MSP_GL_TEXTURE3D_H_
3
4 #include <string>
5 #include "datatype.h"
6 #include "pixelformat.h"
7 #include "texture.h"
8
9 namespace Msp {
10 namespace GL {
11
12 class Texture3D: public Texture
13 {
14 private:
15         PixelFormat ifmt;
16         unsigned width;
17         unsigned height;
18         unsigned depth;
19         unsigned allocated;
20
21 public:
22         Texture3D();
23         void storage(PixelFormat, unsigned, unsigned, unsigned);
24         void allocate(unsigned);
25         void image(unsigned, PixelFormat, DataType, const void *);
26         void sub_image(unsigned, int, int, int, unsigned, unsigned, unsigned, PixelFormat, DataType, const void *);
27         void load_image(const std::string &fn, int dp = -1);
28         unsigned get_width() const { return width; }
29         unsigned get_height() const { return height; }
30         unsigned get_depth() const { return depth; }
31 private:
32         void require_storage();
33         void get_level_size(unsigned, unsigned &, unsigned &, unsigned &);
34 };
35
36 } // namespace GL
37 } // namespace Msp
38
39 #endif