List模板改名为ArrayList

This commit is contained in:
hyzboy 2025-04-23 00:27:43 +08:00
parent 10d0c2c473
commit aed57437f9
36 changed files with 66 additions and 63 deletions

2
CMCore

@ -1 +1 @@
Subproject commit d09fe4326ea3629434adcd034a99ebbdb8fa6c22 Subproject commit a7b0cb6112c1dfad65523e619d88917398ca7c9a

@ -1 +1 @@
Subproject commit 67e8e956658cb9abbb94cd01f0a465e8275b44dd Subproject commit 0948b3a6257fdcc1e33eeb61bf42d0e93b32d326

@ -1 +1 @@
Subproject commit f74d7045fa0d143b94103e49093fe18a1d5a884c Subproject commit e3680c477d25d2b4d93ff4da2d84725524f047b2

View File

@ -10,7 +10,7 @@
set_property(TARGET ${name} PROPERTY FOLDER "ULRE/Example/Basic") set_property(TARGET ${name} PROPERTY FOLDER "ULRE/Example/Basic")
endmacro() endmacro()
CreateProject(00_RenderFrameworkTest rf_test.cpp) CreateProject(00_RenderFrameworkTest rf_test.cpp AssetData.h)
CreateProject(01_draw_triangle_in_NDC draw_triangle_in_NDC.cpp) CreateProject(01_draw_triangle_in_NDC draw_triangle_in_NDC.cpp)
CreateProject(02_draw_triangle_use_UBO draw_triangle_use_UBO.cpp) CreateProject(02_draw_triangle_use_UBO draw_triangle_use_UBO.cpp)
CreateProject(03_auto_instance auto_instance.cpp) CreateProject(03_auto_instance auto_instance.cpp)

View File

@ -3,6 +3,7 @@
#include<hgl/graph/VKRenderResource.h> #include<hgl/graph/VKRenderResource.h>
#include<hgl/graph/mtl/Material2DCreateConfig.h> #include<hgl/graph/mtl/Material2DCreateConfig.h>
#include<hgl/graph/VKMaterialInstance.h> #include<hgl/graph/VKMaterialInstance.h>
#include"AssetData.h"
using namespace hgl; using namespace hgl;
using namespace hgl::graph; using namespace hgl::graph;

View File

@ -109,12 +109,12 @@ public:
ComponentSet & GetComponents(){return component_set;} ComponentSet & GetComponents(){return component_set;}
int GetComponents(List<Component *> &comp_list,SceneNode *); int GetComponents(ArrayList<Component *> &comp_list,SceneNode *);
virtual void UpdateComponents(const double delta_time); virtual void UpdateComponents(const double delta_time);
virtual void JoinComponent(Component *c){if(!c)return;component_set.Add(c);} virtual void AttachComponent(Component *c){if(!c)return;component_set.Add(c);}
virtual void UnjonComponent(Component *c){if(!c)return;component_set.Delete(c);} virtual void DetachComponent(Component *c){if(!c)return;component_set.Delete(c);}
public: //事件 public: //事件

View File

@ -29,8 +29,8 @@ namespace hgl
const int compare(const RenderNode &)const override; const int compare(const RenderNode &)const override;
}; };
using RenderNodeList=List<RenderNode>; using RenderNodeList=ArrayList<RenderNode>;
using RenderNodePointerList=List<RenderNode *>; using RenderNodePointerList=ArrayList<RenderNode *>;
using MaterialInstanceSets=SortedSet<MaterialInstance *>; ///<材质实例集合 using MaterialInstanceSets=SortedSet<MaterialInstance *>; ///<材质实例集合
}//namespace graph }//namespace graph

View File

@ -119,7 +119,7 @@ namespace hgl
bool Contains (Component *comp) {return ComponentList.Contains(comp);} ///<是否包含指定组件 bool Contains (Component *comp) {return ComponentList.Contains(comp);} ///<是否包含指定组件
bool HasComponent (const ComponentManager *); ///<是否有指定组件管理器的组件 bool HasComponent (const ComponentManager *); ///<是否有指定组件管理器的组件
virtual int GetComponents (List<Component *> &comp_list,const ComponentManager *); ///<取得所有组件 virtual int GetComponents (ArrayList<Component *> &comp_list,const ComponentManager *); ///<取得所有组件
};//class SceneNode };//class SceneNode

