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 int swizzle_orders[];
20 static OpenGLTexture *scratch_binding;
22 OpenGLTexture(unsigned, bool);
26 void require_swizzle();
28 void set_parameter_i(unsigned, int) const;
30 void generate_mipmap();
32 void set_debug_name(const std::string &);
35 static void unbind_scratch();
38 using TextureBackend = OpenGLTexture;