upgraded codes and then it can run.

This commit is contained in:
2023-07-28 20:17:46 +08:00
parent df80b1af3b
commit 7967150722
35 changed files with 247 additions and 48 deletions

View File

@@ -1,7 +1,7 @@
#ifndef HGL_GRAPH_SCENE_NODE_INCLUDE
#define HGL_GRAPH_SCENE_NODE_INCLUDE
#include<hgl/type/List.h>
#include<hgl/type/ObjectList.h>
#include<hgl/graph/SceneOrient.h>
#include<hgl/graph/VK.h>
#include<hgl/graph/AABB.h>

View File

@@ -3,8 +3,8 @@
#include<hgl/io/InputStream.h>
#include<hgl/type/String.h>
#include<hgl/graph/Bitmap.h>
#include<hgl/graph/VKFormat.h>
#include<hgl/graph/BitmapData.h>
namespace hgl
{
namespace graph

View File

@@ -1,32 +1,17 @@
#ifndef HGL_GRAPH_TILE_DATA_INCLUDE
#define HGL_GRAPH_TILE_DATA_INCLUDE
#include<hgl/type/Map.h>
#include<hgl/type/Pool.h>
#include<hgl/type/RectScope.h>
#include<hgl/graph/Bitmap.h>
#include<hgl/graph/BitmapData.h>
#include<hgl/graph/ImageRegion.h>
#include<hgl/graph/tile/TileObject.h>
#include<hgl/graph/VKTexture.h>
VK_NAMESPACE_USING
namespace hgl
{
namespace graph
{
using TileUVPixel=RectScope2i;
using TileUVFloat=RectScope2f;
using TileUVFloatList=List<TileUVFloat>;
using TileUVFloatMap=Map<u32char,TileUVFloat>;
struct TileObject
{
int col,row; //当前tile在整个纹理中的tile位置
TileUVPixel uv_pixel; //以象素为单位的tile位置和尺寸
TileUVFloat uv_float; //以浮点为单位的tile位置和尺寸
};//struct TileObject
/**
* TileData是一种处理大量等同尺寸及格式贴图的管理机制程序会自动根据显卡最大贴图处理能力来创建尽可能符合需求的贴图。(注Tile的大小不必符合2次幂)
* Tile的增加或删除程序会自动排序尽可能小的减少I/O消耗。

View File

@@ -1,6 +1,7 @@
#ifndef HGL_GRAPH_VULKAN_INCLUDE
#define HGL_GRAPH_VULKAN_INCLUDE
#include<hgl/type/List.h>
#include<hgl/math/Math.h>
#include<hgl/type/String.h>
#include<hgl/type/Map.h>

View File

@@ -64,7 +64,7 @@ public:
{
if(index>=cv_count)return;
hgl_cpy(clear_values[index].color.float32,cc.rgba,4);
hgl_cpy(clear_values[index].stop_color.float32,cc.rgba,4);
}
void SetClearDepthStencil(uint32_t index,float d=1.0f,float s=0)

View File

@@ -2,6 +2,7 @@
#define HGL_GRAPH_DESCRIPTOR_BINDING_MANAGE_INCLUDE
#include<hgl/type/Map.h>
#include<hgl/type/String.h>
#include<hgl/graph/VKDescriptorSetType.h>
namespace hgl
{

View File

@@ -3,6 +3,7 @@
#include<hgl/graph/VK.h>
#include<hgl/type/Map.h>
#include<hgl/type/ObjectList.h>
#include<hgl/type/SortedSets.h>
VK_NAMESPACE_BEGIN
class DeviceBuffer;

View File

@@ -5,8 +5,9 @@
#include<hgl/type/String.h>
#include<hgl/type/Map.h>
#include<hgl/type/RectScope.h>
#include<hgl/graph/ImageRegion.h>
#include<hgl/platform/Window.h>
#include<hgl/graph/Bitmap.h>
#include<hgl/graph/BitmapData.h>
#include<hgl/graph/font/Font.h>
#include<hgl/graph/VK.h>
#include<hgl/graph/VKDeviceAttribute.h>

View File

@@ -2,7 +2,7 @@
#define HGL_GRAPH_VULKAN_INSTANCE_INCLUDE
#include<hgl/type/String.h>
#include<hgl/type/List.h>
#include<hgl/type/ObjectList.h>
#include<hgl/platform/Window.h>
#include<hgl/graph/VKPhysicalDevice.h>
#include<hgl/graph/VKDebugOut.h>

View File

@@ -3,7 +3,7 @@
#include<hgl/graph/VK.h>
#include<hgl/graph/VKPipeline.h>
#include<hgl/type/List.h>
#include<hgl/type/ObjectList.h>
VK_NAMESPACE_BEGIN
/**
* RenderPass功能封装<br>

View File

@@ -13,7 +13,7 @@
#include<hgl/graph/VertexAttribData.h>
#include<hgl/graph/VKRenderable.h>
#include<hgl/graph/font/TextPrimitive.h>
#include<hgl/type/ResManage.h>
#include<hgl/type/ObjectManage.h>
#include<hgl/shadergen/MaterialCreateInfo.h>
#include<hgl/graph/VKDescriptorBindingManage.h>
@@ -43,14 +43,14 @@ class RenderResource
Map<AnsiString,Material *> material_by_name;
Map<OSString,Texture *> texture_by_name;
IDResManage<MaterialID, Material> rm_material; ///<材质合集
IDResManage<MaterialInstanceID, MaterialInstance> rm_material_instance; ///<材质实例合集
IDResManage<DescriptorSetID, DescriptorSet> rm_desc_sets; ///<描述符合集
IDResManage<PrimitiveID, Primitive> rm_primitives; ///<图元合集
IDResManage<BufferID, DeviceBuffer> rm_buffers; ///<顶点缓冲区合集
IDResManage<SamplerID, Sampler> rm_samplers; ///<采样器合集
IDResManage<TextureID, Texture> rm_textures; ///<纹理合集
IDResManage<RenderableID, Renderable> rm_renderables; ///<渲染实例集合集
IDObjectManage<MaterialID, Material> rm_material; ///<材质合集
IDObjectManage<MaterialInstanceID, MaterialInstance> rm_material_instance; ///<材质实例合集
IDObjectManage<DescriptorSetID, DescriptorSet> rm_desc_sets; ///<描述符合集
IDObjectManage<PrimitiveID, Primitive> rm_primitives; ///<图元合集
IDObjectManage<BufferID, DeviceBuffer> rm_buffers; ///<顶点缓冲区合集
IDObjectManage<SamplerID, Sampler> rm_samplers; ///<采样器合集
IDObjectManage<TextureID, Texture> rm_textures; ///<纹理合集
IDObjectManage<RenderableID, Renderable> rm_renderables; ///<渲染实例集合集
public:

View File

@@ -4,7 +4,7 @@
#include<hgl/graph/VK.h>
#include<hgl/graph/VKMemory.h>
#include<hgl/graph/VKImageView.h>
#include<hgl/graph/Bitmap.h>
#include<hgl/graph/BitmapData.h>
#include<hgl/type/String.h>
#include<hgl/graph/VKTextureCreateInfo.h>
VK_NAMESPACE_BEGIN

View File

@@ -9,6 +9,8 @@ namespace hgl
{
namespace graph
{
using TileUVFloatMap=Map<u32char,RectScope2f>;
using TileResPool=ResPool<u32char,TileObject *>;
/**