finished auto bound GlobalDescriptor
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
#include<hgl/graph/SceneInfo.h>
|
||||
#include<hgl/graph/VKVertexInputConfig.h>
|
||||
#include<hgl/graph/VKRenderablePrimitiveCreater.h>
|
||||
#include<hgl/graph/mtl/2d/VertexColor2DNDC.h>
|
||||
#include<hgl/graph/mtl/2d/VertexColor2D.h>
|
||||
|
||||
using namespace hgl;
|
||||
using namespace hgl::graph;
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
|
||||
bool InitAutoMaterial()
|
||||
{
|
||||
MaterialCreateInfo *mci=mtl::CreateVertexColor2DNDC();
|
||||
MaterialCreateInfo *mci=mtl::CreateVertexColor2D(CoordinateSystem2D::NDC);
|
||||
|
||||
material_instance=db->CreateMaterialInstance(mci,&vil_config);
|
||||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include<hgl/math/Math.h>
|
||||
#include<hgl/filesystem/FileSystem.h>
|
||||
#include<hgl/graph/SceneInfo.h>
|
||||
#include<hgl/graph/mtl/2d/VertexColor2D.h>
|
||||
|
||||
using namespace hgl;
|
||||
using namespace hgl::graph;
|
||||
@@ -40,8 +41,14 @@ private:
|
||||
private:
|
||||
|
||||
bool InitMaterial()
|
||||
{
|
||||
material_instance=db->CreateMaterialInstance(OS_TEXT("res/material/VertexColor2D"));
|
||||
{
|
||||
MaterialCreateInfo *mci=mtl::CreateVertexColor2D(CoordinateSystem2D::Ortho);
|
||||
|
||||
//material_instance=db->CreateMaterialInstance(OS_TEXT("res/material/VertexColor2D"));
|
||||
|
||||
material_instance=db->CreateMaterialInstance(mci);
|
||||
|
||||
delete mci;
|
||||
|
||||
if(!material_instance)
|
||||
return(false);
|
||||
|
@@ -116,7 +116,7 @@ public:
|
||||
|
||||
cili.lunarg.standard_validation = true;
|
||||
cili.khronos.validation = true;
|
||||
//cili.RenderDoc.Capture = true;
|
||||
cili.RenderDoc.Capture = true;
|
||||
|
||||
inst=CreateInstance("VulkanTest",nullptr,&cili);
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
|
||||
ubo_vp_info=db->CreateUBO(sizeof(ViewportInfo),&vp_info);
|
||||
|
||||
db->SetGlobal(GlobalShaderUBO::ViewportInfo,ubo_vp_info);
|
||||
db->SetGlobal(GlobalDescriptor::ViewportInfo.name,ubo_vp_info);
|
||||
}
|
||||
|
||||
return(true);
|
||||
|
Reference in New Issue
Block a user