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.


Messages - paulj91

Pages: [1]
1
Window / Re: Resizing Oversized Windows
« on: June 02, 2013, 09:18:26 pm »
Awesome, thanks! The test machine this was built on runs Ubuntu, so it seems like window managers in general might have a problem with it. Thanks for all the help, I'll look into alternative methods!

2
Window / Re: Resizing Oversized Windows
« on: June 02, 2013, 10:01:52 am »
By event loop do you just mean polling for events? I suppose I could look for Resize events, though other than adjusting the size like in the first example, I can't think of any other actions that I should take in order to resize the window. Even with an empty loop polling for events, there is no window resize taking place.

#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

int main(){
  sf::RenderWindow w(sf::VideoMode(1920,1024,32),"Window");
  w.setSize(sf::Vector2u(800,600));
  w.display();
  sf::Event event;
  while (w.isOpen()){
    w.clear();
    while (w.pollEvent(event)){
     
    }
    w.display();
  }
}  
 

Is this roughly what you meant by an event loop being necessary? This code doesn't work either, and this is just a minimal example I could provide that reproduces the issue. I apologize if I am forgetting something simple, I just can't seem to figure out why resetting the size isn't resizing the window.

3
Window / Resizing Oversized Windows
« on: June 02, 2013, 08:56:45 am »
I have been looking into supporting different screen resolutions with SFML, with which I don't have a lot of experience. In order to do this, I decided to opt for a 1920x1024 resolution, then scale to the appropriate resolution accordingly by changing the size of the window. However, I've been running into a bit of a problem. The following code doesn't actually resize the window that is created with its call to setSize;

#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
int main(){
  sf::RenderWindow w(sf::VideoMode(1920,1024,32),"Window");
  w.setSize(sf::Vector2u(800,600));
  w.display();
  sf::sleep(sf::seconds(5));
}
 

I know that oversized windows do not display properly due to OS restrictions, but does this also prevent them from being resized? If so, what is the best way to handle resolutions that are larger than the development screen size? Thanks so much, any help or input would be much appreciated.

Pages: [1]
anything