SFML community forums

Help => Window => Topic started by: fallout on November 05, 2012, 06:39:36 am

Title: Window won't Render in High Resolutions
Post by: fallout on November 05, 2012, 06:39:36 am
RenderWindow window will not display at resolutions like 1920x1200 or 1920x1280. Everything below 1680x1050 works. The window is actually there, but it is like it is invisible. Nowhere to be seen. I know its there because if I hover my mouse over the application in the taskbar, I can actually see the mini-preview of it. However, clicking on it or alt-tabbing to select it has no effect. The window never shows up.

sf::RenderWindow window( sf::VideoMode( 1980, 1020 ), "title" );
        Tmx::Map *map = NULL;

        SFMLConsole console( &window );
        GameMainMenu menu( GameMenu::ILOGO_TMENU, "fonts/US101.ttf",
                32, sf::Color( 0, 0, 0, 255 ), "assets/menu/mainbg.png" );
        initMenu( menu );

        while( window.isOpen() ) {

                sf::Event event;
                while( window.pollEvent( event ) ) {
                        if ( event.type == sf::Event::Closed )
                                window.close();

                        if ( event.type == sf::Event::KeyPressed ) {
                                if ( event.key.code == sf::Keyboard::Tilde ) {
                                        if ( !console.isOpen() )
                                                console.openConsole();
                                        else
                                                console.closeConsole();
                                }

                                if ( event.key.code == sf::Keyboard::Escape )
                                        window.close();
                        }

                        if ( event.type == sf::Event::TextEntered ) {
                                if ( console.isOpen() ) {

                                        console.update( event );
                                }
                        }
                }

                menu.update( &window, event );
               
                if ( console.isOpen() ) {
                        console.drawConsole( &window );
                }

                window.display();
        }
Title: Re: Window won't Render in High Resolutions
Post by: fallout on November 05, 2012, 06:45:12 am
OK...

http://en.sfml-dev.org/forums/index.php?topic=7685.msg51254#msg51254
Title: Re: Window won't Render in High Resolutions
Post by: fallout on November 05, 2012, 06:48:02 am
Actually though, when I set the resolution to 1920x1080 which is the resolution of my monitor (I'm running dual monitors, one is 1680x1050), it still won't show, even with the 1920x1080 set as the main monitor. Perhaps the resolution is actually a few pixels smaller than Dell advertised.
Title: Re: Window won't Render in High Resolutions
Post by: Laurent on November 05, 2012, 07:58:43 am
Don't forget that the total size of the window is greater: there are the borders and titlebar.