Added WorkObject::CreateRenderable(...)

This commit is contained in:
2025-01-28 22:20:48 +08:00
parent 3c2f7ad705
commit a03770fd00
4 changed files with 50 additions and 18 deletions

View File

@@ -1,6 +1,6 @@
#pragma once
#include<hgl/graph/RenderFramework.h>
#include<hgl/type/object/TickObject.h>
#include<hgl/graph/RenderFramework.h>
#include<hgl/Time.h>
//#include<iostream>
@@ -60,6 +60,12 @@ namespace hgl
{
return render_pass->CreatePipeline(args...);
}
graph::Renderable *CreateRenderable( const AnsiString &name,
uint32_t vertices_count,
graph::MaterialInstance *mi,
graph::Pipeline *pipeline,
const std::initializer_list<graph::VertexAttribDataPtr> &vad_list);
};//class WorkObject
/**

View File

@@ -25,6 +25,13 @@ constexpr size_t VK_DESCRIPTOR_TYPE_END_RANGE=VK_DESCRIPTOR_TYPE_INPUT_ATTACHMEN
constexpr size_t VK_DESCRIPTOR_TYPE_RANGE_SIZE=VK_DESCRIPTOR_TYPE_END_RANGE-VK_DESCRIPTOR_TYPE_BEGIN_RANGE+1;
#endif//VK_DESCRIPTOR_TYPE_RANGE_SIZE
struct VertexAttribDataPtr
{
const char * name;
const VkFormat format;
const void * data;
};
using BindingMap =Map<AnsiString,int>;
using BindingMapArray =BindingMap[VK_DESCRIPTOR_TYPE_RANGE_SIZE];