I’m having trouble with ShapeRenderer. All I’m doing is creating an instance of ShapeRender then I’m calling this method when I render:
public void draw() {
sr.begin(ShapeType.Line);
sr.rect(15.5f, 13.75f, 279f, 247.5f);
sr.end();
}
This is the result that I see on the screen.
http://img546.imageshack.us/img546/2308/u7wk.png
It seems to be drawing the rectangle at (10, 11) with a size of (181, 214). I sussed that the problem is probably the projection matrix, so I tried to set the projection matrix to the projection matrix of the stage. When I do that though, nothing is rendered. What could be the problem?