UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
textureunit.h
Go to the documentation of this file.
1 #ifndef UGDK_GRAPHIC_TEXTUREUNIT_H_
2 #define UGDK_GRAPHIC_TEXTUREUNIT_H_
3 
4 #include <ugdk/graphic.h>
5 #include <ugdk/structure/types.h>
6 
7 namespace ugdk {
8 namespace graphic {
9 
10 class TextureUnit final {
11  public:
12  // FIXME: remove this when SWIG stops breaking
13  TextureUnit();
14  TextureUnit(const TextureUnit&) = delete;
16  ~TextureUnit();
17 
18  void BindTexture(const graphic::GLTexture* texture);
19 
20  int id() const { return id_; }
21  const graphic::GLTexture* texture() const { return texture_; }
22 
23  private:
24  TextureUnit(unsigned int);
25 
26  int id_;
27  const graphic::GLTexture* texture_;
28 
29  friend class ::ugdk::graphic::Manager;
30 };
31 
32 } // namespace graphic
33 } // namespace ugdk
34 
35 #endif // UGDK_GRAPHIC_TEXTUREUNIT_H_
Definition: textureunit.h:10
Definition: animation.h:11
void BindTexture(const graphic::GLTexture *texture)
const graphic::GLTexture * texture() const
Definition: textureunit.h:21
int id() const
Definition: textureunit.h:20