So Crazy Memory Used, plz Help.

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

HyperIris
Just popping in
Just popping in
Posts: 11
Joined: Tue Aug 01, 2006 09:21
Location: China
Contact:

So Crazy Memory Used, plz Help.

Postby HyperIris » Fri Aug 04, 2006 02:53

I'm using 0.5 svn head, and I'm trying East language display.

When I use few characters, it seems OK,
but if I display some more different characters(about 300 ~ 500 chinese characters), it's very slow and so crazy memory used ( about 70MB+).

I had add a debug trace at

void FreeTypeFont::rasterize (utf32 start_codepoint, utf32 end_codepoint)
{
....
Imageset *is = ImagesetManager::getSingleton ().createImageset (
d_name + "_auto_glyph_images_" + int (s->first),
System::getSingleton ().getRenderer ()->createTexture ());
d_glyphImages.push_back (is);
//
OutputDebugString("Create a texture!!");

With DbgVIEW, it seems that this code segment was called more than 4000 times.

plz help, thanks a lot !

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Sat Aug 05, 2006 06:35

The font system needs to render the glyphs when you request them.
You may be much better off predefining sets of frequent glyphs. I know basically nothing about asian languages, so I'm not sure how these codepoints are distributed in the unicode set...

The new font system is much better than the old in this regard, but, it still has a somewhat shortcoming, in that it will try to render pages of 256 glyphs. in a language where there could be hundreds/thousands between each used glyph this might not be a very optimal solution.

HTH and please let us know how this can be improved.

HyperIris
Just popping in
Just popping in
Posts: 11
Joined: Tue Aug 01, 2006 09:21
Location: China
Contact:

Postby HyperIris » Mon Aug 07, 2006 07:21

:shock:

I'm trying to optimize the arithmetic.

May be only need a 512x512 or a 1024 x 1024 texture in general font size.

Give me some time and wait my result.

:D

HyperIris
Just popping in
Just popping in
Posts: 11
Joined: Tue Aug 01, 2006 09:21
Location: China
Contact:

Postby HyperIris » Thu Aug 10, 2006 08:59

I had almost finish it.

But still some bug in dynamic font sizing, I'll fix it.

Only one 512x512 texture being used.

Image
I am a GAME UI Programmer, but...
almost all of my computer knowledge is system programming, such as IA32/X64 asm, rootkits, WDM...

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Thu Aug 10, 2006 15:01

looks cool :) If only I knew what it said.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 6 guests