Skip to content

Commit

Permalink
Update MultiDrawBatch.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ThatMG393 authored Jan 4, 2025
1 parent 0d3cc63 commit 90f2adc
Showing 1 changed file with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,21 @@ public final class MultiDrawBatch {
public final long pElementPointer;
public final long pElementCount;
public final long pBaseVertex;

private final int capacity;


public int size;
public boolean isFilled;

public MultiDrawBatch(int capacity) {
this.pElementPointer = MemoryUtil.nmemAlignedAlloc(32, (long) capacity * Pointer.POINTER_SIZE);
MemoryUtil.memSet(this.pElementPointer, 0x0, (long) capacity * Pointer.POINTER_SIZE);

this.pElementCount = MemoryUtil.nmemAlignedAlloc(32, (long) capacity * Integer.BYTES);
this.pBaseVertex = MemoryUtil.nmemAlignedAlloc(32, (long) capacity * Integer.BYTES);

this.capacity = capacity;
}

public int size() {
return this.size;
}

public int capacity() {
return this.capacity;
}

public void clear() {
this.size = 0;
this.isFilled = false;
}

public void delete() {
Expand Down

0 comments on commit 90f2adc

Please sign in to comment.