aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/neodymium/renderer/Mesh.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/makamys/neodymium/renderer/Mesh.java')
-rw-r--r--src/main/java/makamys/neodymium/renderer/Mesh.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/Mesh.java b/src/main/java/makamys/neodymium/renderer/Mesh.java
index 6eadf88..2b2b070 100644
--- a/src/main/java/makamys/neodymium/renderer/Mesh.java
+++ b/src/main/java/makamys/neodymium/renderer/Mesh.java
@@ -1,6 +1,7 @@
package makamys.neodymium.renderer;
import java.nio.ByteBuffer;
+import java.nio.IntBuffer;
import makamys.neodymium.util.Util;
@@ -40,4 +41,12 @@ public abstract class Mesh {
public static enum GPUStatus {
UNSENT, SENT, PENDING_DELETE
}
+
+ public void writeToIndexBuffer(IntBuffer piFirst, IntBuffer piCount, int[] renderedMeshesReturn,
+ int[] renderedQuadsReturn) {
+ renderedMeshesReturn[0] = 1;
+ renderedQuadsReturn[0] = quadCount;
+ piFirst.put(iFirst);
+ piCount.put(iCount);
+ }
}