Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
VulkanMaterial.hpp
1/*
2Copyright (C) 2017-2019,2021,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGAMES_VULKANMATERIAL_HPP
17#define AEONGAMES_VULKANMATERIAL_HPP
18#include <cstdint>
19#include <string>
20#include <vector>
21#include <vulkan/vulkan.h>
22#include <memory>
23#include "aeongames/Pipeline.hpp"
24#include "aeongames/Material.hpp"
25#include "VulkanBuffer.hpp"
26
27namespace AeonGames
28{
29 class VulkanRenderer;
30 class VulkanTexture;
31 class VulkanPipeline;
34 {
35 public:
37 VulkanMaterial ( VulkanRenderer& aVulkanRenderer, const Material& aMaterial );
38 VulkanMaterial ( const VulkanMaterial& aMaterial ) = delete;
39 VulkanMaterial& operator= ( const VulkanMaterial& aMaterial ) = delete;
40 VulkanMaterial& operator= ( VulkanMaterial&& ) = delete;
42 VulkanMaterial ( VulkanMaterial&& aVulkanMaterial );
45 void Bind ( VkCommandBuffer aVkCommandBuffer, const VulkanPipeline& aVulkanPipeline ) const;
46 private:
47 VulkanRenderer& mVulkanRenderer;
48 const Material* mMaterial{nullptr};
49 void Finalize ();
50 VkDescriptorPool mVkDescriptorPool{VK_NULL_HANDLE};
51 VkDescriptorSet mUniformDescriptorSet{VK_NULL_HANDLE};
52 VkDescriptorSet mSamplerDescriptorSet{VK_NULL_HANDLE};
53 VulkanBuffer mUniformBuffer;
54 };
55}
56#endif
Represents a surface material with uniform properties and texture samplers.
Definition Material.hpp:38
Vulkan GPU buffer wrapper implementing the Buffer interface.
VulkanMaterial(VulkanRenderer &aVulkanRenderer, const Material &aMaterial)
Construct from a renderer and material resource.
void Bind(VkCommandBuffer aVkCommandBuffer, const VulkanPipeline &aVulkanPipeline) const
Bind material descriptor sets to a command buffer for the given pipeline.
Vulkan graphics pipeline with descriptor set and push constant reflection.
Vulkan rendering backend implementing the Renderer interface.
Vulkan texture resource wrapper with image and descriptor management.
<- This is here just for the literals
Definition AABB.hpp:31