Page 1 of 1

Using an image as a full screen backdrop

Posted: Tue Feb 08, 2005 23:03
by thumperj
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

Re: Using an image as a full screen backdrop

Posted: Wed Feb 09, 2005 09:25
by CrazyEddie
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.

Re: Using an image as a full screen backdrop

Posted: Wed Feb 09, 2005 16:50
by thumperj
Perfect! That's the nugget I needed! As always, thanks!

:D

cheers,
Chris