View File

@ -37,7 +37,7 @@ namespace hgl
DeviceBuffer *tile_buffer; ///<Tile暂存缓冲区 DeviceBuffer *tile_buffer; ///<Tile暂存缓冲区
List<Image2DRegion> commit_list; ArrayList<Image2DRegion> commit_list;
uint8 *commit_ptr; uint8 *commit_ptr;
bool CommitTile(TileObject *,const void *,const uint,const int,const int); ///<提交一个Tile数据 bool CommitTile(TileObject *,const void *,const uint,const int,const int); ///<提交一个Tile数据

View File

@ -18,7 +18,7 @@ class DescriptorSet
ObjectList<VkDescriptorBufferInfo> vab_list; ObjectList<VkDescriptorBufferInfo> vab_list;
ObjectList<VkDescriptorImageInfo> image_list; ObjectList<VkDescriptorImageInfo> image_list;
List<VkWriteDescriptorSet> wds_list; ArrayList<VkWriteDescriptorSet> wds_list;
SortedSet<uint32_t> binded_sets; SortedSet<uint32_t> binded_sets;

View File

@ -34,7 +34,7 @@ struct GPUDeviceAttribute
VkQueue present_queue =VK_NULL_HANDLE; VkQueue present_queue =VK_NULL_HANDLE;
VkSurfaceFormatKHR surface_format; VkSurfaceFormatKHR surface_format;
List<VkPresentModeKHR> present_modes; ArrayList<VkPresentModeKHR> present_modes;
VkSurfaceTransformFlagBitsKHR preTransform; VkSurfaceTransformFlagBitsKHR preTransform;
VkCompositeAlphaFlagBitsKHR compositeAlpha =VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; VkCompositeAlphaFlagBitsKHR compositeAlpha =VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;

View File

@ -101,8 +101,8 @@ VK_NAMESPACE_BEGIN
};//class VulkanInstance };//class VulkanInstance
void InitVulkanInstanceProperties(); void InitVulkanInstanceProperties();
const List<VkLayerProperties> & GetInstanceLayerProperties(); const ArrayList<VkLayerProperties> & GetInstanceLayerProperties();
const List<VkExtensionProperties> & GetInstanceExtensionProperties(); const ArrayList<VkExtensionProperties> & GetInstanceExtensionProperties();
const bool CheckInstanceLayerSupport(const AnsiString &); const bool CheckInstanceLayerSupport(const AnsiString &);
const bool GetInstanceLayerVersion(const AnsiString &,uint32_t &spec,uint32_t &impl); const bool GetInstanceLayerVersion(const AnsiString &,uint32_t &spec,uint32_t &impl);
const bool CheckInstanceExtensionSupport(const AnsiString &); const bool CheckInstanceExtensionSupport(const AnsiString &);

View File

