diff options
author | makamys <makamys@outlook.com> | 2022-06-04 13:06:50 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2022-06-04 13:29:40 +0200 |
commit | 592aaa64ddf8416b94c4098c614b6cfbb7a81481 (patch) | |
tree | d88dc0a12ba003e798f7e39e86c0fe87275bb5bd /src/main/java/makamys/lodmod/renderer | |
parent | bc057b37b04b2650c8e9cb41406f3bdeb4cd72d1 (diff) | |
download | Neodymium-592aaa64ddf8416b94c4098c614b6cfbb7a81481.tar.gz Neodymium-592aaa64ddf8416b94c4098c614b6cfbb7a81481.tar.bz2 Neodymium-592aaa64ddf8416b94c4098c614b6cfbb7a81481.zip |
Add option to limit number of meshes rendered per frame
Diffstat (limited to 'src/main/java/makamys/lodmod/renderer')
-rw-r--r-- | src/main/java/makamys/lodmod/renderer/LODRenderer.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java index d0de92b..d7504d7 100644 --- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java +++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java @@ -164,7 +164,7 @@ public class LODRenderer { piFirst[i].limit(sentMeshes[i].size() + sentMeshes[i].size()); piCount[i].limit(sentMeshes[i].size() + sentMeshes[i].size()); for(Mesh mesh : sentMeshes[i]) { - if(mesh.visible) { + if(mesh.visible && (LODMod.maxMeshesPerFrame == -1 || renderedMeshes < LODMod.maxMeshesPerFrame)) { renderedMeshes++; piFirst[i].put(mesh.iFirst); piCount[i].put(mesh.iCount); |