Libgdx gl10.glLineWidth()

前端 未结 2 1016
小蘑菇
小蘑菇 2020-12-03 18:59

I have this line: Gdx.gl10.glLineWidth(width); Now, I do intend to draw a pretty thick line, and, unfortunately when I type in small values like 1 or 5 the line is obviously

2条回答
  •  温柔的废话
    2020-12-03 19:38

    From libgdx 1.0 on there is also the ShapeRenderer's rectLine method available. See a simple example.

    ShapeRenderer shapeRenderer = new ShapeRenderer();
    shapeRenderer.begin(ShapeType.Filled);
    shapeRenderer.rectLine(x1, y1, x2, y2, width);
    shapeRenderer.end();
    

    That seems to be the easiest way to draw thick lines now.

提交回复
热议问题