Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
VulkanMesh.hpp
1/*
2Copyright (C) 2017,2018,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_VULKANMESH_HPP
17#define AEONGAMES_VULKANMESH_HPP
18
19#include <vulkan/vulkan.h>
20#include "aeongames/Mesh.hpp"
21#include "VulkanBuffer.hpp"
22
23namespace AeonGames
24{
25 class VulkanRenderer;
28 {
29 public:
31 VulkanMesh ( const VulkanRenderer& aVulkanRenderer, const Mesh& aMesh );
34 VulkanMesh ( VulkanMesh&& aVulkanMesh );
35 VulkanMesh ( const VulkanMesh& aVulkanMesh ) = delete;
36 VulkanMesh& operator= ( const VulkanMesh& aVulkanMesh ) = delete;
37 VulkanMesh& operator= ( VulkanMesh&& aVulkanMesh ) = delete;
39 void Bind ( VkCommandBuffer aVkCommandBuffer ) const;
40 private:
41 const VulkanRenderer& mVulkanRenderer;
42 const Mesh* mMesh{nullptr};
43 VulkanBuffer mMeshBuffer;
44 };
45}
46#endif
Represents a polygon mesh with vertex attributes and index data.
Definition Mesh.hpp:31
Vulkan GPU buffer wrapper implementing the Buffer interface.
void Bind(VkCommandBuffer aVkCommandBuffer) const
Bind the mesh vertex and index buffers to a command buffer.
VulkanMesh(const VulkanRenderer &aVulkanRenderer, const Mesh &aMesh)
Construct from a renderer and mesh resource.
Vulkan rendering backend implementing the Renderer interface.
<- This is here just for the literals
Definition AABB.hpp:31