A few issues upgrading to v0.7

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: A few issues upgrading to v0.7

Postby CrazyEddie » Tue Oct 13, 2009 11:17

Ok, it seems you're almost there :)

Is your custom font based on an actual font file (.ttf or what have you), or is it a pixmap (imageset based) font? If the former, does your custom font have auto-sizing enabled? Finally, what is the order of operations in the resize code now?

With regards to 'texture backing', this is a new facility in 0.7.0 to render GUI content to a texture prior to drawing it on the screen. This serves multiple purposes, such as increasing performance in most cases, and also facilitates window level rotations and other effects. If you've not specifically enabled this, and since you're using a custom skin, you're correct that you're almost certainly not using this (so do not have to worry about the bug that exists there).

CE.

Rincevent
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Thu Oct 08, 2009 20:42

Re: A few issues upgrading to v0.7

Postby Rincevent » Tue Oct 13, 2009 12:11

Yes it is based on a .ttf file. And the autosize is set to off.

So now the order of the resize code did not change, I reversed it to the we i had before since
doing the restoreTextures before notifyDisplaySizeChanged did not change anything:

Code: Select all

_gui_renderer->grabTextures();
resize the windows using SDL
    CEGUI::System::getSingleton().
        notifyDisplaySizeChanged(CEGUI::Size((float)screen_size_X,(float)screen_size_Y));
_gui_renderer->restoreTextures();

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: A few issues upgrading to v0.7

Postby CrazyEddie » Tue Oct 13, 2009 12:32

The reason the restoreTextures call should go before notifyDisplaySizeChanged is because notifyDisplaySizeChanged will cause regeneration of font related textures, so calling restoreTextures afterwards replaces those regenerated textures with the 'old', potentially incorrect, imagery.

CE.

Rincevent
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Thu Oct 08, 2009 20:42

Re: A few issues upgrading to v0.7

Postby Rincevent » Tue Oct 13, 2009 17:39

Hi CE,

So I tried to put the restoreTextures before the notifyDisplaySizeChanged but it does not solve the problem.
And by the way, I told you something wrong previously, the problem does not only occur with my custom font but also with the Commonwealth-10.font
that I use for windows title. So basically only the font DejaVuSans-8.font which is set as default font seems to display correctly after resize.

And now is the funny part: if I click on one of the window with incorrect text display, then the window will refresh and the text will display correctly again.
So actually, if i show and hide all windows again then everything will work fine. Maybe it is just a small issue left that the gui is not refreshed after resize?
Any ideas :P

PS: The blured text seems to be gone with your last release, thanks.


edit: so I solved the problem for now by automatically hiding and showing all windows after a resize. Viable solution?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: A few issues upgrading to v0.7

Postby CrazyEddie » Tue Oct 13, 2009 18:19

Hi,

And now is the funny part: if I click on one of the window with incorrect text display, then the window will refresh and the text will display correctly again.
So actually, if i show and hide all windows again then everything will work fine. Maybe it is just a small issue left that the gui is not refreshed after resize?
Any ideas :P

Yeah, I know precisely what that is - the GeometryBuffer for the Window(s) involved is not getting invalidated, so the system continues to draw the cached content including the references to a non-existant texture name. Assuming the windows involved are attached to the set root / sheet, this should not be happening (since I added code to force all windows to be invalidated in the event of a display resize) - however, you can invalidate those windows manually if you need to via the Window::invalidate function - using the version that takes a boolean, and passing true will also invalidate all child window's GeometryBuffer objects too.

HTH

CE.

Rincevent
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Thu Oct 08, 2009 20:42

Re: A few issues upgrading to v0.7

Postby Rincevent » Tue Oct 13, 2009 19:07

So actually, I think that we are done with all the issues that I had.
Thanks a lot fot your help CE!

Rincevent


Return to “Help”

Who is online

Users browsing this forum: No registered users and 13 guests