54 virtual void Bind()
const override;
55 virtual void UnBind()
const override {}
66 virtual void AddVertexBuffer(
const std::shared_ptr<VertexBuffer>& vertexBuffer)
override;
76 virtual void SetIndexBuffer(
const std::shared_ptr<IndexBuffer>& indexBuffer)
override;
86 virtual void SetShader(std::shared_ptr<Shader> shader)
override;
98 virtual void SetMesh(std::shared_ptr<Mesh> mesh)
override;
107 virtual void SetMaterial(std::shared_ptr<Material> material)
override;
115 void CreateDescriptorSetLayout();
123 void CreatePipelineLayout();
131 void CreateGraphicsPipeline();
144 void CreateKarmaGuiGraphicsPipeline(VkRenderPass renderPassKG,
float windowKGWidth,
float windowKGHeight);
152 void CreateDescriptorPool();
163 void CreateDescriptorSets();
179 void GenerateVulkanVA();
189 void RecreateVulkanVA();
197 void CleanupPipeline();
204 void CleanupKarmaGuiGraphicsPipeline();
225 VkShaderModule CreateShaderModule(
const std::vector<uint32_t>& code);
228 VkPipeline GetGraphicsPipeline()
const {
return m_graphicsPipeline; }
229 VkPipeline GetKarmaGuiGraphicsPipeline()
const {
return m_graphicsPipelineKGWindow; }
230 VkPipelineLayout GetGraphicsPipelineLayout()
const {
return m_pipelineLayout; }
231 const std::shared_ptr<VulkanShader>& GetShader()
const {
return m_Shader; }
233 const std::shared_ptr<VulkanVertexBuffer>& GetVertexBuffer()
const {
return m_VertexBuffer; }
234 const std::vector<VkDescriptorSet>& GetDescriptorSets()
const {
return m_descriptorSets; }
236 virtual std::shared_ptr<Material>
GetMaterial()
const override {
return m_Materials.at(0); }
238 virtual void UpdateProcessAndSetReadyForSubmission()
const override;
242 virtual const std::vector<std::shared_ptr<VertexBuffer>>& GetVertexBuffers()
const override {
return m_VertexBuffers; }
243 virtual const VulkanIndexBuffer* GetIndexBuffer()
const override {
return m_IndexBuffer.get(); }
250 std::vector<std::shared_ptr<VertexBuffer>> m_VertexBuffers;
251 std::shared_ptr<VulkanVertexBuffer> m_VertexBuffer;
252 std::shared_ptr<VulkanIndexBuffer> m_IndexBuffer;
255 std::vector<std::shared_ptr<Material>> m_Materials;
256 std::vector<std::shared_ptr<VulkanShader>> m_Shaders;
257 std::shared_ptr<VulkanShader> m_Shader;
261 VkPipelineLayout m_pipelineLayout;
262 VkDescriptorSetLayout m_descriptorSetLayout;
264 VkPipeline m_graphicsPipeline;
265 VkPipeline m_graphicsPipelineKGWindow;
266 VkDescriptorPool m_descriptorPool;
267 std::vector<VkDescriptorSet> m_descriptorSets;
269 VkVertexInputBindingDescription m_bindingDescription{};
270 std::vector<VkVertexInputAttributeDescription> m_attributeDescriptions;
272 const VkPhysicalDeviceFeatures& m_SupportedDeviceFeatures;
A class, comprising of Mesh and Material substances along with relevant setup, for a renderable unit.
Definition VertexArray.h:25