diff --git a/CMSceneGraph b/CMSceneGraph index fba5b2de..96602530 160000 --- a/CMSceneGraph +++ b/CMSceneGraph @@ -1 +1 @@ -Subproject commit fba5b2deea8784703ccdf7f6c18056178daefc3c +Subproject commit 966025309dba8921bd0ba1c198fbae38620b0aa3 diff --git a/example/Vulkan/DeferredRender.cpp b/example/Vulkan/DeferredRender.cpp index 21f1c8d4..61cf4cc7 100644 --- a/example/Vulkan/DeferredRender.cpp +++ b/example/Vulkan/DeferredRender.cpp @@ -262,7 +262,7 @@ private: } Sampler *CreateSampler(Texture *tex) - { + { VkSamplerCreateInfo sci= { VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, diff --git a/example/Vulkan/InstanceTriangle.cpp b/example/Vulkan/InstanceTriangle.cpp index fb7d6f69..f545ebce 100644 --- a/example/Vulkan/InstanceTriangle.cpp +++ b/example/Vulkan/InstanceTriangle.cpp @@ -57,7 +57,7 @@ private: if(!primitive)return(false); if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data )))return(false); - if(!primitive->Set(VAN::BaseColor, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false); + if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false); render_obj=db->CreateRenderable(primitive,material_instance,pipeline); return(true); diff --git a/example/Vulkan/RayPicking.cpp b/example/Vulkan/RayPicking.cpp index fa846178..b0306fbc 100644 --- a/example/Vulkan/RayPicking.cpp +++ b/example/Vulkan/RayPicking.cpp @@ -107,7 +107,7 @@ private: if(!ro_line)return(false); if(!ro_line->Set(VAN::Position, vbo_pos=db->CreateVBO(VF_V3F,2,position_data )))return(false); - if(!ro_line->Set(VAN::BaseColor, db->CreateVBO(VF_V4F,2,color_data )))return(false); + if(!ro_line->Set(VAN::Color, db->CreateVBO(VF_V4F,2,color_data )))return(false); } return(true); diff --git a/example/Vulkan/first_triangle.cpp b/example/Vulkan/first_triangle.cpp index c3aefaea..68a050bc 100644 --- a/example/Vulkan/first_triangle.cpp +++ b/example/Vulkan/first_triangle.cpp @@ -57,10 +57,10 @@ private: if(!primitive)return(false); if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data )))return(false); - if(!primitive->Set(VAN::BaseColor, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false); + if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false); render_obj=db->CreateRenderable(primitive,material_instance,pipeline); - return(true); + return(render_obj); } public: diff --git a/example/Vulkan/second_triangle.cpp b/example/Vulkan/second_triangle.cpp index 284192a7..abfd733e 100644 --- a/example/Vulkan/second_triangle.cpp +++ b/example/Vulkan/second_triangle.cpp @@ -60,7 +60,7 @@ private: if(!primitive)return(false); if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data )))return(false); - if(!primitive->Set(VAN::BaseColor, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false); + if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false); render_obj=db->CreateRenderable(primitive,material_instance,pipeline); return(true); diff --git a/example/Vulkan/third_triangle.cpp b/example/Vulkan/third_triangle.cpp index a210d2a3..82b1a9d0 100644 --- a/example/Vulkan/third_triangle.cpp +++ b/example/Vulkan/third_triangle.cpp @@ -61,7 +61,7 @@ private: if(!primitive)return(false); if(!primitive->Set(VAN::Position, db->CreateVBO(VF_V2F,VERTEX_COUNT,position_data )))return(false); - if(!primitive->Set(VAN::BaseColor, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false); + if(!primitive->Set(VAN::Color, db->CreateVBO(VF_V4F,VERTEX_COUNT,color_data )))return(false); render_obj=db->CreateRenderable(primitive,material_instance,pipeline); diff --git a/inc/hgl/graph/VertexAttribData.h b/inc/hgl/graph/VertexAttribData.h index 8af90276..64aee685 100644 --- a/inc/hgl/graph/VertexAttribData.h +++ b/inc/hgl/graph/VertexAttribData.h @@ -14,7 +14,7 @@ namespace hgl #define VAN_DEFINE(name) constexpr char name[]=#name; VAN_DEFINE(Position) VAN_DEFINE(Normal) - VAN_DEFINE(BaseColor) + VAN_DEFINE(Color) VAN_DEFINE(Tangent) VAN_DEFINE(Bitangent) VAN_DEFINE(TexCoord) diff --git a/src/SceneGraph/InlineGeometry.cpp b/src/SceneGraph/InlineGeometry.cpp index 50841c61..93ce1768 100644 --- a/src/SceneGraph/InlineGeometry.cpp +++ b/src/SceneGraph/InlineGeometry.cpp @@ -132,7 +132,7 @@ namespace hgl } AutoDelete vertex=rc.CreateVADA(VAN::Position); - AutoDelete color=rc.CreateVADA(VAN::BaseColor); + AutoDelete color=rc.CreateVADA(VAN::Color); if(!vertex) return(nullptr); @@ -186,7 +186,7 @@ namespace hgl to(pgci->coord[0],pgci->coord[3],pos)); } - AutoDelete color=rc.CreateVADA(VAN::BaseColor); + AutoDelete color=rc.CreateVADA(VAN::Color); if(color) { for(uint row=0;row<=pgci->step.x;row++) @@ -323,7 +323,7 @@ namespace hgl { ENUM_CLASS_RANGE_ERROR_RETURN_NULLPTR(cci->color_type); - AutoDelete color=rc.CreateVADA(VAN::BaseColor); + AutoDelete color=rc.CreateVADA(VAN::Color); if(color) { @@ -1151,7 +1151,7 @@ namespace hgl return(nullptr); AutoDelete vertex=rc.CreateVADA(VAN::Position); - AutoDelete color=rc.CreateVADA(VAN::BaseColor); + AutoDelete color=rc.CreateVADA(VAN::Color); if(!vertex||!color) return(nullptr); @@ -1205,7 +1205,7 @@ namespace hgl { ENUM_CLASS_RANGE_ERROR_RETURN_NULLPTR(cci->color_type); - AutoDelete color=rc.CreateVADA(VAN::BaseColor); + AutoDelete color=rc.CreateVADA(VAN::Color); if(color) { diff --git a/src/SceneGraph/Vulkan/VKPipelineCache.cpp b/src/SceneGraph/Vulkan/VKPipelineCache.cpp index f1ae611f..ed589790 100644 --- a/src/SceneGraph/Vulkan/VKPipelineCache.cpp +++ b/src/SceneGraph/Vulkan/VKPipelineCache.cpp @@ -55,11 +55,8 @@ namespace VkPipelineCache CreatePipelineCache(VkDevice device,const VkPhysicalDeviceProperties &pdp) { - VkPipelineCacheCreateInfo pipelineCache; - - pipelineCache.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; - pipelineCache.pNext = nullptr; - pipelineCache.flags = 0; + PipelineCacheCreateInfo pipelineCache; + pipelineCache.initialDataSize = 0; pipelineCache.pInitialData = nullptr;