Drawing windows

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

masch
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Wed Mar 18, 2009 15:37

Drawing windows

Postby masch » Wed Apr 08, 2009 17:40

Hello

I have a question:

In an application with only 2 windows, when i put all windows overlapped
the FPS ratio still invariable (compared with the same app with the windows
without contact points)

Is possible that CEGUI always draw all windows, independent from window visibility?

Thank you...

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

Postby CrazyEddie » Wed Apr 08, 2009 22:09

Yes, this is largely correct, though don't confuse 'visible' with 'occluded', the distinction is important, since one is a setting and the other is a visual condition. A window marked as non-visible (i.e. a hidden window) will not be drawn, windows that are simply occluded by having a window in front of them are still drawn (there are some valid reasons for this too, such as imagery with alpha and so on).

Some form of occlusion culling of windows may be implemented at some stage in the future - I mentioned it a couple of times when talking about the renderer rewrites - it's not there at the moment though.

CE.

masch
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Wed Mar 18, 2009 15:37

Postby masch » Thu Apr 09, 2009 04:36

ok, you are right.
Are there many different using one of the image codecs or are there the same thing?

Salu2...
masch...

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

Postby CrazyEddie » Fri Apr 10, 2009 09:04

masch wrote:Are there many different using one of the image codecs or are there the same thing?

Huh? :?

Note sure if this answers your question, but I'll give it a shot: Typically you choose a codec based upon the facilities you need as far as image loading goes. Your decision may additionally be influenced if you are already using one of the underlying libraries in your game / engine / application. If such decisions seem unimportant to you, the just choose a codec and stick with it (in such cases our own SILLLY based codec is a fair choice).

CE.

masch
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Wed Mar 18, 2009 15:37

Postby masch » Fri Apr 10, 2009 17:36

Well right now I do not have a request codec, so I wondering If CEGUI works better with a singular codec in PNG images that have transparency.

Salu2..
masch...

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

Postby CrazyEddie » Mon Apr 13, 2009 08:24

There have been issues experienced in both Freeimage and DevIL depending upon the version built against. SILLY is recommend because it is pretty lightweight and generally has no CEGUI related issues - this is probably because it was created specifically for use in CEGUI ;)

CE.

masch
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Wed Mar 18, 2009 15:37

Re: Drawing windows

Postby masch » Sun Apr 26, 2009 21:58

Sorry to "reopen" and old thread but, Is it possible to make that CEGUI draw the windows that are only visible? because I'm running my app and old machine and I really need this feature. Is it possible that you can guide me to do it???.

Salu2...
masch...

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

Re: Drawing windows

Postby CrazyEddie » Mon Apr 27, 2009 09:15

Hi,

Do you mean only draw those windows that are not fully obscured? I have to verify this because of the ambiguous nature of the word 'visible' ;)

I think this is possible to get, though obviously you'll need some reworking of parts of CEGUI.

The cliff-notes overview of one way of doing this is effectively to modify the Window class to include an 'occluded' flag, which is checked when it comes time to draw the window - those with the flag set are skipped. Every time a window is moved, sized, shown, hidden, added or removed, a pass should be done against all sibling windows to update the occluded flag as appropriate.

The above will work in the basic cases, though there are many potential cans of worms - which is why I did not implement it myself (yet?).

CE.

masch
Not too shy to talk
Not too shy to talk
Posts: 28
Joined: Wed Mar 18, 2009 15:37

Re: Drawing windows

Postby masch » Tue Apr 28, 2009 17:13

yes, I get the idea, but the hard thing to do is to draw only the part that are not occurred. Do you know to do it?
I do not have much experience.

Salu2..
masch...

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

Re: Drawing windows

Postby CrazyEddie » Tue Apr 28, 2009 20:26

See, that's a different issue entirely. In the beginning it was about windows that were not 'visible' (meaning completely covered by some other window), yet now we're getting onto not drawing portions that are obscured, which is obviously far more complex.

Off the top of my head like this, no, I don't particularly know how to do it.

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 3 guests