moved VertexAttributeBinding to CMSceneGraph
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include<hgl/graph/VKShaderModuleMap.h>
|
||||
#include<hgl/graph/VKVertexAttributeBinding.h>
|
||||
VK_NAMESPACE_BEGIN
|
||||
using ShaderStageCreateInfoList=List<VkPipelineShaderStageCreateInfo>;
|
||||
|
||||
struct MaterialData
|
||||
{
|
||||
UTF8String name;
|
||||
@@ -17,7 +19,7 @@ struct MaterialData
|
||||
VertexShaderModule *vertex_sm;
|
||||
VertexAttributeBinding *vab;
|
||||
|
||||
List<VkPipelineShaderStageCreateInfo> shader_stage_list;
|
||||
ShaderStageCreateInfoList shader_stage_list;
|
||||
|
||||
PipelineLayoutData *pipeline_layout_data;
|
||||
|
||||
@@ -56,8 +58,7 @@ public:
|
||||
|
||||
const VertexShaderModule * GetVertexShaderModule ()const{return data->vertex_sm;}
|
||||
|
||||
const uint32_t GetStageCount ()const{return data->shader_stage_list.GetCount();}
|
||||
const VkPipelineShaderStageCreateInfo * GetStages ()const{return data->shader_stage_list.GetData();}
|
||||
const ShaderStageCreateInfoList & GetStageList ()const{return data->shader_stage_list;}
|
||||
|
||||
const MaterialDescriptorSets * GetDescriptorSets ()const{return data->mds;}
|
||||
const VkPipelineLayout GetPipelineLayout ()const;
|
||||
|
@@ -1,39 +0,0 @@
|
||||
#ifndef HGL_GRAPH_VULKAN_VERTEX_ATTRIBUTE_BINDING_INCLUDE
|
||||
#define HGL_GRAPH_VULKAN_VERTEX_ATTRIBUTE_BINDING_INCLUDE
|
||||
|
||||
#include<hgl/graph/VK.h>
|
||||
#include<hgl/type/String.h>
|
||||
VK_NAMESPACE_BEGIN
|
||||
/**
|
||||
* 顶点输入状态实例<br>
|
||||
* 本对象用于传递给Material,用于已经确定好顶点格式的情况下,依然可修改部分设定(如instance)。
|
||||
*/
|
||||
class VertexAttributeBinding
|
||||
{
|
||||
uint32_t attr_count;
|
||||
VkVertexInputBindingDescription *binding_list;
|
||||
VkVertexInputAttributeDescription *attribute_list;
|
||||
|
||||
private:
|
||||
|
||||
friend class VertexShaderModule;
|
||||
|
||||
VertexAttributeBinding(const uint32_t,const VkVertexInputBindingDescription *,const VkVertexInputAttributeDescription *);
|
||||
|
||||
public:
|
||||
|
||||
~VertexAttributeBinding();
|
||||
|
||||
bool SetInstance(const uint binding,bool instance);
|
||||
bool SetStride (const uint binding,const uint32_t & stride);
|
||||
bool SetFormat (const uint binding,const VkFormat & format);
|
||||
bool SetOffset (const uint binding,const uint32_t offset);
|
||||
|
||||
const uint32_t GetVertexAttrCount ()const{return attr_count;}
|
||||
const VkVertexInputBindingDescription * GetVertexBindingList ()const{return binding_list;}
|
||||
const VkVertexInputAttributeDescription * GetVertexAttributeList ()const{return attribute_list;}
|
||||
};//class VertexAttributeBinding
|
||||
|
||||
using VAB=VertexAttributeBinding;
|
||||
VK_NAMESPACE_END
|
||||
#endif//HGL_GRAPH_VULKAN_VERTEX_ATTRIBUTE_BINDING_INCLUDE
|
Reference in New Issue
Block a user