I think test renderer is now more correct?

This commit is contained in:
TomTheFurry
2022-03-29 13:09:29 +08:00
parent 3e825c11c4
commit 7c935bb581
2 changed files with 3 additions and 7 deletions
@@ -93,12 +93,12 @@ public class RenderSystemTest {
// Switch between the two buffers per second
if (System.currentTimeMillis() % 2000 < 1000) {
va.bindBufferToBindingPoint(sameContextBuffer.id, 0);
GL32.glBindBuffer(GL32.GL_ARRAY_BUFFER, sameContextBuffer.id);
va.bindBufferToAllBindingPoint(sameContextBuffer.id);
spamLogger.debug("same context buffer");
} else {
va.bindBufferToBindingPoint(sharedContextBuffer.id, 0);
GL32.glBindBuffer(GL32.GL_ARRAY_BUFFER, sharedContextBuffer.id);
va.bindBufferToAllBindingPoint(sharedContextBuffer.id);
spamLogger.debug("shared context buffer");
}
// Render the square
@@ -82,11 +82,7 @@ public final class VertexAttributePreGL43 extends VertexAttribute {
@Override
// Requires VertexAttribute binded
public void setVertexAttribute(int bindingPoint, int attributeIndex, VertexPointer attribute) {
TreeSet<Integer> intArray = bindingPointsToIndexBuilder.get(bindingPoint);
if (intArray == null) {
intArray = new TreeSet<Integer>();
bindingPointsToIndexBuilder.put(bindingPoint, intArray);
}
TreeSet<Integer> intArray = bindingPointsToIndexBuilder.computeIfAbsent(bindingPoint, k -> new TreeSet<Integer>());
intArray.add(attributeIndex);
while (pointersBuilder.size() <= attributeIndex) {