SimpleGL  1.1.0
A framework for platform independent rendering
command_buffer.hpp
Go to the documentation of this file.
1 
8 #ifndef COMMAND_BUFFER_HPP
9 #define COMMAND_BUFFER_HPP
10 
11 #include <SimpleGL_vk/SimpleGL_vk_Export.h>
12 
13 #include <vulkan/vulkan.h>
14 
15 #include "render_pass.hpp"
16 #include "graphics_pipeline.hpp"
17 #include "vertex_buffer.hpp"
18 #include "descriptor_set.hpp"
19 
20 namespace sgl {
21 
27  class SIMPLEGL_VK_EXPORT CommandPool {
28 
29  private:
31  VkCommandPool handle;
32 
33  public:
35  CommandPool(void);
36 
38  ~CommandPool(void);
39 
45  VkCommandPool getHandle();
46  };
47 
53  class SIMPLEGL_VK_EXPORT CommandBuffer {
54 
55  private:
57  VkCommandBuffer handle;
58 
59  public:
61  CommandBuffer(void);
62 
64  ~CommandBuffer(void);
65 
71  VkCommandBuffer getHandle();
72 
74  void begin();
75 
77  void end();
78 
84  void beginRenderPass(RenderPass* renderPass);
85 
87  void endRenderPass();
88 
94  void bindPipeline(GraphicsPipeline* pipeline);
95 
102  void bindVertexBuffer(VertexBuffer* vertexBuffer, uint32_t binding);
103 
111  void bindDescriptorSet(DescriptorSet* descriptorSet, GraphicsPipeline* graphicsPipeline, uint32_t binding);
112 
118  void draw(uint32_t vertexCount);
119 
121  void submit();
122  };
123 }
124 
125 #endif /* COMMAND_BUFFER_HPP */
Generic namespace for the SimpleGL framework.
Definition: application.hpp:18
This class wraps a Vulkan command buffer.
This class wraps a Vulkan command pool.
This class wraps a Vulkan descriptor set.
This class wraps a Vulkan vertex buffer.
This class wraps a Vulkan graphics pipeline.
This class wraps a Vulkan render pass.
Definition: render_pass.hpp:22