VirtualIndexBuffer extends IndexBuffer { @Override public int remaining() { return numIndices - position; } VirtualIndexBuffer(int numVerts, Mode meshMode); @Override int get(); @Override void rewind(); @Override int remaining(); @Override int get(int i); @Override IndexBuffer put(int i, int value); @Override int size(); @Override Buffer getBuffer(); @Override IndexBuffer put(int value); @Override Format getFormat();  }
@Test public void testRemaining() { final VirtualIndexBuffer bufferPoints = new VirtualIndexBuffer(8, Mode.Points); assertEquals(8, bufferPoints.remaining()); bufferPoints.get(); assertEquals(7, bufferPoints.remaining()); final VirtualIndexBuffer bufferLineLoop = new VirtualIndexBuffer(8, Mode.LineLoop); assertEquals(15, bufferLineLoop.remaining()); final VirtualIndexBuffer bufferLineStrip = new VirtualIndexBuffer(8, Mode.LineStrip); assertEquals(14, bufferLineStrip.remaining()); final VirtualIndexBuffer bufferLines = new VirtualIndexBuffer(8, Mode.Lines); assertEquals(8, bufferLines.remaining()); final VirtualIndexBuffer bufferTriangleFan = new VirtualIndexBuffer(8, Mode.TriangleFan); assertEquals(18, bufferTriangleFan.remaining()); final VirtualIndexBuffer bufferTriangleStrip = new VirtualIndexBuffer(8, Mode.TriangleStrip); assertEquals(18, bufferTriangleStrip.remaining()); final VirtualIndexBuffer bufferTriangles = new VirtualIndexBuffer(8, Mode.Triangles); assertEquals(8, bufferTriangles.remaining()); final VirtualIndexBuffer bufferPatch = new VirtualIndexBuffer(8, Mode.Patch); assertEquals(0, bufferPatch.remaining()); }