SFML community forums

Help => Window => Topic started by: Matt Guerrette on January 02, 2014, 05:36:36 am

Title: Fullscreen Window OpenGL Distortion
Post by: Matt Guerrette on January 02, 2014, 05:36:36 am
Okay guys, so I'm getting this weird issue with my SFML window where when I recreate it in fullscreen using
a fullscreen mode retrieved from

sf::VideoMode::getFullscreenModes()

If it helps, here is how i set my window to fullscreen:

void GameWindow::setFullScreen( bool fs )
{

        if(isFullscreen)
        {
                std::vector<sf::VideoMode> modes = sf::VideoMode::getFullscreenModes();
                for(auto mode : modes)
                {
                        if(mode.isValid())
                        {
                                fullscreenMode = mode;
                                break;
                        }
                }

                create(fullscreenMode, windowTitle, sf::Style::Fullscreen);
                setVerticalSyncEnabled(true);
        }
        else
        {
                //revert back to windowed mode
                create(windowMode, windowTitle);
                setVerticalSyncEnabled(true);
        }
       
}

my textured cube primitive looks strangely distorted on the top and bottom. Not sure whether this has something to do with the inner working of DevIL the image library im using to load my texture images or what.

But changing the video mode to fullscreen from windowed makes the top and bottom of the texture look distorted. Here is an image to show what it looks like:

(http://i44.tinypic.com/10nwas9.png)





Title: Re: Fullscreen Window OpenGL Distortion
Post by: Matt Guerrette on January 02, 2014, 06:20:39 am
Its not the windowing system. Its my failure at correctly mapping texture coords........  :'(