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.