]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/sampler_backend.h
Add support for padding in vertex formats
[libs/gl.git] / source / backends / opengl / sampler_backend.h
1 #ifndef MSP_GL_SAMPLER_BACKEND_H_
2 #define MSP_GL_SAMPLER_BACKEND_H_
3
4 #include <msp/core/noncopyable.h>
5
6 namespace Msp {
7 namespace GL {
8
9 class OpenGLSampler: public NonCopyable
10 {
11         friend class OpenGLPipelineState;
12
13 protected:
14         unsigned id = 0;
15
16         OpenGLSampler();
17         OpenGLSampler(OpenGLSampler &&);
18         ~OpenGLSampler();
19
20         static bool check_anisotropic(bool);
21
22         void update(unsigned) const;
23
24         void set_debug_name(const std::string &);
25 };
26
27 using SamplerBackend = OpenGLSampler;
28
29 unsigned get_gl_filter(unsigned);
30 unsigned get_gl_wrap(unsigned);
31
32 } // namespace GL
33 } // namespace Msp
34
35 #endif