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

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

A few issues upgrading to v0.7

Postby Rincevent » Thu Oct 08, 2009 21:16

Hi there,

I had an application running well using CEGUI v0.6.2.
Today I tried to upgrade to the new CEGUi version and this is were the troubles started :lol:
I am using CEGUI with opengl and SDL over windows xp platform (visual studio 2008).
Here are the list of issues I am getting:

1/ the mouse events now seems to be always handled by cegui:
For example, with version 0.6.2 when I was clicking on the screen, if i was not clicking on a cegui windows then the call to injectMouseButtonDown
was returning false. Now injectMouseButtonDown will always return me true wether I click on a gui window or not.
edit i fixed that one with setting MousePassThroughEnabled on the root window


2/ I am using multiple guis and I am switching from one to another using the setGUISheet function.
This works fine with version 0.7.0. However I noticed a strange behavior when changing to a gui that has some hidden framwindows in it.
If at later stage I make those hidden windows visible then they will display incorrectly (the position of the elements inside the windows are somehow ignoring the title bar). However, if the windows was not hidden when I switch the gui then they will appear correctly.
Here are pictures of what I mean:
The correct display:
Image

The incorrect display:
Image



3/ the text display seems to have lost its sharpness, now it seems a bit blured
Here is an image of the text display in version 0.6.2:
Image
Interestingly, when the previous bug 2 occurs, the text will then appear sharp on the incorrect display (compare image 1 and image 2).



4/ I am using a MultiLineEditbox windows that I define programmatically and not using the layout xml.
Strangly with the new version v0.7.0 the program now crashes as soon I try to click on the created MultiLineEditbox.
Here is the code I am using to implement my MultiLineEditbox (which was working fine on v0.6.2)

Code: Select all

    CEGUI::TabControl *tc = static_cast<CEGUI::TabControl *>(CEGUI::WindowManager::getSingleton().getWindow ("Chat/TabControl"));

   CEGUI::FrameWindow* fWnd = static_cast<CEGUI::FrameWindow *>(CEGUI::WindowManager::getSingleton().createWindow( "DefaultGUISheet", "Chat/Tab_"+tabName ));
   fWnd->setProperty("Text", (const unsigned char *)tabName.c_str());

   CEGUI::MultiLineEditbox* txt = static_cast<CEGUI::MultiLineEditbox *>(CEGUI::WindowManager::getSingleton().createWindow( "TaharezLook/MultiLineEditbox", "Chat/Tab_"+tabName+"/editMulti" ));
   txt->setProperty("MaxTextLength", "1073741823");
   txt->setProperty("UnifiedMaxSize", "{{1,0},{1,0}}");
   txt->setProperty("UnifiedAreaRect", "{{0,0},{0,0},{1,0},{1,0}}");
   txt->setReadOnly(true);
   fWnd->addChildWindow(txt);
   tc->addTab (fWnd);



5/ when resizing my application, I am now loosing the text and the images display.
here is what I was doing before:

Code: Select all

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


I replaced it for v0.7.0:

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();


Without any success.

I know that this is a lot of stuff, I had more issues but I could figure them out by myself however even after looking at the new documentation in the wiki I am still stuck with those ones. :oops:

Thanks in advance for your help in the matter.

fedyakin
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Thu Apr 17, 2008 06:13
Location: Arizona, United States of America

Re: A few issues upgrading to v0.7

Postby fedyakin » Fri Oct 09, 2009 03:47

Hi,
The good news is that I think your second and fourth issues have been fixed in the cegui svn repository. See viewtopic.php?f=10&t=4357 and http://www.cegui.org.uk/mantis/view.php?id=304 respectively. The bad news is I have no insight on your other problems.

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 » Fri Oct 09, 2009 10:15

Ok thanks, indeed I installed the precompiled lib.
I will try to take the latest svn version and see how it goes then.

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 » Fri Oct 09, 2009 11:03

Hi,

Don't forget that for SVN you want the v0-7 branch and not trunk ;)

Issue 3 sounds like we're missing some needed uses of our pixel alignment macro - I'll have a look.

