diff options
Diffstat (limited to 'src/main/java/makamys/lodmod/renderer/Mesh.java')
-rw-r--r-- | src/main/java/makamys/lodmod/renderer/Mesh.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/makamys/lodmod/renderer/Mesh.java b/src/main/java/makamys/lodmod/renderer/Mesh.java index 7c7e6c2..3f8b0fe 100644 --- a/src/main/java/makamys/lodmod/renderer/Mesh.java +++ b/src/main/java/makamys/lodmod/renderer/Mesh.java @@ -19,8 +19,17 @@ public abstract class Mesh { int x, y, z; public abstract int getStride(); + public void onVisibilityChanged() {} public double distSq(double x2, double y2, double z2) { return Util.distSq(x, y, z, x2, y2, z2); } + + public int bufferSize() { + int bufferSize = quadCount * 6 * getStride(); + if(buffer != null) { + assert buffer.limit() == bufferSize; + } + return bufferSize; + } } |