renamed to VertexInputLayout instead of VertexAttributeBinding
This commit is contained in:
@@ -20,12 +20,12 @@ namespace hgl
|
||||
RectScope2f scope;
|
||||
};//struct RectangleCreateInfo
|
||||
|
||||
Primitive *CreateRectangle(RenderResource *db,const VAB *vab,const RectangleCreateInfo *rci);
|
||||
Primitive *CreateRectangle(RenderResource *db,const VIL *vil,const RectangleCreateInfo *rci);
|
||||
|
||||
/**
|
||||
* 创建延迟渲染用全屏平面
|
||||
*/
|
||||
Primitive *CreateGBufferCompositionRectangle(RenderResource *db,const VAB *vab);
|
||||
Primitive *CreateGBufferCompositionRectangle(RenderResource *db,const VIL *vil);
|
||||
|
||||
/**
|
||||
* 圆角矩形创建信息(扇形/线圈)
|
||||
@@ -36,7 +36,7 @@ namespace hgl
|
||||
uint32_t round_per; ///<圆角精度
|
||||
};//struct RoundRectangleCreateInfo:public RectangleCreateInfo
|
||||
|
||||
Primitive *CreateRoundRectangle(RenderResource *db,const VAB *vab,const RoundRectangleCreateInfo *rci);
|
||||
Primitive *CreateRoundRectangle(RenderResource *db,const VIL *vil,const RoundRectangleCreateInfo *rci);
|
||||
|
||||
/**
|
||||
* 圆形创建信息
|
||||
@@ -56,7 +56,7 @@ namespace hgl
|
||||
/**
|
||||
* 创建一个2D圆形(扇形/线圈)
|
||||
*/
|
||||
Primitive *CreateCircle(RenderResource *db,const VAB *vab,const CircleCreateInfo *cci);
|
||||
Primitive *CreateCircle(RenderResource *db,const VIL *vil,const CircleCreateInfo *cci);
|
||||
|
||||
/**
|
||||
* 平面网格创建信息
|
||||
@@ -75,7 +75,7 @@ namespace hgl
|
||||
/**
|
||||
* 创建一个平面网格(线条)
|
||||
*/
|
||||
Primitive *CreatePlaneGrid(RenderResource *db,const VAB *vab,const PlaneGridCreateInfo *pgci);
|
||||
Primitive *CreatePlaneGrid(RenderResource *db,const VIL *vil,const PlaneGridCreateInfo *pgci);
|
||||
|
||||
struct PlaneCreateInfo
|
||||
{
|
||||
@@ -93,7 +93,7 @@ namespace hgl
|
||||
/**
|
||||
* 创建一个平面(三角形)
|
||||
*/
|
||||
Primitive *CreatePlane(RenderResource *db,const VAB *vab,const PlaneCreateInfo *pci);
|
||||
Primitive *CreatePlane(RenderResource *db,const VIL *vil,const PlaneCreateInfo *pci);
|
||||
|
||||
struct CubeCreateInfo
|
||||
{
|
||||
@@ -129,7 +129,7 @@ namespace hgl
|
||||
/**
|
||||
* 创建一个立方体(三角形)
|
||||
*/
|
||||
Primitive *CreateCube(RenderResource *db,const VAB *vab,const CubeCreateInfo *cci);
|
||||
Primitive *CreateCube(RenderResource *db,const VIL *vil,const CubeCreateInfo *cci);
|
||||
|
||||
struct BoundingBoxCreateInfo
|
||||
{
|
||||
@@ -160,17 +160,17 @@ namespace hgl
|
||||
/**
|
||||
* 创建一个绑定盒(线条)
|
||||
*/
|
||||
Primitive *CreateBoundingBox(RenderResource *db,const VAB *vab,const BoundingBoxCreateInfo *cci);
|
||||
Primitive *CreateBoundingBox(RenderResource *db,const VIL *vil,const BoundingBoxCreateInfo *cci);
|
||||
|
||||
/**
|
||||
* 创建一个球心坐标为0,0,0,半径为1的球体(三角形)
|
||||
*/
|
||||
Primitive *CreateSphere(RenderResource *db,const VAB *vab,const uint numberSlices);
|
||||
Primitive *CreateSphere(RenderResource *db,const VIL *vil,const uint numberSlices);
|
||||
|
||||
/**
|
||||
* 创建一个穹顶(三角形)
|
||||
*/
|
||||
Primitive *CreateDome(RenderResource *db,const VAB *vab, const uint numberSlices);
|
||||
Primitive *CreateDome(RenderResource *db,const VIL *vil, const uint numberSlices);
|
||||
|
||||
struct TorusCreateInfo
|
||||
{
|
||||
@@ -186,7 +186,7 @@ namespace hgl
|
||||
/**
|
||||
* 创建一个圆环(三角形)
|
||||
*/
|
||||
Primitive *CreateTorus(RenderResource *db,const VAB *vab,const TorusCreateInfo *tci);
|
||||
Primitive *CreateTorus(RenderResource *db,const VIL *vil,const TorusCreateInfo *tci);
|
||||
|
||||
struct CylinderCreateInfo
|
||||
{
|
||||
@@ -198,7 +198,7 @@ namespace hgl
|
||||
/**
|
||||
* 创建一个圆柱(三角形)
|
||||
*/
|
||||
Primitive *CreateCylinder(RenderResource *db,const VAB *vab,const CylinderCreateInfo *cci);
|
||||
Primitive *CreateCylinder(RenderResource *db,const VIL *vil,const CylinderCreateInfo *cci);
|
||||
|
||||
struct ConeCreateInfo
|
||||
{
|
||||
@@ -211,7 +211,7 @@ namespace hgl
|
||||
/**
|
||||
* 创建一个圆锥(三角形)
|
||||
*/
|
||||
Primitive *CreateCone(RenderResource *db,const VAB *vab,const ConeCreateInfo *cci);
|
||||
Primitive *CreateCone(RenderResource *db,const VIL *vil,const ConeCreateInfo *cci);
|
||||
|
||||
struct AxisCreateInfo
|
||||
{
|
||||
@@ -232,7 +232,7 @@ namespace hgl
|
||||
/**
|
||||
* 创建一个坐标线(线条)
|
||||
*/
|
||||
Primitive *CreateAxis(RenderResource *db,const VAB *vab,const AxisCreateInfo *aci);
|
||||
Primitive *CreateAxis(RenderResource *db,const VIL *vil,const AxisCreateInfo *aci);
|
||||
}//namespace inline_geometry
|
||||
}//namespace graph
|
||||
};//namespace hgl
|
||||
|
@@ -35,7 +35,7 @@ namespace hgl
|
||||
RenderResource *db;
|
||||
Material *mtl;
|
||||
|
||||
const VAB *vab;
|
||||
const VIL *vil;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace hgl
|
||||
|
||||
public:
|
||||
|
||||
PrimitiveCreater(RenderResource *sdb,const VAB *);
|
||||
PrimitiveCreater(RenderResource *sdb,const VIL *);
|
||||
virtual ~PrimitiveCreater()=default;
|
||||
|
||||
virtual bool Init(const uint32 vertices_count); ///<初始化,参数为顶点数量
|
||||
@@ -56,7 +56,7 @@ namespace hgl
|
||||
template<typename T>
|
||||
T * CreateVADA(const AnsiString &name) ///<创建一个顶点属性缓冲区以及访问器
|
||||
{
|
||||
const VkFormat format=vab->GetFormat(name);
|
||||
const VkFormat format=vil->GetFormat(name);
|
||||
|
||||
if(format!=T::GetVulkanFormat())
|
||||
return(nullptr);
|
||||
@@ -78,7 +78,7 @@ namespace hgl
|
||||
uint16 * CreateIBO16(uint count,const uint16 *data=nullptr); ///<创建16位的索引缓冲区
|
||||
uint32 * CreateIBO32(uint count,const uint32 *data=nullptr); ///<创建32位的索引缓冲区
|
||||
|
||||
virtual Primitive * Finish(); ///<结束并创建可渲染对象
|
||||
virtual Primitive * Finish(); ///<结束并创建可渲染对象
|
||||
};//class PrimitiveCreater
|
||||
}//namespace graph
|
||||
}//namespace hgl
|
||||
|
@@ -125,10 +125,10 @@ public:
|
||||
CompOperatorMemcmp(const VAConfig &);
|
||||
};
|
||||
|
||||
using VABConfigInfo=Map<AnsiString,VAConfig>;
|
||||
using VILConfig=Map<AnsiString,VAConfig>;
|
||||
|
||||
class VertexAttributeBinding;
|
||||
using VAB=VertexAttributeBinding;
|
||||
class VertexInputLayout;
|
||||
using VIL=VertexInputLayout;
|
||||
|
||||
class Primitive;
|
||||
class Renderable;
|
||||
|
@@ -229,7 +229,7 @@ public: //shader & material
|
||||
Material *CreateMaterial(const UTF8String &mtl_name,const VertexShaderModule *vertex_shader_module,const ShaderModule *fragment_shader_module,MaterialDescriptorSets *);
|
||||
Material *CreateMaterial(const UTF8String &mtl_name,const VertexShaderModule *vertex_shader_module,const ShaderModule *geometry_shader_module,const ShaderModule *fragment_shader_module,MaterialDescriptorSets *);
|
||||
|
||||
MaterialInstance *CreateMI(Material *,const VABConfigInfo *vab_cfg=nullptr);
|
||||
MaterialInstance *CreateMI(Material *,const VILConfig *vil_cfg=nullptr);
|
||||
|
||||
public: //Command Buffer 相关
|
||||
|
||||
|
@@ -8,7 +8,7 @@ class MaterialInstance
|
||||
{
|
||||
Material *material;
|
||||
|
||||
VAB *vab;
|
||||
VIL *vil;
|
||||
|
||||
MaterialParameters *mp_value;
|
||||
|
||||
@@ -16,7 +16,7 @@ private:
|
||||
|
||||
friend class GPUDevice;
|
||||
|
||||
MaterialInstance(Material *,VAB *,MaterialParameters *);
|
||||
MaterialInstance(Material *,VIL *,MaterialParameters *);
|
||||
|
||||
public:
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
|
||||
Material *GetMaterial(){return material;}
|
||||
|
||||
const VAB *GetVAB()const{return vab;}
|
||||
const VIL *GetVIL()const{return vil;}
|
||||
MaterialParameters *GetMP(){return mp_value;}
|
||||
MaterialParameters *GetMP(const DescriptorSetsType &type);
|
||||
|
||||
|
@@ -25,7 +25,7 @@ protected:
|
||||
|
||||
ObjectList<Pipeline> pipeline_list;
|
||||
|
||||
Pipeline *CreatePipeline(Material *,PipelineData *,const VAB *);
|
||||
Pipeline *CreatePipeline(Material *,PipelineData *,const VIL *);
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -90,8 +90,8 @@ public: //Material
|
||||
const ShaderModule *CreateShaderModule(const OSString &filename,ShaderResource *shader_resource);
|
||||
|
||||
Material * CreateMaterial(const OSString &);
|
||||
MaterialInstance * CreateMaterialInstance(Material *,const VABConfigInfo *vab_cfg=nullptr);
|
||||
MaterialInstance * CreateMaterialInstance(const OSString &,const VABConfigInfo *vab_cfg=nullptr);
|
||||
MaterialInstance * CreateMaterialInstance(Material *,const VILConfig *vil_cfg=nullptr);
|
||||
MaterialInstance * CreateMaterialInstance(const OSString &,const VILConfig *vil_cfg=nullptr);
|
||||
|
||||
Primitive * CreatePrimitive(const uint32_t vertex_count=0);
|
||||
|
||||
|
@@ -62,7 +62,7 @@ class VertexShaderModule:public ShaderModule
|
||||
|
||||
private:
|
||||
|
||||
SortedSets<VAB *> vab_sets;
|
||||
SortedSets<VIL *> vil_sets;
|
||||
|
||||
public:
|
||||
|
||||
@@ -87,9 +87,9 @@ public:
|
||||
|
||||
public:
|
||||
|
||||
VAB * CreateVAB(const VABConfigInfo *format_map=nullptr);
|
||||
bool Release(VAB *);
|
||||
const uint32_t GetInstanceCount()const{return vab_sets.GetCount();}
|
||||
VIL * CreateVIL(const VILConfig *format_map=nullptr);
|
||||
bool Release(VIL *);
|
||||
const uint32_t GetInstanceCount()const{return vil_sets.GetCount();}
|
||||
};//class VertexShaderModule:public ShaderModule
|
||||
VK_NAMESPACE_END
|
||||
#endif//HGL_GRAPH_VULKAN_SHADER_MODULE_INCLUDE
|
||||
|
Reference in New Issue
Block a user