Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
Mesh3dAsset.hpp
1#pragma once
2
3#include <vector>
4#include <filesystem>
5#include "EngineCore/ECS/Entity.hpp"
6#include "EngineCore/Assets/Asset.hpp"
7#include "Common/ResourcePipeline/Uuid.hpp"
8
9namespace Grindstone {
10 namespace GraphicsAPI {
11 class VertexArrayObject;
12 }
13
14 enum class VertexBuffers {
15 Vertex = 0,
16 Normal,
17 Tangent,
18 TexCoord,
19 Last
20 };
21
22 struct Mesh3dAsset : public Asset {
23 Mesh3dAsset(Uuid uuid, std::string_view name) : Asset(uuid, name) {}
24 struct Submesh {
25 uint32_t indexCount = 0;
26 uint32_t baseVertex = 0;
27 uint32_t baseIndex = 0;
28 uint32_t materialIndex = UINT32_MAX;
29 GraphicsAPI::VertexArrayObject* vertexArrayObject = nullptr;
30 };
31
32 GraphicsAPI::VertexArrayObject* vertexArrayObject = nullptr;
33 std::vector<Submesh> submeshes;
34
35 DEFINE_ASSET_TYPE("Mesh3dAsset", AssetType::Mesh3d)
36 };
37}
Definition VertexArrayObject.hpp:10
Definition Uuid.hpp:6
Definition Asset.hpp:18
Definition Mesh3dAsset.hpp:24
Definition Mesh3dAsset.hpp:22