Aeon Engine
c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
VulkanMaterial.hpp
1
/*
2
Copyright (C) 2017-2019,2021,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4
Licensed under the Apache License, Version 2.0 (the "License");
5
you may not use this file except in compliance with the License.
6
You may obtain a copy of the License at
7
8
http://www.apache.org/licenses/LICENSE-2.0
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations 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
27
namespace
AeonGames
28
{
29
class
VulkanRenderer
;
30
class
VulkanTexture
;
31
class
VulkanPipeline
;
33
class
VulkanMaterial
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 );
43
~VulkanMaterial
();
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
AeonGames::Material
Represents a surface material with uniform properties and texture samplers.
Definition
Material.hpp:38
AeonGames::VulkanBuffer
Vulkan GPU buffer wrapper implementing the Buffer interface.
Definition
VulkanBuffer.hpp:26
AeonGames::VulkanMaterial::VulkanMaterial
VulkanMaterial(VulkanRenderer &aVulkanRenderer, const Material &aMaterial)
Construct from a renderer and material resource.
Definition
VulkanMaterial.cpp:48
AeonGames::VulkanMaterial::Bind
void Bind(VkCommandBuffer aVkCommandBuffer, const VulkanPipeline &aVulkanPipeline) const
Bind material descriptor sets to a command buffer for the given pipeline.
Definition
VulkanMaterial.cpp:221
AeonGames::VulkanPipeline
Vulkan graphics pipeline with descriptor set and push constant reflection.
Definition
VulkanPipeline.hpp:35
AeonGames::VulkanRenderer
Vulkan rendering backend implementing the Renderer interface.
Definition
VulkanRenderer.hpp:42
AeonGames::VulkanTexture
Vulkan texture resource wrapper with image and descriptor management.
Definition
VulkanTexture.hpp:31
AeonGames
<- This is here just for the literals
Definition
AABB.hpp:31
engine
renderers
vulkan
VulkanMaterial.hpp
Generated by
1.16.1