2020-07-16 20:36:54 +08:00
|
|
|
#include<hgl/graph/VertexAttribData.h>
|
|
|
|
|
|
|
|
namespace hgl
|
|
|
|
{
|
|
|
|
namespace graph
|
|
|
|
{
|
2021-11-29 20:12:10 +08:00
|
|
|
VAD *CreateVertexAttribData(const uint32_t vertex_count,const VkFormat fmt,const int vec_size,const uint stride)
|
2020-07-16 20:36:54 +08:00
|
|
|
{
|
2021-11-30 15:01:55 +08:00
|
|
|
if(vertex_count<=0
|
2021-11-29 20:12:10 +08:00
|
|
|
||vec_size<1||vec_size>4
|
|
|
|
||stride<1||stride>8*4
|
2021-11-30 15:01:55 +08:00
|
|
|
||!CheckVulkanFormat(fmt))
|
2020-07-16 20:36:54 +08:00
|
|
|
return(nullptr);
|
|
|
|
|
2021-11-29 20:12:10 +08:00
|
|
|
return(new VertexAttribData(vertex_count,vec_size,stride,fmt));
|
2020-07-16 20:36:54 +08:00
|
|
|
}
|
|
|
|
}//namespace graph
|
2020-07-20 17:30:27 +08:00
|
|
|
}//namespace hgl
|