Why Libgdx Gdx.gl10.glLineWidth(width); does not react to change projection properities
I have typical Libgdx class with render() function.
In render() function i have ShapeRenderer batch:
Gdx.gl10.glLineWidth(width); renderer.begin(ShapeType.Line); renderer.setColor(25,0, 0, alpha); renderer.line(point_x1, point_y1, point_x2, point_y2); renderer.end();
in this function I have also:
and when the projection properities is changed line points are translated properly but line width is still the same!
Is there any way to change line width due to projection width and height ??
Line width is given in pixels, which is just not influenced by any projection transformations. So there is no easy way to make the line width dependent on the current projection transformation and you won't get around replacing your lines by real 2-dimensional geometry (i.e. rotated rectangles or something the like).