[solved]Ogre3dRenderer problem

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

doomedfox
Just popping in
Just popping in
Posts: 4
Joined: Thu Jul 10, 2008 19:31
Contact:

[solved]Ogre3dRenderer problem

Postby doomedfox » Wed Jul 23, 2008 22:29

Hi every one,
I was trying to create my own CEGUI skin. I followed the basic tutorials, and successfully created my two first good looking widgets 8) ( it's a matter of taste I know). I tested them with CELayoutEditor and played around with properties ( the skinning system is really amazing and coupled with the layout support could save a lot of time).

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 :shock: . The widgets looked perfect in CELayoutEditor but that wasn't the same result in Ogre. I decided to dive into the OgreRenderer code (retrieved from CVS). I analyzed the problem and these are my conclusion ( you can call me Sherlock Holms if you like :wink: )

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 :wink: ) all work just fine.

I will post this in the Ogre forum also.

Hop this will help.

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

Postby CrazyEddie » Thu Jul 24, 2008 08:54

Hi there,

Thanks for the report. This is actually a long standing issue, it should have really been addressed a long time ago when we did fixes for the other renderer modules, though for whatever reason it did not get done.

It will be fixed in the replacement module for the work in progress 0.7.x series of CEGUI. Though in the interim, I think I'll leave it for Sinbad to decide what to do :)

CE.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 14 guests