fixed draw_triangle_in_NDC sample and other about codes.

This commit is contained in:
2024-05-31 22:04:02 +08:00
parent 90152ca74e
commit 611a9fe61d
7 changed files with 19 additions and 13 deletions

View File

@@ -176,7 +176,7 @@ public:
void BindIBO(IndexBuffer *,const VkDeviceSize byte_offset=0);
bool BindRenderBuffer(const PrimitiveDataBuffer *);
bool BindDataBuffer(const PrimitiveDataBuffer *);
void SetViewport (uint32_t first,uint32_t count,const VkViewport *vp) {vkCmdSetViewport(cmd_buf,first,count,vp);}
void SetScissor (uint32_t first,uint32_t count,const VkRect2D *sci) {vkCmdSetScissor(cmd_buf,first,count,sci);}

View File

@@ -22,7 +22,7 @@ struct PrimitiveDataBuffer
// 另一种是使用VDM为了批量渲染所有的VAB又必须对齐所以每个VAB单独指定offset也不可行。
// 所以干脆不支持VAB的offset只支持vertexOffset。
// uint32_t * vab_offset; //注意这里的offset是相对于vertex的代表第几个顶点不是字节偏移
VkDeviceSize * vab_offset; //注意这里的offset是相对于vertex的代表第几个顶点不是字节偏移
// IndexBuffer 同理也不再支持buffer的offset