collinsmith / riiablo

Diablo II remade using Java and LibGDX
http://riiablo.com
Apache License 2.0
884 stars 101 forks source link

Draw FPS GlyphLayout empty in GameScreen #46

Open collinsmith opened 5 years ago

collinsmith commented 5 years ago

1590adce0f10a7d5ef49c9f4450be7fd6d3d5a54 fixed an issue where setting text on a GlyphLayout obtained through Pools.obtain(GlyphLayout.class) would not create any runs. I worked around the behavior by using a GlyphLayout reference that is held onto for the life of the application, however I would prefer to use the original method and I don't understand why it was not working as expected. I'm not sure if this is a bug with my application or with LibGDX. Overall this issue is low impact, but I'm concerned it is further-reaching that what I've noticed.

This only happened when the GlyphLayout was obtained while the application was in GameScreen and worked within the menus, etc, so maybe a reference isn't being released properly?