KrisLibrary  1.0.0
GLTextureObject.h
1 #ifndef GL_TEXTURE_OBJECT
2 #define GL_TEXTURE_OBJECT
3 
4 #include <memory>
5 
6 namespace GLDraw {
7 
14 {
15 public:
18  ~GLTextureObject();
19 
20  operator bool() const { return !isNull(); }
21  void generate();
22  void cleanup();
23  void bind(unsigned int target) const;
24  void unbind(unsigned int target) const;
25  bool isNull() const;
26 
27 private:
28  std::shared_ptr<unsigned int> glName;
29 };
30 
31 } //namespace GLDraw
32 
33 #endif
Contains all definitions in the GLDraw package.
Definition: AnyGeometry.h:14
A GL texture object class. Simplifies allocating and cleaning up texture objects. Usually you only ne...
Definition: GLTextureObject.h:13