fix RenderableCreater and VertexAttribData, VertexAttribDataAccess..... and then test CreateRenderableRectangle passed.
This commit is contained in:
@@ -16,7 +16,6 @@ namespace hgl
|
||||
protected:
|
||||
|
||||
const uint32_t dc_num; ///<每个数据成员数(比如二维坐标为2、三维坐标为3)
|
||||
const uint32_t comp_stride; ///<单个成员数据字节数
|
||||
uint32_t count; ///<数据个数
|
||||
|
||||
const uint32_t stride; ///<每组数据字节数
|
||||
@@ -26,7 +25,7 @@ namespace hgl
|
||||
|
||||
public:
|
||||
|
||||
VertexAttribData(uint32_t c,uint32_t dc,uint32_t cs,VkFormat fmt):count(c),dc_num(dc),comp_stride(cs),stride(dc*cs),total_bytes(dc*cs*c),vk_format(fmt)
|
||||
VertexAttribData(uint32_t c,uint32_t dc,uint32_t cs,VkFormat fmt):count(c),dc_num(dc),stride(cs),total_bytes(cs*c),vk_format(fmt)
|
||||
{
|
||||
mem_data = hgl_malloc(total_bytes); //在很多情况下,hgl_malloc分配的内存是对齐的,这样有效率上的提升
|
||||
}
|
||||
@@ -38,7 +37,6 @@ namespace hgl
|
||||
}
|
||||
|
||||
const VkFormat GetVulkanFormat ()const{return vk_format;} ///<取得数据类型
|
||||
const uint32_t GetDataBytes ()const{return comp_stride;} ///<取得每数据字节数
|
||||
const uint32_t GetComponent ()const{return dc_num;} ///<取数缓冲区元数据数量
|
||||
const uint32_t GetCount ()const{return count;} ///<取得数据数量
|
||||
const uint32_t GetStride ()const{return stride;} ///<取得每一组数据字节数
|
||||
|
Reference in New Issue
Block a user