]> git.sesse.net Git - nageru/blob - nageru/ref_counted_texture.h
Fix a comment typo.
[nageru] / nageru / ref_counted_texture.h
1 #ifndef _UNIQUE_TEXTURE_H
2 #define _UNIQUE_TEXTURE_H 1
3
4 // A wrapper around an OpenGL texture that is automatically deleted.
5 // Used only by ImageInput.
6
7 #include <epoxy/gl.h>
8 #include <memory>
9
10 struct TextureDeleter {
11         void operator() (GLuint *tex)
12         {
13                 glDeleteTextures(1, tex);
14                 delete tex;
15         }
16 };
17
18 typedef std::unique_ptr<GLuint, TextureDeleter> RefCountedTexture;
19
20 #endif  // !defined(_REF_COUNTED_TEXTURE)