screen will be messed up when lost device?

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

heeroz
Just popping in
Just popping in
Posts: 7
Joined: Wed May 26, 2010 06:33

screen will be messed up when lost device?

Postby heeroz » Mon Mar 12, 2012 13:21

Hi,
I'm using:
cegui 0.7.5 (0.7.6 also has this problem)
ogre 1.7.4 with d3d9 render
Windows XP (this problem not show up in windows 7)

When ogre lost device:
19:56:18: !!! Direct3D Device successfully restored.
19:56:18: D3D9 device: 0x[0D,23A,860] was reset

Then i call CEGUI::System::getSingleton().notifyDisplaySizeChanged(sz) :
12/03/2,012 19:56:18 (Std) Display resize: w=951 h=548

Everything looks normal, but CEGUI::Windows's background will be messed up.
Screenshot:
Image
There is only a small piece wrong, But if your form is translucent, you will see the entire background is messed up.
Look like the bottom layer of the texture is not recovered from lost device.

When you move the mouse onto this form, the problem will gone.

I tried to perform the following code to fix:
CEGUI::System::getSingleton().getGUISheet()->invalidate(true);
but has no effect, background still messed up.

How do I solve this problem?
Thanks :)

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: screen will be messed up when lost device?

Postby Kulik » Mon Mar 12, 2012 17:14

Try System::invalidateAllCachedRendering()

The areas that are corrupted are render textures.

http://www.cegui.org.uk/docs/current/cl ... f5de532e53

heeroz
Just popping in
Just popping in
Posts: 7
Joined: Wed May 26, 2010 06:33

Re: screen will be messed up when lost device?

Postby heeroz » Tue Mar 13, 2012 09:04

Thanks for reply.

I found when the window size changed, OgreD3D9RenderSystem will reset the device after WndEvtListener::windowResized(CEGuiOgreBaseApplication.cpp) called.
So if you call notifyDisplaySizeChanged(or invalidateAllCachedRendering) in next frame , the problem will solved.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 7 guests