]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/pipelinestate_backend.h
Add support for padding in vertex formats
[libs/gl.git] / source / backends / opengl / pipelinestate_backend.h
1 #ifndef MSP_GL_PIPELINESTATE_BACKEND_H_
2 #define MSP_GL_PIPELINESTATE_BACKEND_H_
3
4 #include <vector>
5 #include <msp/core/noncopyable.h>
6
7 namespace Msp {
8 namespace GL {
9
10 class OpenGLPipelineState: public NonCopyable
11 {
12         friend class OpenGLCommands;
13
14 protected:
15         static const OpenGLPipelineState *last_applied;
16         static std::vector<int> bound_tex_targets;
17         static std::vector<char> bound_uniform_blocks;
18         static unsigned restart_index;
19         static unsigned n_clip_distances;
20
21         OpenGLPipelineState();
22         OpenGLPipelineState(OpenGLPipelineState &&) { }
23         ~OpenGLPipelineState();
24
25         void apply() const;
26 private:
27         void apply(unsigned) const;
28 protected:
29         static void clear();
30 };
31
32 using PipelineStateBackend = OpenGLPipelineState;
33
34 } // namespace GL
35 } // namespace Msp
36
37 #endif