initial commit

This commit is contained in:
2024-04-06 14:11:26 +02:00
commit 1d44ecc0ee
85 changed files with 11573 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#include "iwa/util/vertex_layout.hpp"
namespace iwa
{
mijin::Optional<VertexAttribute&> VertexLayout::findAttribute(VertexAttributeSemantic semantic, unsigned semanticIdx) noexcept
{
for (VertexAttribute& attribute : attributes)
{
if (attribute.semantic == semantic && attribute.semanticIdx == semanticIdx)
{
return attribute;
}
}
return mijin::NULL_OPTIONAL;
}
mijin::Optional<const VertexAttribute&> VertexLayout::findAttribute(VertexAttributeSemantic semantic, unsigned semanticIdx) const noexcept
{
for (const VertexAttribute& attribute : attributes)
{
if (attribute.semantic == semantic && attribute.semanticIdx == semanticIdx)
{
return attribute;
}
}
return mijin::NULL_OPTIONAL;
}
} // namespace iwa