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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ppnl

Pages: [1]
1
Window / Window behavior.
« on: January 24, 2023, 10:36:03 am »
What is the following code suppose to do?

#include <SFML/Graphics.hpp>
using namespace sf;

int main()
{
   VideoMode vm(1920, 1080);
   RenderWindow window(vm, "Test!!!", Style::Fullscreen);

   while(window.isOpen())
   {
      if(Keyboard::isKeyPressed(Keyboard::Escape))
      {
         window.close();
      }

      window.clear();
   }

   return 0;
}
 

My understanding is that it should open a full screen borderless window with a resolution of 1920 by 1080. Instead it opens a smaller borderless window in the upper left corner. It is probably 1920 by 1080 pixels but at the resolution of my desktop which is 3840 by 2160. Some open windows on my desk top are descaled as if they were on a 1920 by 1080 desktop when the program is run.

Is this expected behavior? How do you get a 1920 by 1080 full screen window to open? 

Pages: [1]