Bug in overlay ?

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
User avatar
Kristian
Hobgoblin
Posts: 542
Joined: Sun Jan 12, 2003 7:35 pm
Location: Copenhagen, Denmark

Bug in overlay ?

Post by Kristian »

Hello,

When I load a texture manually into a texture unit state of a manually created material and then display it on a overlayelement the U coordinate of the texture seem to be displaced with 1 pixel to the left.

The problem seems to occur on other machines than my own with lead me into thinking that it was not something which was happening due to my gfx card.

The way im corrently fixing the problem is to adjust the U coordinate of the texture like
mTextureUnitState->setTextureUScroll(-0.00483092 );
which should correospond to moving the texture 1 pixel to the right ( on my texture, that is. )
:)

Can anyone please tell me if this is an Ogre specific error ?

Regards
Kristian
Kristian, crying out loud: "If it works. Don't fix it!" :p
HCA
HCA2
GuppyLife
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark

Post by DWORD »

I just tested this, and I can't reproduce it. Can you provide a screenshot or a minimal example displaying the error you get?

I tried creating a manual texture with a one pixel border and displayed it using a panel overlay element with a material using the texture. The border sits exactly at the panel's edges (both D3D9 and OGL).

BTW, which Ogre version are you using, and does it appear using all render systems? If you're using an old Ogre it could be because of D3D's texel to pixel mapping.
User avatar
Kristian
Hobgoblin
Posts: 542
Joined: Sun Jan 12, 2003 7:35 pm
Location: Copenhagen, Denmark

Post by Kristian »

Hi DWORD,

This seems gettings stranger and stranger :) Actuelly I just found that it only occurs when my OverlayElement is positioned at the left=0.0.

Last time i checked I was using Ogre ver 1.01 with the directx9 plugin ( havent been testing on CVS or older versions of Ogre ).

I cant post any screenshots or code right now but I will try to recreate a isolated example if I get the time.

- Kristian
Kristian, crying out loud: "If it works. Don't fix it!" :p
HCA
HCA2
GuppyLife