Two problems\questions about overlay text

Problems building or running the engine, queries about how to use features etc.
Post Reply
Niubbo
Goblin
Posts: 211
Joined: Sat Jan 23, 2016 11:26 am
x 17

Two problems\questions about overlay text

Post by Niubbo »

Ogre Version: 1.11.8
Operating System: Win10
Render System: DX11

Hi

I'm testing the overlay system, specifically the writing a text over the screen.

It works but I faced two anomalies I cannot explain for which i have to use two workaround, so probably i miss something.

I linked the overlay to every screen object of my application and I linked the container and overlaytext element to subobjects of the screen.

When I need to write the text I initialize both the container and text element like explained in the tutorials, assigning a font resource I created.

First anomaly:

at the first call of renderOneFrame() only the container background is shown I need to call a second renderOneFrame() immediataly after for display the text too; I don't understand why.

Second anomaly:

When I close the first screen (so closing the overlay\containers\texts associated) and open one new, I also using a new font object but using the same font resource of first, the text creation process try to create again the same texture resource giving the "alreay exist resource with this name" error. So I'm forced to remove the font resource in advance. Does I have to remove explicly the texture linked to the first font object when I destroy the object, is not sufficient the fontmananger::remove call?

thanks
Post Reply