supported uint8_index_type

This commit is contained in:
2024-04-19 00:40:51 +08:00
parent 2bc6246dc0
commit 8633a18e01
5 changed files with 54 additions and 1 deletions

View File

@@ -117,6 +117,9 @@ public: //Buffer相关
VBO * CreateVBO (VkFormat format, uint32_t count,const void *data, SharingMode sm=SharingMode::Exclusive);
VBO * CreateVBO (VkFormat format, uint32_t count, SharingMode sm=SharingMode::Exclusive){return CreateVBO(format,count,nullptr,sm);}
const IndexType GetIndexType(const VkDeviceSize &vertex_count)const; ///<求一个合适的索引类型
const bool CheckIndexType(const IndexType,const VkDeviceSize &vertex_count)const; ///<检测一个索引类型是否合适
IndexBuffer * CreateIBO (IndexType type, uint32_t count,const void * data, SharingMode sm=SharingMode::Exclusive);
IndexBuffer * CreateIBO8 ( uint32_t count,const void * data, SharingMode sm=SharingMode::Exclusive){return CreateIBO(IndexType::U8, count,(void *)data,sm);}
IndexBuffer * CreateIBO16 ( uint32_t count,const uint16 *data, SharingMode sm=SharingMode::Exclusive){return CreateIBO(IndexType::U16, count,(void *)data,sm);}