--- /dev/null
+#ifndef MSP_GL_TEXTURE_BACKEND_H_
+#define MSP_GL_TEXTURE_BACKEND_H_
+
+#include <msp/core/noncopyable.h>
+
+namespace Msp {
+namespace GL {
+
+class OpenGLTexture: public NonCopyable
+{
+ friend class OpenGLFramebuffer;
+ friend class OpenGLPipelineState;
+
+protected:
+ unsigned id;
+ unsigned target;
+ std::string debug_name;
+
+ static int swizzle_orders[];
+ static OpenGLTexture *scratch_binding;
+
+ OpenGLTexture(unsigned, bool);
+ ~OpenGLTexture();
+
+ void generate_id();
+ void require_swizzle();
+ void apply_swizzle();
+ void set_parameter_i(unsigned, int) const;
+
+ void generate_mipmap();
+
+ void set_debug_name(const std::string &);
+
+ void bind_scratch();
+ static void unbind_scratch();
+};
+
+using TextureBackend = OpenGLTexture;
+
+} // namespace GL
+} // namespace Msp
+
+#endif