Issue 5 sounds like it might be a power-of-two texture size issue (maybe the power-of-two issue), so that might be fixed in the v0-7 svn branch, let us know if it's not the same issue, and I'll look into it.

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 » Fri Oct 09, 2009 16:40

Ok, I installed the latest svn version.
It indeed solved the issue 2 and 4.

However the issues with the text sharpness and the window resize are still there.

Let me know if you need more information about them.

Here is an image before resize:
Image

And an image after resize:
Image

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 » Fri Oct 09, 2009 18:08

Hi, thanks for reporting back.

I'm not working on CEGUI anymore today, but I wonder what happens if you do not call the System::notifyDisplaySizeChanged function until after the restoreTextures call?

With regards to the text blurring, it's almost certainly the pixel alignment issue I mentioned previously, so you can probably expect that to get fixed over this weekend.

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 » Fri Oct 09, 2009 19:03

I tried to do like you said but it does not solve it, it just look the same.
I also noticed something interesting:
Once the display has been resized and the gui is messed up, if I go with the mouse over one of the gui windows then the mouse cursor will diseapear.
As soon as I leave the windows the cursor will appear again. Hope this is clear :o

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 » Sat Oct 10, 2009 12:36

Hi,

I've just confirmed another issue related to window positioning (especially when resizing the host window / display), it's possible - even likely - you're seeing the same issue. This bug should get fixed later today, and for reference, the other thread is here: viewtopic.php?f=10&t=4384

CE.

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 » Sun Oct 11, 2009 16:51

For info, I think I have now fixed all the issues relating to content sizing and positioning. If you're using the v0-7 stable branch, these fixes are now in.

With regards the the text blurring, I am seeing the effect, however it's not caused by what I thought it was, so will take a bit longer to investigate why this may be happening (I have some ideas, of course ;)). Rest assured, we will do our best to get this fixed as soon as we can.

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 » Mon Oct 12, 2009 09:28

Hi CE,

I have uploaded the latest source of v0-7 stable branch. However this does not seems to solve my resizing issue.
I am still loosing the images and text after resizing.
Then maybe it is maybe doing something wrong...

Rincevent

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 » Mon Oct 12, 2009 10:55

Hi,

Sorry to hear the issues are not fixed. I'm wondering now whether this is something specific to the use of SDL. Does anything change at all if you comment out those grabTextures / restoreTextures calls?

What's really odd here is that some of the imagery (i.e. the frames and such) are still showing. Are any of the windows using texture targets / have the AutoRenderingSurface property set to true? If so, does anything change if you alter that?

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 » Mon Oct 12, 2009 16:00

this is what i see if i remove the grab/restore textures: (the small square in the center being the cursor)
Image

What is very strange is also that the mouse cursor disappear when moving inside one of the windows.
Looks like the z-ordering or the overlay is messed up.

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 » Mon Oct 12, 2009 16:40

It really seems to be a problem of z-ordering.
I did some test by resetting my lookandfeel to TaharezLook.
I am using one static image as background and then I have one small window on top of it.
It looks like this:
Image
Now if i do a resize, then the whole screen become black except for the frame of the staticimage.

Then i did a second test by removing my static image, I now only have my small windows.
Here is what i get after resizing:
Image
It basically looks normal so it means that the static image was hidding this window after the resize in the first test.
The only thing left in this case is the mouse cursor diseappear somehow "under" the window if I point inside the window.

