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 - nisu_srk

Pages: [1]
1
Feature requests / 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.

2
Graphics / Re: Flicker after the first click only
« on: September 25, 2018, 06:59:12 pm »
Alright, so there is no flicker if I change the window style to default, so the above mentioned issue is only when using fullscreen style. This is weird, has anyone experienced anything like this?

3
Graphics / Flicker after the first click only
« on: September 25, 2018, 06:03:13 pm »
I know that we should use clear, draw, display format but my objective makes me do something slightly different.
I want to always display a grey screen with a red dot in the middle. And then based on some calculations, at some intervals, I want to show a white dot at random location for 200ms. I want to detect clicks as well while waiting for the next dot. So my code structure is as shown here.

https://pastebin.com/embed_js/j7YrW9QA

OR
------------------------------------------------------
window.clear(grey_background);
window.draw(red_dot);
window.display();
 
while(window.isOpen()){
 
    MouseClickOperations(){
 
    }
 
    window.clear(grey_background);
    window.draw(red_dot);
   
    if(1s passed from the last click){
        window.draw(white_dot);//for 200ms
        window.display();
 
        window.clear(grey_background);
        window.draw(red_dot);
    }
   
    window.display();
 
}
------------------------------------------------

At the first click, the screen flickers, but after that, it works like a charm. What is causing this flicker and how do I get rid of it? Also, open to suggestions regarding how I can restructure my code if that's needed.

Pages: [1]
anything