loadFromMemory donot use CEGUI::Texture::PF_RGB?
Posted: 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!!
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!!