@ -11,8 +11,10 @@ namespace hgl
{ {
class ActiveMemoryBlockManager; class ActiveMemoryBlockManager;
} }
VK_NAMESPACE_BEGIN VK_NAMESPACE_BEGIN
using ShaderStageCreateInfoList=List<VkPipelineShaderStageCreateInfo>;
using ShaderStageCreateInfoList=ArrayList<VkPipelineShaderStageCreateInfo>;
/** /**
* <br> * <br>

View File

@ -23,9 +23,9 @@ class GPUPhysicalDevice
VkPhysicalDeviceVulkan14Properties properties14; VkPhysicalDeviceVulkan14Properties properties14;
VkPhysicalDeviceMemoryProperties memory_properties; VkPhysicalDeviceMemoryProperties memory_properties;
List<VkLayerProperties> layer_properties; ArrayList<VkLayerProperties> layer_properties;
List<VkExtensionProperties> extension_properties; ArrayList<VkExtensionProperties> extension_properties;
List<VkQueueFamilyProperties> queue_family_properties; ArrayList<VkQueueFamilyProperties> queue_family_properties;
private: private:

View File

@ -16,7 +16,7 @@ class RenderPass
VkPipelineCache pipeline_cache; VkPipelineCache pipeline_cache;
VkRenderPass render_pass; VkRenderPass render_pass;
List<VkFormat> color_formats; ArrayList<VkFormat> color_formats;
VkFormat depth_format; VkFormat depth_format;
VkExtent2D granularity; VkExtent2D granularity;
@ -31,7 +31,7 @@ private:
friend class RenderPassManager; friend class RenderPassManager;
RenderPass(VkDevice d,VkPipelineCache pc,VkRenderPass rp,const List<VkFormat> &cf,VkFormat df); RenderPass(VkDevice d,VkPipelineCache pc,VkRenderPass rp,const ArrayList<VkFormat> &cf,VkFormat df);
public: public:
@ -43,7 +43,7 @@ public:
const VkPipelineCache GetPipelineCache()const{return pipeline_cache;} const VkPipelineCache GetPipelineCache()const{return pipeline_cache;}
const uint GetColorCount()const{return color_formats.GetCount();} const uint GetColorCount()const{return color_formats.GetCount();}
const List<VkFormat> & GetColorFormat()const{return color_formats;} const ArrayList<VkFormat> & GetColorFormat()const{return color_formats;}
const VkFormat GetColorFormat(int index)const const VkFormat GetColorFormat(int index)const
{ {
if(index<0||index>=color_formats.GetCount())return VK_FORMAT_UNDEFINED; if(index<0||index>=color_formats.GetCount())return VK_FORMAT_UNDEFINED;

View File

@ -38,7 +38,7 @@ namespace hgl
virtual ~TileFont(); virtual ~TileFont();
bool Registry(TileUVFloatMap &,SortedSet<u32char> &chars_sets); ///<注册要使用的字符 bool Registry(TileUVFloatMap &,SortedSet<u32char> &chars_sets); ///<注册要使用的字符
void Unregistry(const List<u32char> &); ///<注销要使用的字符 void Unregistry(const ArrayList<u32char> &); ///<注销要使用的字符
};//class TileFont };//class TileFont
}//namespace graph }//namespace graph
}//namespace hgl }//namespace hgl

View File

@ -11,7 +11,7 @@ class GraphModuleManager
protected: protected:
List<GraphModule *> module_list; ArrayList<GraphModule *> module_list;
Map<size_t,GraphModule *> module_map; Map<size_t,GraphModule *> module_map;
public: public:

View File

@ -28,9 +28,9 @@ private:
private: private:
RenderPass * CreateRenderPass( const List<VkAttachmentDescription> &desc_list, RenderPass * CreateRenderPass( const ArrayList<VkAttachmentDescription> &desc_list,
const List<VkSubpassDescription> &subpass, const ArrayList<VkSubpassDescription> &subpass,
const List<VkSubpassDependency> &dependency, const ArrayList<VkSubpassDependency> &dependency,
const RenderbufferInfo *); const RenderbufferInfo *);
public: public:

View File

@ -20,7 +20,7 @@ public:
public: //FrameBuffer相关 public: //FrameBuffer相关
Framebuffer *CreateFBO(RenderPass *rp,ImageView **color_list,const uint image_count,ImageView *depth); Framebuffer *CreateFBO(RenderPass *rp,ImageView **color_list,const uint image_count,ImageView *depth);
// Framebuffer *CreateFBO(RenderPass *,List<ImageView *> &color,ImageView *depth); // Framebuffer *CreateFBO(RenderPass *,ArrayList<ImageView *> &color,ImageView *depth);
Framebuffer *CreateFBO(RenderPass *,ImageView *color,ImageView *depth); Framebuffer *CreateFBO(RenderPass *,ImageView *color,ImageView *depth);
Framebuffer *CreateFBO(RenderPass *,ImageView *); Framebuffer *CreateFBO(RenderPass *,ImageView *);

View File

@ -91,11 +91,11 @@ public: //Create/Chagne
void Clear(TextureCreateInfo *); void Clear(TextureCreateInfo *);
bool ChangeTexture2D(Texture2D *,DeviceBuffer *buf, const List<Image2DRegion> &,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); bool ChangeTexture2D(Texture2D *,DeviceBuffer *buf, const ArrayList<Image2DRegion> &,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
bool ChangeTexture2D(Texture2D *,DeviceBuffer *buf, const RectScope2ui &, VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); bool ChangeTexture2D(Texture2D *,DeviceBuffer *buf, const RectScope2ui &, VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
bool ChangeTexture2D(Texture2D *,const void *data,const VkDeviceSize size, const RectScope2ui &, VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); bool ChangeTexture2D(Texture2D *,const void *data,const VkDeviceSize size, const RectScope2ui &, VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
// bool ChangeTexture2DArray(Texture2DArray *,DeviceBuffer *buf, const List<Image2DRegion> &, const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); // bool ChangeTexture2DArray(Texture2DArray *,DeviceBuffer *buf, const ArrayList<Image2DRegion> &, const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
bool ChangeTexture2DArray(Texture2DArray *,DeviceBuffer *buf, const RectScope2ui &, const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); bool ChangeTexture2DArray(Texture2DArray *,DeviceBuffer *buf, const RectScope2ui &, const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
bool ChangeTexture2DArray(Texture2DArray *,const void *data,const VkDeviceSize size,const RectScope2ui &, const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); bool ChangeTexture2DArray(Texture2DArray *,const void *data,const VkDeviceSize size,const RectScope2ui &, const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags=VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);

View File

@ -274,7 +274,7 @@ struct ShaderVariable
Interpolation interpolation; //插值方式 Interpolation interpolation; //插值方式
}; };
using SVList=List<ShaderVariable>; using SVList=ArrayList<ShaderVariable>;
struct ShaderVariableArray:public Comparator<ShaderVariableArray> struct ShaderVariableArray:public Comparator<ShaderVariableArray>
{ {

View File

@ -37,7 +37,7 @@ protected:
AnsiString mi_codes; AnsiString mi_codes;
List<const char *> function_list; ArrayList<const char *> function_list;
AnsiString main_function; AnsiString main_function;
AnsiString final_shader; AnsiString final_shader;

View File

@ -9,8 +9,8 @@
namespace hgl{namespace graph namespace hgl{namespace graph
{ {
using UBODescriptorList=List<const UBODescriptor *>; using UBODescriptorList=ArrayList<const UBODescriptor *>;
using SamplerDescriptorList=List<const SamplerDescriptor *>; using SamplerDescriptorList=ArrayList<const SamplerDescriptor *>;
using ConstValueDescriptorList=ObjectList<ConstValueDescriptor>; using ConstValueDescriptorList=ObjectList<ConstValueDescriptor>;
using SubpassInputDescriptorList=ObjectList<SubpassInputDescriptor>; using SubpassInputDescriptorList=ObjectList<SubpassInputDescriptor>;

View File

@ -11,7 +11,7 @@ inline void debug_out_vk_version(const uint32_t version)
<<VK_VERSION_PATCH(version); <<VK_VERSION_PATCH(version);
} }
inline void debug_out(const char *front,const hgl::List<VkLayerProperties> &layer_properties) inline void debug_out(const char *front,const hgl::ArrayList<VkLayerProperties> &layer_properties)
{ {
const int property_count=layer_properties.GetCount(); const int property_count=layer_properties.GetCount();
@ -32,7 +32,7 @@ inline void debug_out(const char *front,const hgl::List<VkLayerProperties> &laye
} }
} }
inline void debug_out(const char *front,const hgl::List<VkExtensionProperties> &extension_properties) inline void debug_out(const char *front,const hgl::ArrayList<VkExtensionProperties> &extension_properties)
{ {
const int extension_count=extension_properties.GetCount(); const int extension_count=extension_properties.GetCount();

View File

@ -160,7 +160,7 @@ bool TextureManager::CommitTexture2DMipmaps(Texture2D *tex,DeviceBuffer *buf,con
return CopyBufferToImage2D(tex,buf,buffer_image_copy,miplevel,VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); return CopyBufferToImage2D(tex,buf,buffer_image_copy,miplevel,VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
} }
bool TextureManager::ChangeTexture2D(Texture2D *tex,DeviceBuffer *buf,const List<Image2DRegion> &ir_list,VkPipelineStageFlags destinationStage) bool TextureManager::ChangeTexture2D(Texture2D *tex,DeviceBuffer *buf,const ArrayList<Image2DRegion> &ir_list,VkPipelineStageFlags destinationStage)
{ {
if(!tex||!buf||ir_list.GetCount()<=0) if(!tex||!buf||ir_list.GetCount()<=0)
return(false); return(false);

View File

@ -169,7 +169,7 @@ Texture2DArray *TextureManager::CreateTexture2DArray(const uint32_t w,const uint
// return CopyBufferToImageArray(tex,buf,buffer_image_copy,miplevel,VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); // return CopyBufferToImageArray(tex,buf,buffer_image_copy,miplevel,VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
//} //}
// //
//bool GPUDevice::ChangeTexture2DArray(Texture2DArray *tex,DeviceBuffer *buf,const List<Image2DRegion> &ir_list,const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags destinationStage) //bool GPUDevice::ChangeTexture2DArray(Texture2DArray *tex,DeviceBuffer *buf,const ArrayList<Image2DRegion> &ir_list,const uint32_t base_layer,const uint32_t layer_count,VkPipelineStageFlags destinationStage)
//{ //{
// if(!tex||!buf||ir_list.GetCount()<=0) // if(!tex||!buf||ir_list.GetCount()<=0)
// return(false); // return(false);

View File

@ -148,7 +148,7 @@ bool TextureManager::CommitTextureCubeMipmaps(TextureCube *tex,DeviceBuffer *buf
return CopyBufferToImageCube(tex,buf,buffer_image_copy,miplevel,VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); return CopyBufferToImageCube(tex,buf,buffer_image_copy,miplevel,VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
} }
//bool GPUDevice::ChangeTexture2D(Texture2D *tex,DeviceBuffer *buf,const List<Image2DRegion> &ir_list,VkPipelineStageFlags destinationStage) //bool GPUDevice::ChangeTexture2D(Texture2D *tex,DeviceBuffer *buf,const ArrayList<Image2DRegion> &ir_list,VkPipelineStageFlags destinationStage)
//{ //{
// if(!tex||!buf||ir_list.GetCount()<=0) // if(!tex||!buf||ir_list.GetCount()<=0)
// return(false); // return(false);

View File

@ -34,7 +34,7 @@ Framebuffer *RenderTargetManager::CreateFBO(RenderPass *rp,ImageView **color_lis
if(color_count) if(color_count)
{ {
const List<VkFormat> &cf_list=rp->GetColorFormat(); const ArrayList<VkFormat> &cf_list=rp->GetColorFormat();
const VkFormat *cf=cf_list.GetData(); const VkFormat *cf=cf_list.GetData();
ImageView **iv=color_list; ImageView **iv=color_list;
@ -81,7 +81,7 @@ Framebuffer *RenderTargetManager::CreateFBO(RenderPass *rp,ImageView **color_lis
return(new Framebuffer(GetVkDevice(),fbo,extent,rp,color_count,depth)); return(new Framebuffer(GetVkDevice(),fbo,extent,rp,color_count,depth));
} }
// //
//Framebuffer *RenderTargetManager::CreateFBO(RenderPass *rp,List<ImageView *> &color,ImageView *depth) //Framebuffer *RenderTargetManager::CreateFBO(RenderPass *rp,ArrayList<ImageView *> &color,ImageView *depth)
//{ //{
// if(!rp)return(nullptr); // if(!rp)return(nullptr);
// //

View File

@ -5,7 +5,7 @@
VK_NAMESPACE_BEGIN VK_NAMESPACE_BEGIN
namespace namespace
{ {
void debug_queue_family_properties_out(const char *front,const List<VkQueueFamilyProperties> &qfp_list) void debug_queue_family_properties_out(const char *front,const ArrayList<VkQueueFamilyProperties> &qfp_list)
{ {
constexpr const char *queue_bit_name[]= constexpr const char *queue_bit_name[]=
{ {

View File

@ -6,12 +6,12 @@ VK_NAMESPACE_BEGIN
namespace namespace
{ {
static List<VkLayerProperties> layer_properties; static ArrayList<VkLayerProperties> layer_properties;
static List<VkExtensionProperties> extension_properties; static ArrayList<VkExtensionProperties> extension_properties;
}//namespace }//namespace
const List<VkLayerProperties> &GetLayerProperties(){return layer_properties;} const ArrayList<VkLayerProperties> &GetLayerProperties(){return layer_properties;}
const List<VkExtensionProperties> &GetExtensionProperties(){return extension_properties;} const ArrayList<VkExtensionProperties> &GetExtensionProperties(){return extension_properties;}
void InitVulkanInstanceProperties() void InitVulkanInstanceProperties()
{ {

View File

@ -5,7 +5,7 @@
#include<hgl/graph/VKMaterial.h> #include<hgl/graph/VKMaterial.h>
#include<hgl/graph/VKMaterialInstance.h> #include<hgl/graph/VKMaterialInstance.h>
VK_NAMESPACE_BEGIN VK_NAMESPACE_BEGIN
RenderPass::RenderPass(VkDevice d,VkPipelineCache pc,VkRenderPass rp,const List<VkFormat> &cf,VkFormat df) RenderPass::RenderPass(VkDevice d,VkPipelineCache pc,VkRenderPass rp,const ArrayList<VkFormat> &cf,VkFormat df)
{ {
device=d; device=d;
pipeline_cache=pc; pipeline_cache=pc;

View File

@ -18,7 +18,7 @@
VK_NAMESPACE_BEGIN VK_NAMESPACE_BEGIN
namespace namespace
{ {
void CreateShaderStageList(List<VkPipelineShaderStageCreateInfo> &shader_stage_list,ShaderModuleMap *shader_maps) void CreateShaderStageList(ArrayList<VkPipelineShaderStageCreateInfo> &shader_stage_list,ShaderModuleMap *shader_maps)
{ {
const ShaderModule *sm; const ShaderModule *sm;

View File

@ -31,7 +31,7 @@ namespace hgl::graph
return component_manager_map.at(hash_code); return component_manager_map.at(hash_code);
} }
int ComponentManager::GetComponents(List<Component *> &comp_list,SceneNode *node) int ComponentManager::GetComponents(ArrayList<Component *> &comp_list,SceneNode *node)
{ {
if(!node)return(-1); if(!node)return(-1);

View File

@ -3,7 +3,7 @@
#include<hgl/graph/VKPhysicalDevice.h> #include<hgl/graph/VKPhysicalDevice.h>
VK_NAMESPACE_BEGIN VK_NAMESPACE_BEGIN
void CreateSubpassDependency(List<VkSubpassDependency> &subpass_dependency_list,const uint32_t count) void CreateSubpassDependency(ArrayList<VkSubpassDependency> &subpass_dependency_list,const uint32_t count)
{ {
if(count<=0)return; if(count<=0)return;
@ -73,7 +73,7 @@ inline void CreateColorAttachmentReference(VkAttachmentReference *ref_list, uint
inline void CreateDepthAttachmentReference(VkAttachmentReference *depth_ref,uint index) {CreateAttachmentReference(depth_ref, index,1 ,VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);} inline void CreateDepthAttachmentReference(VkAttachmentReference *depth_ref,uint index) {CreateAttachmentReference(depth_ref, index,1 ,VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL);}
inline void CreateInputAttachmentReference(VkAttachmentReference *ref_list, uint start,uint count) {CreateAttachmentReference(ref_list, start,count,VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);} inline void CreateInputAttachmentReference(VkAttachmentReference *ref_list, uint start,uint count) {CreateAttachmentReference(ref_list, start,count,VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);}
bool CreateAttachmentDescription(List<VkAttachmentDescription> &desc_list,const RenderbufferInfo *rbi) bool CreateAttachmentDescription(ArrayList<VkAttachmentDescription> &desc_list,const RenderbufferInfo *rbi)
{ {
const uint image_count=rbi->GetColorCount(); const uint image_count=rbi->GetColorCount();
@ -117,7 +117,7 @@ bool CreateAttachmentDescription(List<VkAttachmentDescription> &desc_list,const
return(true); return(true);
} }
bool CreateColorAttachment( List<VkAttachmentReference> &ref_list,List<VkAttachmentDescription> &desc_list,const List<VkFormat> &color_format,const VkImageLayout color_final_layout=VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL) bool CreateColorAttachment( ArrayList<VkAttachmentReference> &ref_list,ArrayList<VkAttachmentDescription> &desc_list,const ArrayList<VkFormat> &color_format,const VkImageLayout color_final_layout=VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL)
{ {
//const VkFormat *cf=color_format_list.GetData(); //const VkFormat *cf=color_format_list.GetData();
@ -155,7 +155,7 @@ bool CreateColorAttachment( List<VkAttachmentReference> &ref_list,List<VkAttachm
return(true); return(true);
} }
bool CreateDepthAttachment( List<VkAttachmentReference> &ref_list,List<VkAttachmentDescription> &desc_list,const VkFormat &depth_format,const VkImageLayout depth_final_layout=VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL) bool CreateDepthAttachment( ArrayList<VkAttachmentReference> &ref_list,ArrayList<VkAttachmentDescription> &desc_list,const VkFormat &depth_format,const VkImageLayout depth_final_layout=VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL)
{ {
//if(!attr->physical_device->IsDepthAttachmentOptimal(depth_format)) //if(!attr->physical_device->IsDepthAttachmentOptimal(depth_format))
// return(false); // return(false);
@ -263,9 +263,9 @@ namespace
} }
} }
RenderPass *RenderPassManager::CreateRenderPass(const List<VkAttachmentDescription> &desc_list, RenderPass *RenderPassManager::CreateRenderPass(const ArrayList<VkAttachmentDescription> &desc_list,
const List<VkSubpassDescription> &subpass, const ArrayList<VkSubpassDescription> &subpass,
const List<VkSubpassDependency> &dependency, const ArrayList<VkSubpassDependency> &dependency,
const RenderbufferInfo *rbi) const RenderbufferInfo *rbi)
{ {
const VkFormat depth_format=rbi->GetDepthFormat(); const VkFormat depth_format=rbi->GetDepthFormat();
@ -311,11 +311,11 @@ RenderPass *RenderPassManager::AcquireRenderPass(const RenderbufferInfo *rbi,con
if(RenderPassList.Get(hash,rp)) if(RenderPassList.Get(hash,rp))
return rp; return rp;
List<VkAttachmentReference> color_ref_list; ArrayList<VkAttachmentReference> color_ref_list;
VkAttachmentReference depth_ref; VkAttachmentReference depth_ref;
List<VkAttachmentDescription> atta_desc_list; ArrayList<VkAttachmentDescription> atta_desc_list;
List<VkSubpassDescription> subpass_desc_list; ArrayList<VkSubpassDescription> subpass_desc_list;
List<VkSubpassDependency> subpass_dependency_list; ArrayList<VkSubpassDependency> subpass_dependency_list;
color_ref_list.SetCount(rbi->GetColorCount()); color_ref_list.SetCount(rbi->GetColorCount());
CreateColorAttachmentReference(color_ref_list.GetData(),0,rbi->GetColorCount()); CreateColorAttachmentReference(color_ref_list.GetData(),0,rbi->GetColorCount());

View File

@ -89,7 +89,7 @@ namespace hgl
LocalBoundingBox=local; LocalBoundingBox=local;
} }
int SceneNode::GetComponents(List<Component *> &comp_list,const ComponentManager *mgr) int SceneNode::GetComponents(ArrayList<Component *> &comp_list,const ComponentManager *mgr)
{ {
if(!mgr)return(-1); if(!mgr)return(-1);
if(ComponentIsEmpty())return(0); if(ComponentIsEmpty())return(0);

View File

@ -47,7 +47,7 @@ namespace material_file
AccumMemoryManager::Block *block; AccumMemoryManager::Block *block;
}; };
using UBODataList=List<UBOData>; using UBODataList=ArrayList<UBOData>;
struct ShaderData struct ShaderData
{ {
@ -56,7 +56,7 @@ namespace material_file
const char * code; const char * code;
uint code_length; uint code_length;
List<SamplerData> sampler; ArrayList<SamplerData> sampler;
public: public: