Home:ALL Converter>Libgdx cant draw text out on my screen

Libgdx cant draw text out on my screen

Ask Time:2013-05-23T19:49:46         Author:Dennis

Json Formatter

Im trying to get a score function on my game to show how much points you got but cant get it to work.

font = new BitmapFont(Gdx.files.internal("data/whitefont.fnt"),
             Gdx.files.internal("data/whitefont_0.png"), false);

to get my font.

batch.begin();
//render backgrounds and models
font.draw(batch, textToDisplay, 20, 1);
    System.out.println(textToDisplay);
batch.end();

Trying to draw the text. The log shows that the text prints but there is nothing on the screen.

I dont get anything out on that position and my font is white so it should work on my black background. Cant find the problem.

Author:Dennis,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/16713153/libgdx-cant-draw-text-out-on-my-screen
Daahrien :

Generate the fnt and png files from hiero again.\nIt seems they aren't from the same. For example the name, the png one has _0 suffix, suspicious.",
2013-05-28T07:32:03
yy