2
\$\begingroup\$

I've started creating a small project for the store with LibGDX. So far I only tested on PC, and everything went well. I'm using the gdx-smart-font library for font rendering. The fonts are looking good on a clean start:

the way it looks on a clean start

But if I exit from the app (ex.: via the back button, or the home button), and it still remains in the memory, then if I launch the app again, the whole font set is messed up:

enter image description here

Currently I have a Settings class, which loads the fonts, and creating a skin for the TextButtonStyles and LabelStyles, and I only have code in the Screens show, resize and render function.

\$\endgroup\$
3
  • \$\begingroup\$ This might be due to context loss. Try reloading the fonts when you detect a user relaunching the app. \$\endgroup\$ Mar 22, 2015 at 18:49
  • \$\begingroup\$ I tried reloading the resources AND reinstating the layout in the resume function, but still the same error :( \$\endgroup\$
    – Rothens
    Mar 22, 2015 at 18:51
  • \$\begingroup\$ @StrongJoshua ahh.. you were right.. I disposed the previous textures in the resume, not in the pause, and that was what caused my problem.. Post an answer :) \$\endgroup\$
    – Rothens
    Mar 22, 2015 at 20:26

1 Answer 1

2
\$\begingroup\$

This is due to either a context loss or simply you disposing your textures, without recreating them at the proper time (as you pointed out).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .