[Solved] Residue Shadow when moving a window

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

felixbrot
Just popping in
Just popping in
Posts: 5
Joined: Fri May 23, 2014 03:07

[Solved] Residue Shadow when moving a window

Postby felixbrot » Fri May 23, 2014 03:22

I'm just trying to run some samples, I ceate a new project and build a ui.layout of my own, in ui.layout there is a TaharezLook/FrameWindow named "demo", everything is OK except that, if I scale up the main window, and move the "demo" window, there will be residue shadows, the shadows don't show up in the original area(before scale up), how to solve this problem?

There is still one more problem, I modify the CEGuiGLFWSharedBase::d_newWindowWidth and CEGuiBaseApplication::s_defaultWindowWidth, but it doesn't work, the window remains the same size no matter what value newWindowWidth is of.
(This one is because the compiler replace the static const d_newWindowWidth with its old value)
Waiting for a solution, and thanks.


ps: when I move my cursor to the edge of the window, all the shadows dispear.

here is a snapshot of the problem:
http://v2.freep.cn/3tb_140523213707l3w2512293.jpg
Last edited by felixbrot on Fri May 23, 2014 14:12, edited 3 times in total.

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Residue Shadow when moving a window

Postby Ident » Fri May 23, 2014 09:43

System::notifyDisplaySizeChanged()

Is this function being called on those size changes?
CrazyEddie: "I don't like GUIs"

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

Re: Residue Shadow when moving a window

Postby Kulik » Fri May 23, 2014 09:44


felixbrot
Just popping in
Just popping in
Posts: 5
Joined: Fri May 23, 2014 03:07

Re: Residue Shadow when moving a window

Postby felixbrot » Fri May 23, 2014 13:25

Ident wrote:System::notifyDisplaySizeChanged()

Is this function being called on those size changes?


yes, the function is called. I didn't change much, the code following is from the sample. Comparing the original sample, I remove the 17 demos and made a ui.layout instead, these changes are mostly in SamplesFramework.cpp.

while (!d_sampleApp->isQuitting() &&
glfwGetWindowParam(GLFW_OPENED))
{
if (d_windowSized)
{
d_windowSized = false;
CEGUI::System::getSingleton().
notifyDisplaySizeChanged(
CEGUI::Sizef(static_cast<float>(d_newWindowWidth),
static_cast<float>(d_newWindowHeight)));
}

drawFrame();
}

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Residue Shadow when moving a window

Postby Ident » Fri May 23, 2014 14:32

You are not supposed (it is not intended this way) to build your application based on the SamplesFramework, although you can do that I guess. At best you should extract code from there but write your own application otherwise.

Are you sure you render correctly including clearing the FBO?
Do you ever change OpenGL states?
CrazyEddie: "I don't like GUIs"

felixbrot
Just popping in
Just popping in
Posts: 5
Joined: Fri May 23, 2014 03:07

Re: Residue Shadow when moving a window

Postby felixbrot » Sat May 24, 2014 01:40

Ident wrote:You are not supposed (it is not intended this way) to build your application based on the SamplesFramework, although you can do that I guess. At best you should extract code from there but write your own application otherwise.

Are you sure you render correctly including clearing the FBO?
Do you ever change OpenGL states?


I'm not sure, but I think I did'nt change any codes on those things.
I don't know much how to build one CEGUI programe, so I start with modifying sample project, it's a new project and I copy some cpp from the sample, I load my ui.layout in SamplesFramework::initialise().
If I start my window with 800*600 and then scale it up to 1280* 720, the 800*600 area always(before and after scaling) works fine, shadows only appear in the extended area, and if I move the cursor to the edge of any window, the shadows disappear.
Now I have to put a big window on the background, and move other windows in it.

The 800*600 area and area in a window are fine, only the extended area without any window on it doesn't refresh in time. :cry:
I uploaded a pic of the problem, I hope it will help find out where I did wrong.

felixbrot
Just popping in
Just popping in
Posts: 5
Joined: Fri May 23, 2014 03:07

Re: Residue Shadow when moving a window

Postby felixbrot » Sat May 24, 2014 02:31

I create a new empty project, and copy only necessary codes to create my window, it works all good.
But I'm still cofusing, what makes it wrong in my old one.

felixbrot
Just popping in
Just popping in
Posts: 5
Joined: Fri May 23, 2014 03:07

Re: Residue Shadow when moving a window

Postby felixbrot » Sat May 24, 2014 03:27

Thank you all, I've found the reason. The code below is not necessary in my project, after I comment them, everything works fine now.

CEGUI::System::getSingleton().getDefaultGUIContext().
subscribeEvent(CEGUI::RenderingSurface::EventRenderQueueStarted,
CEGUI::Event::Subscriber(&CEGuiBaseApplication::sampleBrowserOverlayHandler,
this));


Return to “Help”

Who is online

Users browsing this forum: No registered users and 16 guests