added comments and layout codes.
This commit is contained in:
parent
f4493b09e5
commit
6efb50c977
@ -11,7 +11,6 @@
|
|||||||
#include<hgl/graph/mtl/Material3DCreateConfig.h>
|
#include<hgl/graph/mtl/Material3DCreateConfig.h>
|
||||||
#include<hgl/graph/mtl/BlinnPhong.h>
|
#include<hgl/graph/mtl/BlinnPhong.h>
|
||||||
#include<hgl/graph/VertexDataManager.h>
|
#include<hgl/graph/VertexDataManager.h>
|
||||||
#include<hgl/color/Color.h>
|
|
||||||
|
|
||||||
using namespace hgl;
|
using namespace hgl;
|
||||||
using namespace hgl::graph;
|
using namespace hgl::graph;
|
||||||
@ -108,7 +107,9 @@ private:
|
|||||||
{
|
{
|
||||||
mi_data=GetColor4f(AxisColor[i],4);
|
mi_data=GetColor4f(AxisColor[i],4);
|
||||||
|
|
||||||
mi_blinnphong[i]=db->CreateMaterialInstance(mtl_blinnphong,nullptr,&mi_data);
|
mi_blinnphong[i]=db->CreateMaterialInstance(mtl_blinnphong, //材质
|
||||||
|
nullptr, //顶点输入配置,这里使用nullptr,即代表会使用默认配置,那么结果将等同于上面的mtl_blinnphong->GetDefaultVIL()
|
||||||
|
&mi_data); //材质实例参数
|
||||||
if(!mi_blinnphong[i])return(false);
|
if(!mi_blinnphong[i])return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ namespace hgl
|
|||||||
virtual bool Init(const uint32 vertices_count); ///<初始化,参数为顶点数量
|
virtual bool Init(const uint32 vertices_count); ///<初始化,参数为顶点数量
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
T * AccessVAD(const AnsiString &name) ///<创建一个顶点属性缓冲区以及访问器
|
T * AccessVAD(const AnsiString &name) ///<创建一个顶点属性数据缓冲区以及访问器
|
||||||
{
|
{
|
||||||
const VkFormat format=vil->GetVulkanFormat(name);
|
const VkFormat format=vil->GetVulkanFormat(name);
|
||||||
|
|
||||||
|
@ -78,6 +78,8 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
GPUDevice *GetDevice(){return device;}
|
||||||
|
|
||||||
//注:并非一定要走这里,这里只是提供一个注册和自动绑定的机制
|
//注:并非一定要走这里,这里只是提供一个注册和自动绑定的机制
|
||||||
DescriptorBinding static_descriptor; ///<静态属性描述符绑定管理
|
DescriptorBinding static_descriptor; ///<静态属性描述符绑定管理
|
||||||
DescriptorBinding global_descriptor; ///<全局属性描述符绑定管理
|
DescriptorBinding global_descriptor; ///<全局属性描述符绑定管理
|
||||||
|
Loading…
x
Reference in New Issue
Block a user