Extension of the interface of loadFromMemory of a Texture?
Posted: Tue Oct 19, 2010 10:38
Recently I look into the Font module performance issue for the CJK charset,
I found that CEGUI treats 256 chars as a block,
loaded them together into one texture using the interface below:
This interface does not allow changing a small part of a texture,
that would be a problem to for optimizing the performance under CJK charset,
since there are lots of chars (~3000 frequently used in Chinese)
and the distribution of using these chars is not related to the codepoint of the char,
i.e., using a char at some codepoint does not mean that
the chars with nearby codepoints will be used in near future.
So the cache of the texture for chars cannot bind nearby chars together,
and interface for changing one char in the texture cache are needed for optimization.
Will the CEGUI team consider providing some interface like the one below in the future officially?
The above interface can be used to changing some part of a texture that has already created.
That would be greatly appreciated.
I found that CEGUI treats 256 chars as a block,
loaded them together into one texture using the interface below:
Code: Select all
virtual void CEGUI::Texture::loadFromMemory(const void* buffer,
const Size& buffer_size,
PixelFormat pixel_format) = 0;
This interface does not allow changing a small part of a texture,
that would be a problem to for optimizing the performance under CJK charset,
since there are lots of chars (~3000 frequently used in Chinese)
and the distribution of using these chars is not related to the codepoint of the char,
i.e., using a char at some codepoint does not mean that
the chars with nearby codepoints will be used in near future.
So the cache of the texture for chars cannot bind nearby chars together,
and interface for changing one char in the texture cache are needed for optimization.
Will the CEGUI team consider providing some interface like the one below in the future officially?
Code: Select all
virtual void CEGUI::Texture::loadFromMemory(const void* buffer,
const Size& buffer_size,int offsetX, int offsetY,
PixelFormat pixel_format) = 0;
The above interface can be used to changing some part of a texture that has already created.
That would be greatly appreciated.