Using an image as a full screen backdrop

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

User avatar
thumperj
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Wed Jan 12, 2005 12:06
Location: Austin, TX
Contact:

Using an image as a full screen backdrop

Postby thumperj » Tue Feb 08, 2005 23:03

Hi, guys-

I'm using a 16x9 image for a fixed backdrop for a full screen window. I set it by:

Imageset* iset = ImagesetManager::getSingleton().getImageset( "BackgroundLook" );
d_clientbrush.setImage( &iset->getImage( "Backdrop" ) );
d_clientbrush.setPosition( Point( 0, 0 ) );
d_clientbrush.setHorzFormatting( RenderableImage::HorzTiled );
d_clientbrush.setVertFormatting( RenderableImage::VertTiled );

The problem is that the lower left corner is way off the side of the screen and I'm not sure why. I'm using a 1680x1050 monitor. My Ogre settings are full screen, 1680x1050. The image is 1680x1050. My imageset file has the size set correctly.

Any suggestion as to why this is happening?

Thanks very much,
Chris

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

Re: Using an image as a full screen backdrop

Postby CrazyEddie » Wed Feb 09, 2005 09:25

Hi,

What are the dimensions of the image file that you're using for the "BackgroundLook" imageset?

If the dimensions of the image are not powers of 2, then the image gets stretched to the next highest power of 2 when it's loaded by Ogre; this can cause issues like what you describe, since any pixel positions are then incorrect.

HTH

CE.

User avatar
thumperj
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Wed Jan 12, 2005 12:06
Location: Austin, TX
Contact:

Re: Using an image as a full screen backdrop

Postby thumperj » Wed Feb 09, 2005 16:50

Perfect! That's the nugget I needed! As always, thanks!

:D

cheers,
Chris


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 2 guests