loadFromMemory donot use CEGUI::Texture::PF_RGB?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

zzz822163
Just popping in
Just popping in
Posts: 4
Joined: Sun Jan 04, 2009 10:33

loadFromMemory donot use CEGUI::Texture::PF_RGB?

Postby zzz822163 » Wed Jan 07, 2009 09:17

I get bitmap data: unsigned char *bitmapImage= (unsigned char *)bmp.bmBits;
rttTexture->loadFromMemory(buffer,256, 256, CEGUI::Texture::PF_RGB );
but the picture is not right now,after I conver the data

for (unsigned int src = 0, dst = 0; src < bi.biSizeImage; src +=3, dst +=4)
{

m_ListVideo[dex].data_avi_new[dst+3] = 0xFF;

// copy pixel data over
m_ListVideo[dex].data_avi_new[dst] = bitmapImage[src];
m_ListVideo[dex].data_avi_new[dst+1] = bitmapImage[src+1];
m_ListVideo[dex].data_avi_new[dst+2] = bitmapImage[src+2];
}
rttTexture->loadFromMemory(m_ListVideo[dex].data_avi_new,256, 256, CEGUI::Texture::PF_RGBA );
now the picture is right ,but the FPS from 50 to 10,help me!!

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

Postby CrazyEddie » Thu Jan 08, 2009 09:47

It appears there is a bug in the RGB code on the D3D 9 renderer module, I recall fixing this probably on the D3D 10 version but apparently the others are affected also. I will fix this for the next release.

With regards to the performance issue, if you are converting and loading that buffer every frame it will kill performance. I mentioned in the other thread that this would be slow ;)

Thanks for drawing our attention to the loadFromMemory pixel format bug.

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 18 guests