initial commit
This commit is contained in:
29
source/util/vertex_layout.cpp
Normal file
29
source/util/vertex_layout.cpp
Normal 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
|
||||
Reference in New Issue
Block a user