Codes layout

This commit is contained in:
hyzboy 2020-07-20 17:31:33 +08:00
parent 5ef1d2bb75
commit 7eedffe8ed
3 changed files with 23 additions and 21 deletions

View File

@ -10,10 +10,10 @@ VK_NAMESPACE_BEGIN
AnsiString name;
uint location;
uint base_type;
uint component;
uint base_type; ///<基本类型(如vec4中的vec)
uint component; ///<成份数量(如vec4中的4)
VkFormat format;
VkFormat format; ///<对应的Vulkan格式(如vec4对应的FMT_RGBA32F)
uint binding;
};//struct ShaderStage

View File

@ -44,6 +44,8 @@ class RenderPass;
class Fence;
class Semaphore;
struct ShaderStage;
class ShaderModule;
class ShaderModuleManage;
class VertexShaderModule;

View File

@ -89,7 +89,7 @@ public: //Buffer相关
VertexAttribBuffer *CreateVAB(VkFormat format,uint32_t count,const void *data,VkSharingMode sharing_mode=VK_SHARING_MODE_EXCLUSIVE);
VertexAttribBuffer *CreateVAB(VkFormat format,uint32_t count,VkSharingMode sharing_mode=VK_SHARING_MODE_EXCLUSIVE){return CreateVAB(format,count,nullptr,sharing_mode);}
VertexAttribBuffer * CreateVAB(const VertexAttribData *vbc,VkSharingMode sharing_mode=VK_SHARING_MODE_EXCLUSIVE){return CreateVAB(vbc->GetDataType(),vbc->GetCount(),vbc->GetData(),sharing_mode);}
VertexAttribBuffer *CreateVAB(const VertexAttribData *vad,VkSharingMode sharing_mode=VK_SHARING_MODE_EXCLUSIVE){return CreateVAB(vad->GetVulkanFormat(),vad->GetCount(),vad->GetData(),sharing_mode);}
IndexBuffer * CreateIBO(VkIndexType index_type,uint32_t count,const void *data,VkSharingMode sharing_mode=VK_SHARING_MODE_EXCLUSIVE);
IndexBuffer * CreateIBO16(uint32_t count,const uint16 *data,VkSharingMode sharing_mode=VK_SHARING_MODE_EXCLUSIVE){return CreateIBO(VK_INDEX_TYPE_UINT16,count,(void *)data,sharing_mode);}