]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/pipelinestate_backend.h
a8f2d306109109f440661b066410bb947973940f
[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 Device;
11
12 class OpenGLPipelineState: public NonCopyable
13 {
14         friend class OpenGLCommands;
15
16 protected:
17         mutable Device *applied_to = 0;
18         mutable unsigned changes = 0;
19
20         OpenGLPipelineState() = default;
21         OpenGLPipelineState(OpenGLPipelineState &&) { }
22         ~OpenGLPipelineState();
23
24         void apply() const;
25
26         static void clear();
27 };
28
29 using PipelineStateBackend = OpenGLPipelineState;
30
31 } // namespace GL
32 } // namespace Msp
33
34 #endif