]> git.tdb.fi Git - libs/gl.git/blob - source/backends/opengl/commands_backend.h
Initial implementation of Vulkan backend
[libs/gl.git] / source / backends / opengl / commands_backend.h
1 #ifndef MSP_GL_COMMANDS_BACKEND_H_
2 #define MSP_GL_COMMANDS_BACKEND_H_
3
4 namespace Msp {
5 namespace GL {
6
7 class Batch;
8 union ClearValue;
9 class Framebuffer;
10 class PipelineState;
11 class QueryPool;
12
13 class OpenGLCommands
14 {
15 protected:
16         const PipelineState *pipeline_state = 0;
17
18         OpenGLCommands() = default;
19
20         void begin_frame(unsigned) { }
21         void submit_frame();
22
23         void use_pipeline(const PipelineState *);
24         void clear(const ClearValue *);
25         void draw(const Batch &);
26         void draw_instanced(const Batch &, unsigned);
27         void resolve_multisample(Framebuffer &);
28
29         void begin_query(const QueryPool &, unsigned);
30         void end_query(const QueryPool &, unsigned);
31 };
32
33 using CommandsBackend = OpenGLCommands;
34
35 } // namespace GL
36 } // namespace Msp
37
38 #endif
39