diff --git a/CMCore b/CMCore index 61556126..4d58256a 160000 --- a/CMCore +++ b/CMCore @@ -1 +1 @@ -Subproject commit 6155612605a079c84b666314c48e1704d2600554 +Subproject commit 4d58256a3d5caec9258d0059996dbed5627ff02a diff --git a/CMSceneGraph b/CMSceneGraph index 4d21058a..8fd176b8 160000 --- a/CMSceneGraph +++ b/CMSceneGraph @@ -1 +1 @@ -Subproject commit 4d21058a12ed1ba1148436f1f0d550150251ff3e +Subproject commit 8fd176b8fa8ca605a4b80e766c06c48ce5b1aa85 diff --git a/inc/hgl/graph/PrimitiveCreater.h b/inc/hgl/graph/PrimitiveCreater.h index a25fc059..56894963 100644 --- a/inc/hgl/graph/PrimitiveCreater.h +++ b/inc/hgl/graph/PrimitiveCreater.h @@ -54,7 +54,7 @@ namespace hgl VAD * CreateVAD(const AnsiString &name); ///<创建一个顶点属性缓冲区 template - T * CreateVADA(const AnsiString &name) ///<创建一个顶点属性缓冲区以及访问器 + T * AccessVAD(const AnsiString &name) ///<创建一个顶点属性缓冲区以及访问器 { const VkFormat format=vil->GetVulkanFormat(name); @@ -66,11 +66,11 @@ namespace hgl if(!vad) return(nullptr); - T *vada=T::Create(vad); + T *access=T::Create(vad); - vada->Begin(); + access->Begin(); - return vada; + return access; } bool WriteVAD(const AnsiString &name,const void *data,const uint32_t bytes); ///<直接写入顶点属性数据 diff --git a/src/SceneGraph/InlineGeometry.cpp b/src/SceneGraph/InlineGeometry.cpp index 461727bd..4271dcd0 100644 --- a/src/SceneGraph/InlineGeometry.cpp +++ b/src/SceneGraph/InlineGeometry.cpp @@ -21,7 +21,7 @@ namespace hgl if(!rc.Init(4)) return(nullptr); - AutoDelete vertex=rc.CreateVADA(VAN::Position); + AutoDelete vertex=rc.AccessVAD(VAN::Position); if(!vertex) return(nullptr); @@ -49,7 +49,7 @@ namespace hgl if(!rc.Init(4)) return(nullptr); - AutoDelete vertex=rc.CreateVADA(VAN::Position); + AutoDelete vertex=rc.AccessVAD(VAN::Position); vertex->WriteRectFan(rci->scope); } @@ -63,7 +63,7 @@ namespace hgl if(!rc.Init(rci->round_per*4)) return(nullptr); - AutoDelete vertex=rc.CreateVADA(VAN::Position); + AutoDelete vertex=rc.AccessVAD(VAN::Position); Vector2f *coord=new Vector2f[rci->round_per]; @@ -131,8 +131,8 @@ namespace hgl if(!rc.Init(cci->field_count))return(nullptr); } - AutoDelete vertex=rc.CreateVADA(VAN::Position); - AutoDelete color=rc.CreateVADA(VAN::Color); + AutoDelete vertex=rc.AccessVAD(VAN::Position); + AutoDelete color=rc.AccessVAD(VAN::Color); if(!vertex) return(nullptr); @@ -169,7 +169,7 @@ namespace hgl if(!rc.Init(((pgci->step.x+1)+(pgci->step.y+1))*2)) return(nullptr); - AutoDelete vertex=rc.CreateVADA(VAN::Position); + AutoDelete vertex=rc.AccessVAD(VAN::Position); for(uint row=0;row<=pgci->step.x;row++) { float pos=float(row)/float(pgci->step.x); @@ -186,7 +186,7 @@ namespace hgl to(pgci->coord[0],pgci->coord[3],pos)); } - AutoDelete color=rc.CreateVADA(VAN::Color); + AutoDelete color=rc.AccessVAD(VAN::Color); if(color) { for(uint row=0;row<=pgci->step.x;row++) @@ -224,19 +224,19 @@ namespace hgl rc.WriteVAD(VAN::Position,xy_vertices,sizeof(xy_vertices)); { - AutoDelete normal=rc.CreateVADA(VAN::Normal); + AutoDelete normal=rc.AccessVAD(VAN::Normal); if(normal)normal->RepeatWrite(xy_normal,4); } { - AutoDelete tangent=rc.CreateVADA(VAN::Tangent); + AutoDelete tangent=rc.AccessVAD(VAN::Tangent); tangent->RepeatWrite(xy_tangent,4); } { - AutoDelete tex_coord=rc.CreateVADA(VAN::TexCoord); + AutoDelete tex_coord=rc.AccessVAD(VAN::TexCoord); if(tex_coord) { @@ -323,7 +323,7 @@ namespace hgl { RANGE_CHECK_RETURN_NULLPTR(cci->color_type); - AutoDelete color=rc.CreateVADA(VAN::Color); + AutoDelete color=rc.AccessVAD(VAN::Color); if(color) { @@ -461,10 +461,10 @@ namespace hgl if(!rc.Init(numberVertices)) return(nullptr); - AutoDelete vertex=rc.CreateVADA(VAN::Position); - AutoDelete normal=rc.CreateVADA(VAN::Normal); - AutoDelete tangent=rc.CreateVADA(VAN::Tangent); - AutoDelete tex_coord=rc.CreateVADA(VAN::TexCoord); + AutoDelete vertex=rc.AccessVAD(VAN::Position); + AutoDelete normal=rc.AccessVAD(VAN::Normal); + AutoDelete tangent=rc.AccessVAD(VAN::Tangent); + AutoDelete tex_coord=rc.AccessVAD(VAN::TexCoord); float *vp=vertex->Get(); float *np=normal?normal->Get():nullptr; @@ -542,10 +542,10 @@ namespace hgl if(!rc.Init(numberVertices)) return(nullptr); - AutoDelete vertex=rc.CreateVADA(VAN::Position); - AutoDelete normal=rc.CreateVADA(VAN::Normal); - AutoDelete tangent=rc.CreateVADA(VAN::Tangent); - AutoDelete tex_coord=rc.CreateVADA(VAN::TexCoord); + AutoDelete vertex=rc.AccessVAD(VAN::Position); + AutoDelete normal=rc.AccessVAD(VAN::Normal); + AutoDelete tangent=rc.AccessVAD(VAN::Tangent); + AutoDelete tex_coord=rc.AccessVAD(VAN::TexCoord); float *vp=vertex->Get(); float *np=normal?normal->Get():nullptr; @@ -679,10 +679,10 @@ namespace hgl if(!rc.Init(numberVertices)) return(nullptr); - AutoDelete vertex=rc.CreateVADA(VAN::Position); - AutoDelete normal=rc.CreateVADA(VAN::Normal); - AutoDelete tangent=rc.CreateVADA(VAN::Tangent); - AutoDelete tex_coord=rc.CreateVADA(VAN::TexCoord); + AutoDelete vertex=rc.AccessVAD(VAN::Position); + AutoDelete normal=rc.AccessVAD(VAN::Normal); + AutoDelete tangent=rc.AccessVAD(VAN::Tangent); + AutoDelete tex_coord=rc.AccessVAD(VAN::TexCoord); float *vp=vertex->Get(); float *np=normal?normal->Get():nullptr; @@ -814,10 +814,10 @@ namespace hgl if (cci->numberSlices < 3 || numberVertices > GLUS_MAX_VERTICES || numberIndices > GLUS_MAX_INDICES) return nullptr; - AutoDelete vertex=rc.CreateVADA(VAN::Position); - AutoDelete normal=rc.CreateVADA(VAN::Normal); - AutoDelete tangent=rc.CreateVADA(VAN::Tangent); - AutoDelete tex_coord=rc.CreateVADA(VAN::TexCoord); + AutoDelete vertex=rc.AccessVAD(VAN::Position); + AutoDelete normal=rc.AccessVAD(VAN::Normal); + AutoDelete tangent=rc.AccessVAD(VAN::Tangent); + AutoDelete tex_coord=rc.AccessVAD(VAN::TexCoord); float *vp=vertex->Get(); float *np=normal?normal->Get():nullptr; @@ -1036,10 +1036,10 @@ namespace hgl if (cci->numberSlices < 3 || cci->numberStacks < 1 || numberVertices > GLUS_MAX_VERTICES || numberIndices > GLUS_MAX_INDICES) return nullptr; - AutoDelete vertex=rc.CreateVADA(VAN::Position); - AutoDelete normal=rc.CreateVADA(VAN::Normal); - AutoDelete tangent=rc.CreateVADA(VAN::Tangent); - AutoDelete tex_coord=rc.CreateVADA(VAN::TexCoord); + AutoDelete vertex=rc.AccessVAD(VAN::Position); + AutoDelete normal=rc.AccessVAD(VAN::Normal); + AutoDelete tangent=rc.AccessVAD(VAN::Tangent); + AutoDelete tex_coord=rc.AccessVAD(VAN::TexCoord); float *vp=vertex->Get(); float *np=normal?normal->Get():nullptr; @@ -1150,8 +1150,8 @@ namespace hgl if(!rc.Init(6)) return(nullptr); - AutoDelete vertex=rc.CreateVADA(VAN::Position); - AutoDelete color=rc.CreateVADA(VAN::Color); + AutoDelete vertex=rc.AccessVAD(VAN::Position); + AutoDelete color=rc.AccessVAD(VAN::Color); if(!vertex||!color) return(nullptr); @@ -1195,7 +1195,7 @@ namespace hgl if(!rc.Init(8)) return(nullptr); - AutoDelete vertex=rc.CreateVADA(VAN::Position); + AutoDelete vertex=rc.AccessVAD(VAN::Position); if(!vertex)return(nullptr); @@ -1205,7 +1205,7 @@ namespace hgl { RANGE_CHECK_RETURN_NULLPTR(cci->color_type); - AutoDelete color=rc.CreateVADA(VAN::Color); + AutoDelete color=rc.AccessVAD(VAN::Color); if(color) { diff --git a/src/SceneGraph/font/TextLayout.cpp b/src/SceneGraph/font/TextLayout.cpp index 6a70a591..0ac2e2ed 100644 --- a/src/SceneGraph/font/TextLayout.cpp +++ b/src/SceneGraph/font/TextLayout.cpp @@ -162,8 +162,8 @@ namespace hgl // if(!rc->Init(draw_chars_count)) // return(-4); - // vertex =rc->CreateVADA(VAN::Position); - // tex_coord =rc->CreateVADA(VAN::TexCoord); + // vertex =rc->AccessVAD(VAN::Position); + // tex_coord =rc->AccessVAD(VAN::TexCoord); // if(!vertex||!tex_coord) // return(-5);