Fix received data for last vertex format element not being recorded (#5074)
This commit is contained in:
parent
682a867a91
commit
889fa4da7e
1 changed files with 6 additions and 3 deletions
|
@ -52,12 +52,15 @@ public abstract class QuadGatheringTransformer implements IVertexConsumer
|
||||||
public void put(int element, float... data)
|
public void put(int element, float... data)
|
||||||
{
|
{
|
||||||
System.arraycopy(data, 0, quadData[element][vertices], 0, data.length);
|
System.arraycopy(data, 0, quadData[element][vertices], 0, data.length);
|
||||||
if(element == getVertexFormat().getElementCount() - 1) vertices++;
|
if (vertices == 0)
|
||||||
if(vertices == 0)
|
|
||||||
{
|
{
|
||||||
dataLength[element] = (byte)data.length;
|
dataLength[element] = (byte)data.length;
|
||||||
}
|
}
|
||||||
else if(vertices == 4)
|
if (element == getVertexFormat().getElementCount() - 1)
|
||||||
|
{
|
||||||
|
vertices++;
|
||||||
|
}
|
||||||
|
if (vertices == 4)
|
||||||
{
|
{
|
||||||
vertices = 0;
|
vertices = 0;
|
||||||
processQuad();
|
processQuad();
|
||||||
|
|
Loading…
Reference in a new issue