GUI StaticText sometimes doesn't render

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
dart_theg
Posts: 25
Joined: Sun Dec 29, 2024 3:13 am

GUI StaticText sometimes doesn't render

Post by dart_theg »

I'm adding a simple static text object and sometimes it just fails to render, more often than not when I disable the border. Is this a known issue? It's not being dropped or removed etc.

EDIT: Forcing something like text visibility or border draw to true on every frame seems to fix it, but I shouldn't have to do that.
CuteAlien
Admin
Posts: 9849
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: GUI StaticText sometimes doesn't render

Post by CuteAlien »

Not an issue I'm familiar with (and I use lots of text elements). Only idea I have right now is that maybe you are clipping it by some parent element. But then changing flags would make no difference.

Sorry, I need an example for this to reproduce.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
dart_theg
Posts: 25
Joined: Sun Dec 29, 2024 3:13 am

Re: GUI StaticText sometimes doesn't render

Post by dart_theg »

I've been using Irrlicht in my game engine so there is a slew of potential possibilities as to why this happens but I have no idea. For now I'll keep up my temporary fix and I'll come back if I resolve the issue by other means.
CuteAlien
Admin
Posts: 9849
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: GUI StaticText sometimes doesn't render

Post by CuteAlien »

Can you reproduce it with a s single StaticText element? In that case you can set a breakpoint in CGUIStaticText::draw() once you see it happening and just step through to see what's going on.

Thought my first guess when I hear that changing an unrelated flag modifies behavior which shouldn't be affected is that you have some memory corruption going on in your application. In which case even debugging might not help. In that case you need divide and conquer - throw out code as much as you can until only the bug and nothing else is left. And I really wouldn't recommend going on by ignoring something like that as memory corruption can pretty soon drive you crazy with all kind of strange behaviors which make no sense.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply