ULRE/src/SceneGraph/VertexAttribData.cpp
2020-10-21 12:47:06 +08:00

18 lines
450 B
C++

#include<hgl/graph/VertexAttribData.h>
namespace hgl
{
namespace graph
{
VAD *CreateVertexAttribData(const VertexAttribType *type,const uint32_t vertex_count)
{
if(!type||!type->Check())
return(nullptr);
VkFormat fmt=GetVulkanFormat(type);
return(new VertexAttribData(vertex_count,type->vec_size,type->GetStride(),fmt));
}
}//namespace graph
}//namespace hgl