CEGUI east language display optimized arithmetic

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:

CEGUI east language display optimized arithmetic

Postby HyperIris » Wed Sep 20, 2006 07:33

I'm sorry, make you long wait and my poor English.

Here is the CEGUI east language display optimized arithmetic. I don't know why I cann't access Mantis tracker

(http://mantis.cegui.org.uk/), so I decided post it here.

1. In class Texture (CEGUITexture.h) add:

Code: Select all

public:
virtual void updateFromMemory(int xOffset, int yOffset, int subWidth, int subHeight, void const *pData) = 0;


2. In class DirectX9Texture (d3d9texture.h) add

Code: Select all

public:
/*!
   \brief
   update an subimage in memory into the texture.

   \param xOffset
   the point x of the texture for update area

   \param xOffset
   the point y of the texture for update area

   \param subWidth
   the width of subimage

   \param subHeight
   the height of subimage

   \param pData
   the buffer (in 0xAARRGGBB pixels)

   \return
   Nothing.
   */
   virtual void   updateFromMemory(int xOffset, int yOffset, int subWidth, int subHeight, void const *pData);


then, in (d3d9texture.cpp) implement it.

if you use OpenGL, please implement it by yourself because I don't know how to do it.
Last edited by HyperIris on Thu Sep 21, 2006 14:30, edited 1 time in total.
I am a GAME UI Programmer, but...
almost all of my computer knowledge is system programming, such as IA32/X64 asm, rootkits, WDM...

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

Postby HyperIris » Wed Sep 20, 2006 07:51

3. Modify Font classes.

We need a 512x512 cache texture, and we init it at Font class.
Last edited by HyperIris on Thu Sep 21, 2006 14:36, edited 1 time in total.
I am a GAME UI Programmer, but...

almost all of my computer knowledge is system programming, such as IA32/X64 asm, rootkits, WDM...

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

Postby HyperIris » Wed Sep 20, 2006 07:59

4. In CEGUIFreeTypeFont.h add:

Code: Select all

public:
   virtual void rasterize (utf32 codepoint);


In CEGUIFreeTypeFont.cpp, we need implemen this override rasterize function.

when rasterize, we use MRU help us to update the texture.
Last edited by HyperIris on Thu Sep 21, 2006 14:41, edited 1 time in total.
I am a GAME UI Programmer, but...

almost all of my computer knowledge is system programming, such as IA32/X64 asm, rootkits, WDM...

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

Postby HyperIris » Wed Sep 20, 2006 08:29

5 The MRU class.

We are nearly the end point, but here is the mru table problem.

MRU records all commited codepoints and the their priorities
For example, when codepoint A commit to that MRU table, MRU tries find whether it already in table, if so, codepoint's priorities--, or find space in table and insert it to there, and it has init priority 0, if no space left, MRU find which codepoint's priority is the biggest and kick it out. then all codepoint's priorities++.

Due to some reason I can't give you the mru implement, here is the interface of it.

Code: Select all

class MRU 
{
public:
   void Commit(unsigned short* pString, int nCount, unsigned short* pPositions, unsigned short* pNewItems, int& nNumNewItem);
   void Clear();
   bool Init(int nMaxItemNum); //Size of mru table
   MRU();
   virtual ~MRU();
};
I am a GAME UI Programmer, but...

almost all of my computer knowledge is system programming, such as IA32/X64 asm, rootkits, WDM...

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

Postby HyperIris » Thu Sep 21, 2006 14:45

Due to some reason I decided delete the implement code.
I feel shame, but I have not choice.

Forgive me, I have no choice.
I am a GAME UI Programmer, but...

almost all of my computer knowledge is system programming, such as IA32/X64 asm, rootkits, WDM...

cutenoob
Not too shy to talk
Not too shy to talk
Posts: 23
Joined: Tue Jul 11, 2006 02:28
Location: Shanghai

Postby cutenoob » Fri Sep 22, 2006 03:55

HOHO ,, It's OK ,,whatever , you make a TODO list :lol: :lol:

Relax man,,It's doesn't a shame thing :wink: :wink: but it's a pity


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 6 guests