added InstanceTriangle example and few support.

This commit is contained in:
2022-06-24 16:28:22 +08:00
parent ea93dfcc86
commit 1e0e74da2f
5 changed files with 45 additions and 75 deletions

View File

@@ -158,8 +158,10 @@ public:
public: //draw
void Draw (const uint32_t vertex_count) {vkCmdDraw(cmd_buf,vertex_count,1,0,0);}
void DrawIndexed (const uint32_t index_count ) {vkCmdDrawIndexed(cmd_buf,index_count,1,0,0,0);}
void Draw (const uint32_t vertex_count) {vkCmdDraw(cmd_buf,vertex_count,1,0,0);}
void DrawIndexed (const uint32_t index_count ) {vkCmdDrawIndexed(cmd_buf,index_count,1,0,0,0);}
void Draw (const uint32_t vertex_count,const uint32_t instance_count) {vkCmdDraw(cmd_buf,vertex_count,instance_count,0,0);}
void DrawIndexed (const uint32_t index_count ,const uint32_t instance_count) {vkCmdDrawIndexed(cmd_buf,index_count,instance_count,0,0,0);}
template<typename ...ARGS> void Draw (ARGS...args) {vkCmdDraw(cmd_buf,args...);}
template<typename ...ARGS> void DrawIndexed (ARGS...args) {vkCmdDrawIndexed(cmd_buf,args...);}