Moved shapeRenderer.begin() and end() outside a for loop, in order to hopefully make things less laggy :\