1 #ifndef MSP_GL_TEXTURE_BACKEND_H_
2 #define MSP_GL_TEXTURE_BACKEND_H_
4 #include <msp/core/noncopyable.h>
9 class OpenGLTexture: public NonCopyable
11 friend class OpenGLFramebuffer;
12 friend class OpenGLPipelineState;
17 std::string debug_name;
19 static OpenGLTexture *scratch_binding;
21 OpenGLTexture(unsigned);
25 void require_swizzle();
27 void set_parameter_i(unsigned, int) const;
29 void generate_mipmap();
31 void set_debug_name(const std::string &);
34 static void unbind_scratch();
37 using TextureBackend = OpenGLTexture;