I was trying to create my own CEGUI skin. I followed the basic tutorials, and successfully created my two first good looking widgets

Any way I decided to test my widgets in a real life application and modified the layout of the "demo_GUI" application shipped with Ogre, and I was disappointed


OgreRenderer wraps the CEGUI::Image class around an Ogre::Texture object. This is a clean approach since this use all the management features of ogre. But Ogre also make some modifications to texture files when loading the file, actually for harware requirement texture must have metrics according with powers of two (512, 256, 16 and so on). Since all the CEGUI side relies on coordinates described in the imageset files (real coordinates), and the Ogre side uses the stretched textures, all coordinates are corrupted ( the coordinate (15,16) would not necessery be the same in the loaded texture). This causes unexpected results.
I repeat again the problem is in the OgreRenderer module, neither Ogre nor CEGUI. The problem is in texture scaling, so as soon as you use normalized image sizes (512x512, 256x512, 16x16, powers of 2

I will post this in the Ogre forum also.
Hop this will help.