[No Bug]Fullscreen vs Windowed

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Bate
Posts: 364
Joined: Sun Nov 01, 2009 11:39 pm
Location: Germany

[No Bug]Fullscreen vs Windowed

Post by Bate »

I have a GUIWindow and an GUIImage, the image is a child of the window and is positioned so that it shapes the upper and lower arbitrary border of the window. the inside part of the image is alpha transparent (this part is exactly where the window is positioned).

Code: Select all

IGUIWindow *windowOptions = guienv->addWindow(recti(100,100,700,500), false, L"OPTIONS", 0, GUI_WINDOW_OPTIONS);
windowOptions->setDrawTitlebar(false);
windowOptions->getCloseButton()->setVisible(false);

IGUIImage *windowOptionsImage = guienv->addImage(driver->getTexture("data/window_options.png"), vector2di(0,0), true, windowOptions);
windowOptionsImage->setRelativePosition(position2di(-1,-10));
windowOptionsImage->setNotClipped(true);
in fullscreen it looks precisely as intended. only in window mode it looks distorted. (using Direct3D9)

FS: correct
Image

Windowed:
Image

I guess basically it's not the best way to achieve what I want, but it's pretty easy like that and works fine in FS. I'm not sure if it's a "real" bug or a concequence of the implementation though; but maybe it is possible to do something about it?
Last edited by Bate on Fri Jan 22, 2010 10:02 pm, edited 1 time in total.
Never take advice from someone who likes to give advice, so take my advice and don't take it.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

It seems that you have more than those errors, check the fonts of your screenshot. They're also distorted. Which image dimensions do you use? What's the exact render code?
Bate
Posts: 364
Joined: Sun Nov 01, 2009 11:39 pm
Location: Germany

Post by Bate »

The image is 602x420. Hm do you think the image not being a power of two causes the distortion? Then why does it work in FS.

Code: Select all

while ( device->run() )
{
  if ( device->isWindowActive() )
  {
    cameraUpdate( smgr->getActiveCamera() );

    driver->beginScene(true, true, SColor(255, 0,0,0));
      smgr->drawAll();
      guienv->drawAll();
      myCursor->drawCursor(20);
    driver->endScene();
  }
  else
  {
    device->yield();
  }
}
Never take advice from someone who likes to give advice, so take my advice and don't take it.
Sylence
Posts: 725
Joined: Sat Mar 03, 2007 9:01 pm
Location: Germany
Contact:

Post by Sylence »

Bate wrote:Hm do you think the image not being a power of two causes the distortion? Then why does it work in FS.
When your card does not support npot textures all crazy things might happen including green elephants dancing on your desktop ;)

You should try using a pot texture to see if it makes a difference.
Software documentation is like sex. If it's good you want more. If it's bad it's better than nothing.
Bate
Posts: 364
Joined: Sun Nov 01, 2009 11:39 pm
Location: Germany

Post by Bate »

I have a Radeon HD 4870, I don't think there are any features it doesn't support. :) Also, why does it work in fullscreen? Anyway, I will test it.
Never take advice from someone who likes to give advice, so take my advice and don't take it.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

ATI has several bugs in their NPOT support, so don't really count on it.
Bate
Posts: 364
Joined: Sun Nov 01, 2009 11:39 pm
Location: Germany

Post by Bate »

ops, almost forgot about this one... works with POT textures.
Never take advice from someone who likes to give advice, so take my advice and don't take it.
Post Reply