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

Author Topic: Full screen isn't filling entire available screen space  (Read 5515 times)

0 Members and 1 Guest are viewing this topic.

Programmer001

  • Newbie
  • *
  • Posts: 7
    • View Profile
Full screen isn't filling entire available screen space
« on: August 11, 2015, 06:17:20 am »
Hi,

I'm setting up my game and have just set up the window to take the highest possible resolution using sf::VideoMode::getFullscreenModes(). The window is set up to be Fullscreen. This all works.

When I manually choose a resolution lower than my native (1080p), certain resolutions will not fullscreen properly. What I mean by this is say I set the ViewMode width and height to be 800x600 or 1280x720. When the window is created the screen resolution gets set properly and I get the black bars on the side of my monitor from using a different aspect ratio (for 800x600), BUT the actual game window only takes up 3/4 of the screen and I can still see and use my desktop to the right and bottom of the game window.

I've tried using the isValid() check and the resolutions are passing...

Why is the monitor resolution changing properly but the game window not filling up the entire available space? I have provided a screenshot from testing at 1280x720.

Edit:
Windows 10 64bit
Nvidia GeForce GT 750M
« Last Edit: August 11, 2015, 08:29:00 am by Programmer001 »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Full screen isn't filling entire available screen space
« Reply #1 on: August 11, 2015, 07:45:41 am »
You should add that you're under Windows 10, which was released one week ago.
Laurent Gomila - SFML developer

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Full screen isn't filling entire available screen space
« Reply #2 on: August 11, 2015, 09:39:56 am »
Could you measure the actual SFML window (e.g. by using print key to get a screenshot)?

Also does this happen with minimalistic code as well, like the SFML examples?

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Full screen isn't filling entire available screen space
« Reply #3 on: August 11, 2015, 04:54:55 pm »
Is this the initial creation of a window or are you re-creating it (using window.create())?
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Full screen isn't filling entire available screen space
« Reply #4 on: August 11, 2015, 04:56:32 pm »
Are your GPU drivers up-to-date and certified for Win10?

Programmer001

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Full screen isn't filling entire available screen space
« Reply #5 on: August 11, 2015, 08:35:25 pm »
Could you measure the actual SFML window (e.g. by using print key to get a screenshot)?

Also does this happen with minimalistic code as well, like the SFML examples?

Mario, I took a print screen when creating the window at 800 x 600 and sf::Style::Fullscreen. The print screen itself only turned out to be 640 x 480... If I use the snip tool (like I did with the screenshot in my original post) then I'm able to screenshot the entire viewable area.

I just tried this using the code copied and pasted from http://www.sfml-dev.org/tutorials/2.3/window-window.php.

Is this the initial creation of a window or are you re-creating it (using window.create())?
The test code from above created the window with:
sf::Window window(sf::VideoMode(800, 600), "My window", sf::Style::Fullscreen);

The code from my actual project creates a RenderWindow as a private class member:
sf::RenderWindow gameWindow;
and creates in the constructor:
sf::VideoMode resolution = getMaxResolution();
gameWindow.create(resolution, "Game Title", sf::Style::Fullscreen);

The important part of getMaxResolution() is:
sf::VideoMode resolution;

// Capture the largest possible resolution
std::vector<sf::VideoMode> modes = sf::VideoMode::getFullscreenModes();
resolution = modes[0];
resolution.width = 1280; // TESTING
resolution.height = 720; // TESTING

The rest just does error checking to make the the user isn't using a system not compatible with minimum requirements.

Are your GPU drivers up-to-date and certified for Win10?
Yes, my drivers are up-to-date. I have switched between my Nvidia card and Intel Integrated and have come up with the same results.

I'll try out the executable on a couple other PCs today and let you know my findings there as well.

Thanks!
« Last Edit: August 11, 2015, 08:40:13 pm by Programmer001 »

Programmer001

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Full screen isn't filling entire available screen space
« Reply #6 on: August 12, 2015, 09:18:22 pm »
Well,

I was able to test the EXE on a Windows 7 and another Windows 10 computer and the full screen worked perfectly as it should.

So the issue looks to be isolated to my Windows 10 laptop. I'll need to do some more troubleshooting then but if anyone has any ideas I can try please let me know :)

Thanks!

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Full screen isn't filling entire available screen space
« Reply #7 on: August 14, 2015, 11:30:31 am »
I have the feeling there's something going wrong when switching between the Intel and Nvidia cards (Intel running while on Desktop I assume).

Programmer001

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Full screen isn't filling entire available screen space
« Reply #8 on: August 15, 2015, 10:28:17 pm »
Haha, yeah who knows.

I contacted NVidia support and they couldn't figure it out.

I have my NVidia set to be the one running in its control panel and activated the notification icon to tell me when it's the one running. All of that's working fine.

I'll figure it out eventually :) I don't have many games on this laptop so I'll have to download some and test resolutions there.

 

anything