Improve pipeline building

This commit is contained in:
Lynix
2020-03-03 22:26:57 +01:00
parent d5c75926c6
commit 7bf734cdd4
16 changed files with 360 additions and 217 deletions

View File

@@ -67,7 +67,7 @@ namespace Nz
return GetComponentByType<T>(vertexComponent, componentIndex) != nullptr;
}
const VertexDeclarationRef& VertexDeclaration::Get(VertexLayout layout)
inline const VertexDeclarationRef& VertexDeclaration::Get(VertexLayout layout)
{
NazaraAssert(layout <= VertexLayout_Max, "Vertex layout out of enum");
@@ -84,4 +84,19 @@ namespace Nz
}
}
namespace std
{
inline const Nz::VertexDeclaration::Component* begin(const Nz::VertexDeclaration& declaration)
{
assert(declaration.GetComponentCount() != 0);
return &declaration.GetComponent(0);
}
inline const Nz::VertexDeclaration::Component* end(const Nz::VertexDeclaration& declaration)
{
assert(declaration.GetComponentCount() != 0);
return (&declaration.GetComponent(declaration.GetComponentCount() - 1) + 1);
}
}
#include <Nazara/Utility/DebugOff.hpp>