]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/texture2d_backend.h
Move all OpenGL-specific code to a separate directory
[libs/gl.git] / source / backends / opengl / texture2d_backend.h
diff --git a/source/backends/opengl/texture2d_backend.h b/source/backends/opengl/texture2d_backend.h
new file mode 100644 (file)
index 0000000..8f2fec5
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef MSP_GL_TEXTURE2D_BACKEND_H_
+#define MSP_GL_TEXTURE2D_BACKEND_H_
+
+#include "texture.h"
+
+namespace Msp {
+namespace GL {
+
+class Buffer;
+
+class OpenGLTexture2D: public Texture
+{
+protected:
+       class AsyncLoader;
+
+       OpenGLTexture2D(ResourceManager *);
+
+       void allocate();
+       void sub_image(unsigned, int, int, unsigned, unsigned, const void *);
+       void sub_image(unsigned, int, int, unsigned, unsigned, const Buffer &, unsigned);
+
+       Resource::AsyncLoader *create_async_loader(IO::Seekable &);
+       void unload();
+};
+
+using Texture2DBackend = OpenGLTexture2D;
+
+} // namespace GL
+} // namespace Msp
+
+#endif