]> git.tdb.fi Git - libs/gl.git/blob - source/texture3d.h
Use DevIL for loading images
[libs/gl.git] / source / texture3d.h
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GL_TEXTURE3D_H_
9 #define MSP_GL_TEXTURE3D_H_
10
11 #include <string>
12 #include "pixelformat.h"
13 #include "texture.h"
14
15 namespace Msp {
16 namespace GL {
17
18 class Texture3D: public Texture
19 {
20 private:
21         PixelFormat ifmt;
22         sizei width;
23         sizei height;
24         sizei depth;
25         int border;
26
27 public:
28         Texture3D();
29         void storage(PixelFormat, sizei, sizei, sizei, int);
30         void image(int, PixelFormat, GLenum, const void *);
31         void sub_image(int, int, int, sizei, sizei, sizei, PixelFormat, GLenum, const void *);
32         void load_image(const std::string &fn, int dp=-1);
33         sizei get_width() const { return width; }
34         sizei get_height() const { return height; }
35         sizei get_depth() const { return depth; }
36 };
37
38 } // namespace GL
39 } // namespace Msp
40
41 #endif