]> git.tdb.fi Git - libs/gl.git/blob - source/backends/vulkan/renderer_backend.h
Annotate uniforms with descriptor set layout qualifiers
[libs/gl.git] / source / backends / vulkan / renderer_backend.h
1 #ifndef MSP_GL_RENDERER_BACKEND_H_
2 #define MSP_GL_RENDERER_BACKEND_H_
3
4 #include <msp/core/noncopyable.h>
5 #include "commands.h"
6 #include "pipelinestate.h"
7
8 namespace Msp {
9 namespace GL {
10
11 class VulkanRenderer: public NonCopyable
12 {
13 protected:
14         std::map<std::uintptr_t, PipelineState> pipeline_states;
15         PipelineState *current_pipeline = 0;
16         Semaphore *begin_semaphore = 0;
17         Semaphore *end_semaphore = 0;
18
19         VulkanRenderer();
20
21         void begin();
22         void begin(Semaphore &);
23
24         void end();
25         void end(Semaphore &);
26
27         void set_pipeline_key(std::uintptr_t);
28         PipelineState &get_pipeline_state() { return *current_pipeline; }
29 };
30
31 using RendererBackend = VulkanRenderer;
32
33 } // namespace GL
34 } // namespace Msp
35
36 #endif