Skip to content

Commit

Permalink
HMDModel : Moved lodConfig caching directly in getLodConfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
TothBenoit committed Dec 6, 2024
1 parent 53ff327 commit 1a57526
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions h3d/prim/HMDModel.hx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class HMDModel extends MeshPrimitive {
if ( lodCount == 1 )
return 0;

lodConfig = getLodConfig();
var lodConfig = getLodConfig();
if ( lodConfig != null && lodConfig.length >= lodCount - 1) {
var lodLevel : Int = 0;
var maxIter = ( ( lodConfig.length > lodCount - 1 ) ? lodCount - 1: lodConfig.length );
Expand All @@ -324,6 +324,7 @@ class HMDModel extends MeshPrimitive {
return lodConfig;

var d = lib.resource.entry.directory;
return @:privateAccess ModelDatabase.current.getDefaultLodConfig(d);
lodConfig = @:privateAccess ModelDatabase.current.getDefaultLodConfig(d);
return lodConfig;
}
}

0 comments on commit 1a57526

Please sign in to comment.