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!!
loadFromMemory donot use CEGUI::Texture::PF_RGB?
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
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.
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.
Who is online
Users browsing this forum: No registered users and 18 guests
