]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/texture2d_backend.h
Move all OpenGL-specific code to a separate directory
[libs/gl.git] / source / backends / opengl / texture2d_backend.h
1 #ifndef MSP_GL_TEXTURE2D_BACKEND_H_
2 #define MSP_GL_TEXTURE2D_BACKEND_H_
3
4 #include "texture.h"
5
6 namespace Msp {
7 namespace GL {
8
9 class Buffer;
10
11 class OpenGLTexture2D: public Texture
12 {
13 protected:
14         class AsyncLoader;
15
16         OpenGLTexture2D(ResourceManager *);
17
18         void allocate();
19         void sub_image(unsigned, int, int, unsigned, unsigned, const void *);
20         void sub_image(unsigned, int, int, unsigned, unsigned, const Buffer &, unsigned);
21
22         Resource::AsyncLoader *create_async_loader(IO::Seekable &);
23         void unload();
24 };
25
26 using Texture2DBackend = OpenGLTexture2D;
27
28 } // namespace GL
29 } // namespace Msp
30
31 #endif