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

Author Topic: Multiple screens setup  (Read 830 times)

0 Members and 1 Guest are viewing this topic.

nisu_srk

  • Newbie
  • *
  • Posts: 3
    • View Profile
Multiple screens setup
« on: December 18, 2018, 09:53:32 pm »
I have developed a desktop reaction test where users are supposed to click when they see a dot on the screen. For the next step, we're taking this idea to dual screens that are printing two slightly different things on each screen. Basically, a very basic VR headset. But I have come to realize that SFML does not have multiple screen support.

There is a current request to let the users select which screen to use for fullscreen mode, but my request is to have a feature that lets you create two windows(or something like that) and when drawing things, you can specify which screen to draw to. For ex., window.draw(circleshape, screen_1); window.draw(rectangle, screen_2) etc.

This would be a great feature to have, because it open SFML up for VR applications as well! In the meantime, I'll work on the my problem at hand and if I'm able to solve it, perhaps I'll have some outlook I can offer here.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32123
    • View Profile
    • SFML's website
    • Email
Re: Multiple screens setup
« Reply #1 on: December 19, 2018, 06:34:08 am »
I don't understand your request. If you have one window per monitor, then just choose the right window when drawing. I really don't get the meaning of your example (drawing to the same window, but to different screens).
Laurent Gomila - SFML developer

Hapax

  • Hero Member
  • *****
  • Posts: 2765
  • My number of posts is shown in hexadecimal.
    • View Profile
Re: Multiple screens setup
« Reply #2 on: December 30, 2018, 12:55:26 pm »
I'd like to clarify as I think I understood the request.

Fullscreen ability for multiple screens: one window fullscreen on one screen, another fullscreen on another screen.

The interface suggested makes no sense though: draw as a method of a window accessing a separate window.


One thing to note is that a window can be "fullscreen window" which is a borderless window. These can be larger than a screen and stretch across two screens. Presuming you have two screens with identical resolutions, this seems like it would be a simple task: create a borderless window with the width of both screens and the height of one - and position it at (0, 0). This means that to draw onto the "second screen", you just use the right half of the window. If you need the visuals to clip to the screen, you can use views and their viewports.
Selba Ward - SFML drawables
Kairos - Timing Library
Rectangular Boundary Collision - Rectangular SAT Collision

@Hapaxiation - Hapaxia on Twitter

 

anything