In libgdx model-loader demo font.draw () does not put the text "fps" on the screen

I am starting to work with libgdx. I opened an example of a bootloader model in the boot ( StillModelViewerGL20.java ). In the source, I see this code in the render callback:

 batch.begin(); font.draw(batch, "fps: " + Gdx.graphics.getFramesPerSecond(), 20, 30); batch.end(); 

But I do not see any text on the screen. Is there something I need to fix in this example to see the text?

+6
source share
2 answers

Perhaps the screen size is less than 20.30. Try drawing 0, 0.

+2
source

check the order in which you draw your objects, and if this is fixed by changing.

+1
source

Source: https://habr.com/ru/post/917971/


All Articles