[solved]Line update bug

I think there’s a bug in the line-mesh.

If I do the following:


Geometry g = new Geometry(name);

Line l = new Line(start, end);


g.setMaterial(/… nifty color …/);

((Line)g.getMesh()).updatePoints(Vector3f.UNIT_X, Vector3f.UNIT_Y);


It crashes with a BufferOverflowException on the update-call.

it seems that the problem is that the position of the buffer is at it’s maximum value (6 in this case).

If I do this:



//and then…

((Line)g.getMesh()).updatePoints(Vector3f.UNIT_X, Vector3f.UNIT_Y);


The problem is solved.


yep, that will have to rewind. I just committed a fix for it on trunk, give it a try and see if it helps. I didn’t test it, gotta get dinner real quick :stuck_out_tongue:

@Sploreq: looks good and it works. Mission accomplished :slight_smile: