removed old RenderList

This commit is contained in:
2023-05-07 01:07:26 +08:00
parent 9781e6a9b3
commit 9535a4486e
11 changed files with 168 additions and 629 deletions

View File

@@ -6,13 +6,13 @@
#include<hgl/filesystem/FileSystem.h>
#include<hgl/graph/VKRenderablePrimitiveCreater.h>
#include<hgl/graph/mtl/2d/VertexColor2D.h>
#include<hgl/graph/RenderList2D.h>
#include<hgl/graph/RenderList.h>
using namespace hgl;
using namespace hgl::graph;
constexpr uint32_t SCREEN_WIDTH=1280;
constexpr uint32_t SCREEN_HEIGHT=720;
constexpr uint32_t SCREEN_WIDTH=1024;
constexpr uint32_t SCREEN_HEIGHT=1024;
constexpr uint32_t VERTEX_COUNT=3;
@@ -34,7 +34,7 @@ class TestApp:public VulkanApplicationFramework
private:
SceneNode render_root;
RenderList2D * render_list =nullptr;
RenderList * render_list =nullptr;
MaterialInstance * material_instance =nullptr;
Renderable * render_obj =nullptr;
@@ -99,7 +99,7 @@ public:
if(!VulkanApplicationFramework::Init(SCREEN_WIDTH,SCREEN_HEIGHT))
return(false);
render_list=new RenderList2D(device);
render_list=new RenderList(device);
if(!InitMaterial())
return(false);

View File

@@ -19,7 +19,7 @@
#include<hgl/graph/VKMaterialInstance.h>
#include<hgl/graph/VKRenderTarget.h>
#include<hgl/graph/VKRenderResource.h>
#include<hgl/graph/RenderList2D.h>
#include<hgl/graph/RenderList.h>
#include<hgl/graph/mtl/StdMaterial.h>
#include<hgl/color/Color.h>
#include<hgl/Time.h>
@@ -248,7 +248,7 @@ public:
return BuildCommandBuffer(sc_render_target->GetCurrentFrameIndices(),ri);
}
void BuildCommandBuffer(uint32_t index,RenderList2D *rl)
void BuildCommandBuffer(uint32_t index,RenderList *rl)
{
if(!rl)return;
@@ -263,13 +263,13 @@ public:
cb->End();
}
void BuildCommandBuffer(RenderList2D *rl)
void BuildCommandBuffer(RenderList *rl)
{
for(int32_t i=0;i<swap_chain_count;i++)
BuildCommandBuffer(i,rl);
}
void BuildCurrentCommandBuffer(RenderList2D *rl)
void BuildCurrentCommandBuffer(RenderList *rl)
{
BuildCommandBuffer(sc_render_target->GetCurrentFrameIndices(),rl);
}