moved CreateVertexAttribData(...) to PrimitiveCreater.cpp from VertexAttribData.cpp and then delete VertexAttribData.cpp
This commit is contained in:
parent
d4c1dd312e
commit
c1183d351d
@ -44,14 +44,6 @@ namespace hgl
|
||||
};//class VertexAttribData
|
||||
|
||||
using VAD=VertexAttribData;
|
||||
|
||||
/**
|
||||
* 根据格式要求,创建对应的顶点属性数据区(VAD)
|
||||
* @param vertex_count 顶点数量
|
||||
* @param vif 格式
|
||||
*/
|
||||
VAD *CreateVertexAttribData(const uint32_t vertex_count,const VertexInputFormat *vif);
|
||||
//这个函数比较重要,就不搞成CreateVAD的简写了
|
||||
}//namespace graph
|
||||
}//namespace hgl
|
||||
#endif//HGL_GRAPH_VERTEX_ATTRIB_DATA_INCLUDE
|
||||
|
@ -8,8 +8,7 @@ SET(SG_TEXTURE_SOURCE ${SG_INCLUDE_PATH}/TextureLoader.h
|
||||
SOURCE_GROUP("Texture" FILES ${SG_TEXTURE_SOURCE})
|
||||
|
||||
SET(SG_VAD_SOURCE ${SG_INCLUDE_PATH}/VertexAttribData.h
|
||||
${SG_INCLUDE_PATH}/VertexAttribDataAccess.h
|
||||
VertexAttribData.cpp)
|
||||
${SG_INCLUDE_PATH}/VertexAttribDataAccess.h)
|
||||
|
||||
SOURCE_GROUP("VertexAttribData" FILES ${SG_VAD_SOURCE})
|
||||
|
||||
|
@ -1,10 +1,26 @@
|
||||
#include<hgl/graph/PrimitiveCreater.h>
|
||||
#include<hgl/graph/PrimitiveCreater.h>
|
||||
#include<hgl/graph/VKShaderModule.h>
|
||||
|
||||
namespace hgl
|
||||
{
|
||||
namespace graph
|
||||
{
|
||||
/**
|
||||
* 根据格式要求,创建对应的顶点属性数据区(VAD)
|
||||
* @param vertex_count 顶点数量
|
||||
* @param vif 格式
|
||||
*/
|
||||
VAD *CreateVertexAttribData(const uint32_t vertex_count,const VertexInputFormat *vif)
|
||||
{
|
||||
if(vertex_count<=0
|
||||
||vif->vec_size<1||vif->vec_size>4
|
||||
||vif->stride<1||vif->stride>8*4
|
||||
||!CheckVulkanFormat(vif->format))
|
||||
return(nullptr);
|
||||
|
||||
return(new VertexAttribData(vertex_count,vif->format,vif->stride*vertex_count));
|
||||
}
|
||||
|
||||
PrimitiveCreater::PrimitiveCreater(RenderResource *sdb,const VIL *v)
|
||||
{
|
||||
db =sdb;
|
||||
|
@ -1,19 +0,0 @@
|
||||
#include<hgl/graph/VertexAttribData.h>
|
||||
#include<hgl/graph/VKVertexInputFormat.h>
|
||||
|
||||
namespace hgl
|
||||
{
|
||||
namespace graph
|
||||
{
|
||||
VAD *CreateVertexAttribData(const uint32_t vertex_count,const VertexInputFormat *vif)
|
||||
{
|
||||
if(vertex_count<=0
|
||||
||vif->vec_size<1||vif->vec_size>4
|
||||
||vif->stride<1||vif->stride>8*4
|
||||
||!CheckVulkanFormat(vif->format))
|
||||
return(nullptr);
|
||||
|
||||
return(new VertexAttribData(vertex_count,vif->format,vif->stride*vertex_count));
|
||||
}
|
||||
}//namespace graph
|
||||
}//namespace hgl
|
Loading…
x
Reference in New Issue
Block a user