Compare commits

...

2 Commits

2 changed files with 6 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include<hgl/type/TypeInfo.h>
#include<hgl/math/Matrix.h>
#include<hgl/type/ObjectList.h>
@@ -633,7 +633,7 @@ namespace hgl
bool has_update=false;
for(TransformBase *tb:transform_list)
if(tb->Update())
if(tb->UpdateNewestData())
has_update=true;
if(has_update)

View File

@@ -1,4 +1,4 @@
#pragma once
#pragma once
namespace hgl
{
@@ -55,13 +55,14 @@ namespace hgl
return cur_data;
}
void UpdateNewestData()
bool UpdateNewestData()
{
if(IsNewestVersion())
return;
return(false);
MakeNewestData(cur_data);
cur_version=version;
return(true);
}
const uint32 GetNewestVersion()const { return version; } ///<取得最新的版本号(注意数据可能不是最新的)