temporary to disable the RenderList and RenderNode
This commit is contained in:
parent
db0a8ee256
commit
c232feb40a
@ -98,7 +98,7 @@ private:
|
|||||||
|
|
||||||
bool InitAutoMaterial()
|
bool InitAutoMaterial()
|
||||||
{
|
{
|
||||||
AutoDelete<MaterialCreateInfo> mci=mtl::CreateVertexColor2D(CoordinateSystem2D::NDC);
|
AutoDelete<MaterialCreateInfo> mci=mtl::CreateVertexColor2D(mtl::CoordinateSystem2D::NDC);
|
||||||
|
|
||||||
material_instance=db->CreateMaterialInstance(mci,&vil_config);
|
material_instance=db->CreateMaterialInstance(mci,&vil_config);
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include<hgl/graph/VKMaterialInstance.h>
|
#include<hgl/graph/VKMaterialInstance.h>
|
||||||
#include<hgl/graph/VKRenderTarget.h>
|
#include<hgl/graph/VKRenderTarget.h>
|
||||||
#include<hgl/graph/VKRenderResource.h>
|
#include<hgl/graph/VKRenderResource.h>
|
||||||
#include<hgl/graph/RenderList2D.h>
|
//#include<hgl/graph/RenderList2D.h>
|
||||||
#include<hgl/graph/mtl/StdMaterial.h>
|
#include<hgl/graph/mtl/StdMaterial.h>
|
||||||
#include<hgl/color/Color.h>
|
#include<hgl/color/Color.h>
|
||||||
#include<hgl/Time.h>
|
#include<hgl/Time.h>
|
||||||
@ -142,7 +142,7 @@ public:
|
|||||||
|
|
||||||
ubo_vp_info=db->CreateUBO(sizeof(ViewportInfo),&vp_info);
|
ubo_vp_info=db->CreateUBO(sizeof(ViewportInfo),&vp_info);
|
||||||
|
|
||||||
db->global_descriptor.AddUBO(InlineDescriptor::ViewportInfo.name,ubo_vp_info);
|
db->global_descriptor.AddUBO(mtl::SBS_ViewportInfo.name,ubo_vp_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
@ -248,31 +248,31 @@ public:
|
|||||||
return BuildCommandBuffer(sc_render_target->GetCurrentFrameIndices(),ri);
|
return BuildCommandBuffer(sc_render_target->GetCurrentFrameIndices(),ri);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BuildCommandBuffer(uint32_t index,RenderList2D *rl)
|
//void BuildCommandBuffer(uint32_t index,RenderList2D *rl)
|
||||||
{
|
//{
|
||||||
if(!rl)return;
|
// if(!rl)return;
|
||||||
|
|
||||||
RenderCmdBuffer *cb=cmd_buf[index];
|
// RenderCmdBuffer *cb=cmd_buf[index];
|
||||||
|
|
||||||
cb->Begin();
|
// cb->Begin();
|
||||||
cb->BindFramebuffer(sc_render_target->GetRenderPass(),sc_render_target->GetFramebuffer(index));
|
// cb->BindFramebuffer(sc_render_target->GetRenderPass(),sc_render_target->GetFramebuffer(index));
|
||||||
cb->SetClearColor(0,clear_color);
|
// cb->SetClearColor(0,clear_color);
|
||||||
cb->BeginRenderPass();
|
// cb->BeginRenderPass();
|
||||||
rl->Render(cb);
|
// rl->Render(cb);
|
||||||
cb->EndRenderPass();
|
// cb->EndRenderPass();
|
||||||
cb->End();
|
// cb->End();
|
||||||
}
|
//}
|
||||||
|
|
||||||
void BuildCommandBuffer(RenderList2D *rl)
|
//void BuildCommandBuffer(RenderList2D *rl)
|
||||||
{
|
//{
|
||||||
for(int32_t i=0;i<swap_chain_count;i++)
|
// for(int32_t i=0;i<swap_chain_count;i++)
|
||||||
BuildCommandBuffer(i,rl);
|
// BuildCommandBuffer(i,rl);
|
||||||
}
|
//}
|
||||||
|
|
||||||
void BuildCurrentCommandBuffer(RenderList2D *rl)
|
//void BuildCurrentCommandBuffer(RenderList2D *rl)
|
||||||
{
|
//{
|
||||||
BuildCommandBuffer(sc_render_target->GetCurrentFrameIndices(),rl);
|
// BuildCommandBuffer(sc_render_target->GetCurrentFrameIndices(),rl);
|
||||||
}
|
//}
|
||||||
|
|
||||||
template<typename ...ARGS>
|
template<typename ...ARGS>
|
||||||
Pipeline *CreatePipeline(ARGS...args){return device_render_pass->CreatePipeline(args...);}
|
Pipeline *CreatePipeline(ARGS...args){return device_render_pass->CreatePipeline(args...);}
|
||||||
|
@ -10,7 +10,7 @@ namespace hgl
|
|||||||
struct ShaderBufferSource
|
struct ShaderBufferSource
|
||||||
{
|
{
|
||||||
const char *struct_name;
|
const char *struct_name;
|
||||||
const char *value_name;
|
const char *name;
|
||||||
const char *codes;
|
const char *codes;
|
||||||
};
|
};
|
||||||
}//namespace graph
|
}//namespace graph
|
||||||
|
@ -53,5 +53,4 @@ vec3 world_up;
|
|||||||
|
|
||||||
float znear,zfar;)"
|
float znear,zfar;)"
|
||||||
};
|
};
|
||||||
|
|
||||||
STD_MTL_NAMESPACE_END
|
STD_MTL_NAMESPACE_END
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
if(!mdi.hasStruct(ss.struct_name))
|
if(!mdi.hasStruct(ss.struct_name))
|
||||||
mdi.AddStruct(ss.struct_name,ss.codes);
|
mdi.AddStruct(ss.struct_name,ss.codes);
|
||||||
|
|
||||||
return AddUBO(flag_bits,set_type,ss.struct_name,ss.value_name);
|
return AddUBO(flag_bits,set_type,ss.struct_name,ss.name);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CreateShader();
|
bool CreateShader();
|
||||||
|
@ -268,8 +268,8 @@ SET(VULKAN_RENDER_SOURCE ${VK_RR_SOURCE}
|
|||||||
${VK_RENDERABLE_SOURCE}
|
${VK_RENDERABLE_SOURCE}
|
||||||
${VK_RENDER_DEVICE_SOURCE})
|
${VK_RENDER_DEVICE_SOURCE})
|
||||||
|
|
||||||
add_cm_library(ULRE.SceneGraph "ULRE" ${SCENE_GRAPH_HEADER}
|
add_cm_library(ULRE.SceneGraph "ULRE" #${SCENE_GRAPH_HEADER}
|
||||||
${SCENE_GRAPH_SOURCE}
|
#${SCENE_GRAPH_SOURCE}
|
||||||
${GEOMETRY_FILES}
|
${GEOMETRY_FILES}
|
||||||
${LIGHT_FILES}
|
${LIGHT_FILES}
|
||||||
|
|
||||||
|
@ -30,18 +30,13 @@ int Comparator<hgl::graph::RenderNode2D>::compare(const hgl::graph::RenderNode2D
|
|||||||
}
|
}
|
||||||
|
|
||||||
//比较材质实例
|
//比较材质实例
|
||||||
//{
|
{
|
||||||
// for(int i =(int)hgl::graph::DescriptorSetType::BEGIN_RANGE;
|
off=ri_one->GetMaterialInstance()
|
||||||
// i<=(int)hgl::graph::DescriptorSetType::END_RANGE;
|
-ri_two->GetMaterialInstance();
|
||||||
// i++)
|
|
||||||
// {
|
|
||||||
// off=ri_one->GetMP((hgl::graph::DescriptorSetType)i)
|
|
||||||
// -ri_two->GetMP((hgl::graph::DescriptorSetType)i);
|
|
||||||
|
|
||||||
// if(off)
|
if(off)
|
||||||
// return off;
|
return off;
|
||||||
// }
|
}
|
||||||
//}
|
|
||||||
|
|
||||||
//比较vbo+ebo
|
//比较vbo+ebo
|
||||||
{
|
{
|
||||||
@ -78,9 +73,9 @@ namespace hgl
|
|||||||
Sort(rn_list,&rnc);
|
Sort(rn_list,&rnc);
|
||||||
}
|
}
|
||||||
|
|
||||||
//创建UBO/SSBO绑定数据
|
//生成mvp数据
|
||||||
{
|
{
|
||||||
mtl->
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}//namespace graph
|
}//namespace graph
|
||||||
|
@ -60,20 +60,20 @@ void LoadShaderDescriptor(io::ConstBufferReader &cbr,ShaderDescriptor *sd_list,c
|
|||||||
if(ver==2) //以下是旧的,未来不用了,现仅保证能运行
|
if(ver==2) //以下是旧的,未来不用了,现仅保证能运行
|
||||||
{
|
{
|
||||||
if(sd->name[0]=='g')sd->set_type=DescriptorSetType::Global;else
|
if(sd->name[0]=='g')sd->set_type=DescriptorSetType::Global;else
|
||||||
if(sd->name[0]=='m')sd->set_type=DescriptorSetType::PerMaterial;else
|
//if(sd->name[0]=='m')sd->set_type=DescriptorSetType::PerMaterial;else
|
||||||
if(sd->name[0]=='r')sd->set_type=DescriptorSetType::PerObject;else
|
//if(sd->name[0]=='r')sd->set_type=DescriptorSetType::PerObject;else
|
||||||
sd->set_type=DescriptorSetType::PerFrame;
|
sd->set_type=DescriptorSetType::PerMaterial;
|
||||||
}
|
}
|
||||||
|
|
||||||
cbr.Read(sd->set);
|
cbr.Read(sd->set);
|
||||||
cbr.Read(sd->binding);
|
cbr.Read(sd->binding);
|
||||||
cbr.Read(sd->stage_flag);
|
cbr.Read(sd->stage_flag);
|
||||||
|
|
||||||
if(sd->set_type>=DescriptorSetType::PerObject)
|
//if(sd->set_type>=DescriptorSetType::PerObject)
|
||||||
{
|
//{
|
||||||
if(sd->desc_type==VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER)sd->desc_type=VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC;else
|
// if(sd->desc_type==VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER)sd->desc_type=VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC;else
|
||||||
if(sd->desc_type==VK_DESCRIPTOR_TYPE_STORAGE_BUFFER)sd->desc_type=VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC;
|
// if(sd->desc_type==VK_DESCRIPTOR_TYPE_STORAGE_BUFFER)sd->desc_type=VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC;
|
||||||
}
|
//}
|
||||||
|
|
||||||
++sd;
|
++sd;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user