Changed order of includes, uint32_t as index for Geometry::GetIndex(), minor changes
This commit is contained in:
@@ -154,11 +154,11 @@ namespace OpenVulkano::Scene
|
||||
indices = nullptr;
|
||||
}
|
||||
|
||||
uint32_t Geometry::GetIndex(int index) const
|
||||
uint32_t Geometry::GetIndex(uint32_t index) const
|
||||
{
|
||||
uint32_t result = 0;
|
||||
|
||||
if (index >= indexCount)
|
||||
if (index >= indexCount) [[unlikely]]
|
||||
throw std::out_of_range("Index is out of range");
|
||||
|
||||
if (indexType == OpenVulkano::Scene::VertexIndexType::UINT16)
|
||||
@@ -171,10 +171,6 @@ namespace OpenVulkano::Scene
|
||||
uint32_t* indices = GetIndices32();
|
||||
result = indices[index];
|
||||
}
|
||||
else
|
||||
{
|
||||
throw std::runtime_error("Invalid geometry index type");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user