here is the layout i used:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<GUILayout >
    <Window Type="DefaultWindow" Name="Root" >
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
             
       
   <Window Type="TaharezLook/StaticImage" Name="LBaNetLogo" >
       <Property Name="Image"     Value="set:LogoBig image:Logo" />
       <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
       <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />           
   </Window>           
       
       <Window Type="TaharezLook/FrameWindow" Name="LoginWIndowFrame" >
        <Property Name="Text" Value="" />
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
        <Property Name="UnifiedMinSize" Value="{{0,128},{0,128}}" />
        <Property Name="TitlebarEnabled" Value="true" />
        <Property Name="SizingEnabled" Value="false" />
        <Property Name="CloseButtonEnabled" Value="false" />         
        <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.95,-220},{0.75,0},{0.95,0}}" />     


       <Window Type="TaharezLook/StaticText" Name="LoginLabel" >     
          <Property Name="Text" Value="Nickname:" />         
          <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
          <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0,10},{0.4,5},{0,40}}" />
      </Window>       

      <Window Type="TaharezLook/Editbox" Name="LoginText" >   
          <Property Name="MaxTextLength" Value="20" />
          <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
          <Property Name="UnifiedAreaRect" Value="{{0.4,15},{0,10},{0.9,0},{0,40}}" />   
      </Window>

      <Window Type="TaharezLook/StaticText" Name="PasswordLabel" >
          <Property Name="Text" Value="Password:" />         
          <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
          <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0,50},{0.4,5},{0,80}}" />       
      </Window>

      <Window Type="TaharezLook/Editbox" Name="PasswordText" > 
          <Property Name="MaxTextLength" Value="20" />
          <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
          <Property Name="UnifiedAreaRect" Value="{{0.4,15},{0,50},{0.9,0},{0,80}}" />     
      </Window>

      <Window Type="TaharezLook/StaticText" Name="ServerOnLabel" >
          <Property Name="Text" Value="Server: " />         
          <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
          <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0,100},{0.4,0},{0,130}}" />       
      </Window>      
      

          <Window Type="TaharezLook/Checkbox" Name="LoginPlayLocalCb" >
         <Property Name="Text" Value="Play in local mode" />
         <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
         <Property Name="UnifiedAreaRect" Value="{{0.4,10},{0,100},{0.7,0},{0,130}}" />
          </Window> 

      <Window Type="TaharezLook/Button" Name="ConnectB" >   
          <Property Name="Text" Value="Login" />             
          <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
          <Property Name="UnifiedAreaRect" Value="{{0.5,-100},{0,150},{0.5,-10},{0,180}}" />       
      </Window>
      <Window Type="TaharezLook/Button" Name="CancelB" >     
          <Property Name="Text" Value="Quit" />       
          <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
          <Property Name="UnifiedAreaRect" Value="{{0.5,10},{0,150},{0.5,100},{0,180}}" />       
      </Window>
       </Window>   
    </Window>
</GUILayout>



Hope this help.

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 » Mon Oct 12, 2009 19:17

Hi again,

First, the (hopefully) good news - v0-7 branch now contains a fix for the blurry text issue.

The remaining issue is really quite baffling, though I'm not using SDL anywhere so can't test the same setup. From your latest posts (thanks for running that grabTextures test), and the info about odd 'z' behaviour, do you think this could be state related? IIRC SDL will totally recreate the context when resizing (which is why we had to add those grab/restore functions to fudge around that in the first place), can you tell us whether you have enabled the 'extra' state initialisation on the OpenGL renderer (via OpenGLRenderer::enableExtraStateSettings function)? And finally, are you using texture backing for any CEGUI windows (either manually or via the AutoRenderingSurface property?), if so, I think there may be a related bug in there related to dangling texture names (I'll investigate this soon, I think the texture render targets are not handled correctly in the grab/restore functions).

Bear with us on this one, and we'll definitely get this sorted - though it may take a little while, since I can't reproduce the issue locally :)

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 » Mon Oct 12, 2009 20:54

Ok good news! I was actually not using the OpenGLRenderer::enableExtraStateSettings function.
So i tried to use it and it did the trick, so it seems that now the problem is solved, "almost".

Almost means that there is still a little part messed up.
Indeed, I am using a custom font in one part of my gui that I load programmaticaly like this:
CEGUI::FontManager::getSingleton().create( "abbey_m1-9.font" );

And this font seems to still get messed up.
All other gui font are displaying normally except this one(Commonwealth-10.font and DejaVuSans-8.font)


Now this is how it looks like before the resize:
Image

And this is how it looks like after:
Image

You can notice that now the images of the buttons are back, we are on the right path :D

Rincevent

PS: I am not really sure of what you mean by texture backing so it probably means that I am not using it.
also I do not use AutoRenderingSurface anywhere to my knowledge.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 9 guests