SimpleGL  1.1.0
A framework for platform independent rendering
batching_vk.hpp
Go to the documentation of this file.
1 
8 #ifndef BATCHING_VK_HPP
9 #define BATCHING_VK_HPP
10 
11 #include <SimpleGL_vk/SimpleGL_vk_Export.h>
12 
13 #include <vector>
14 
15 #include <SimpleGL/batching.hpp>
16 
17 #include "render_pass.hpp"
18 #include "graphics_pipeline.hpp"
19 #include "vertex_buffer.hpp"
20 #include "command_buffer.hpp"
21 #include "descriptor_set.hpp"
22 #include "texture_image.hpp"
23 
24 namespace sgl {
25 
31  class SIMPLEGL_VK_EXPORT BatchVK : public Batch {
32 
33  private:
35  static std::vector<uint8_t> vertexCode;
36 
38  static std::vector<uint8_t> fragmentCode;
39 
41  static TextureImage* defaultTexture;
42 
44  RenderPass* renderPass;
45 
47  GraphicsPipeline* graphicsPipeline;
48 
50  VertexBuffer* positionBuffer;
51 
53  VertexBuffer* colorBuffer;
54 
56  VertexBuffer* texCoordBuffer;
57 
59  VertexBuffer* normalBuffer;
60 
62  UniformBuffer* transformationBuffer;
63 
65  DescriptorSet* descriptorSet;
66 
68  CommandBuffer* commandBuffer;
69 
70  public:
77  BatchVK(int capacity = 1024 * 1024);
78 
80  ~BatchVK(void);
81 
83  void flush() override;
84  };
85 }
86 
87 #endif /* BATCHING_VK_HPP */
Generic namespace for the SimpleGL framework.
Definition: application.hpp:18
This class wraps a Vulkan command buffer.
This class wraps a Vulkan texture image.
This class wraps a Vulkan descriptor set.
This class wraps a Vulkan vertex buffer.
This class defines methods for batch rendering.
Definition: batching.hpp:26
This class is used for batch rendering with Vulkan.
Definition: batching_vk.hpp:31
This class wraps a Vulkan graphics pipeline.
This class wraps a Vulkan uniform buffer.
This class wraps a Vulkan render pass.
Definition: render_pass.hpp:22