SP3-237 Added header data type into mesh asset in preparation for compilation of mesh
This commit is contained in:
parent
cb73a8c5d1
commit
a8a2e90c26
|
@ -5,8 +5,19 @@
|
|||
|
||||
namespace SHADE
|
||||
{
|
||||
struct SHMeshAssetHeader
|
||||
{
|
||||
uint32_t vertexCount;
|
||||
uint32_t indexCount;
|
||||
};
|
||||
|
||||
struct SHMeshAsset
|
||||
{
|
||||
bool compiled;
|
||||
bool changed;
|
||||
|
||||
SHMeshAssetHeader header;
|
||||
|
||||
std::vector<SHVec3> vertexPosition;
|
||||
std::vector<SHVec2> texCoords;
|
||||
std::vector<SHVec3> vertexTangent;
|
||||
|
|
|
@ -24,7 +24,11 @@ namespace SHADE
|
|||
{
|
||||
(void)scene;
|
||||
|
||||
SHMeshAsset result;
|
||||
SHMeshAsset result
|
||||
{
|
||||
.compiled = false,
|
||||
.changed = false
|
||||
};
|
||||
|
||||
for (size_t i{0}; i < mesh.mNumVertices; ++i)
|
||||
{
|
||||
|
@ -74,6 +78,9 @@ namespace SHADE
|
|||
}
|
||||
}
|
||||
|
||||
result.header.vertexCount = result.vertexPosition.size();
|
||||
result.header.indexCount = result.indices.size();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue