How to change the imageset picture?


30-01-2010 08:56:57

hello.There is something I don't know how to do. We use cegui+ogre to do our project. As we know,all the pictures are put in the media folder,so if we change the pictures in it ,it is easy to pirate for our products. So we want to read the picture from the program instead from the picture file such as aa.png ,bb.jpg and so on. But the *.imageset file contain many information about images,so we want to use a blank picture in *.imageset file,then change the picture in the program.
we use the method:
CEGUI::Texture* myTexture = CEGUI::ImagesetManager::getSingleton().getImageset("GeneralTool")->getTexture();
//GeneralTool is existed imageset name which define in *.imageset file.

//loadFromMemory(const void* buffPtr, uint buffWidth, uint buffHeight, PixelFormat pixelFormat) = 0;

static const unsigned char qt_resource_data[] = {
// C:/QT/4.5.3/bin/qrc/image/white1.png

we use this method to change the image content which link to the imageset. But the picture show is not correct .I think the method we change picture file to pointer(qt_resource_data[]) is not correct. But I don't know how to change the picture file into the buffer(qt_resource_data[]).Who can tell me?????
or other method can handle my trouble???????????????????


30-01-2010 16:22:07

This is MyGUI forum and you talking about CEGUI. Better try at CEGUI forums. I'm surprised that you asking it here.