Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Window won't Render in High Resolutions  (Read 2424 times)

0 Members and 2 Guests are viewing this topic.

fallout

  • Newbie
  • *
  • Posts: 15
    • View Profile
Window won't Render in High Resolutions
« 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();
        }

fallout

  • Newbie
  • *
  • Posts: 15
    • View Profile

fallout

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Window won't Render in High Resolutions
« Reply #2 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.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Window won't Render in High Resolutions
« Reply #3 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.
Laurent Gomila - SFML developer