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

Author Topic: OpenGL application lag  (Read 5937 times)

0 Members and 1 Guest are viewing this topic.

Robbis_1

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: OpenGL application lag
« Reply #15 on: January 10, 2014, 12:42:54 pm »
I have the same issue and moving the view with integers made it slightly better, but it's still there. I'm moving my view by using sf::Keyboard::isKeyPressed every game loop.

Running it in fullscreen caused extreme screen tearing, so I switched the frame limit to vsync instead. There seems to be no sign of "screen lag" in fullscreen with vsync, even if you move the view with floats.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10823
    • View Profile
    • development blog
    • Email
Re: OpenGL application lag
« Reply #16 on: January 10, 2014, 01:18:01 pm »
Running it in fullscreen caused extreme screen tearing, so I switched the frame limit to vsync instead. There seems to be no sign of "screen lag" in fullscreen with vsync, even if you move the view with floats.
This should be expected to some sort, since when you're in window mode, you'll need to share the screen space on the GPU with other applications, while in full screen mode, nobody is going to interfere with you, but with a modern card this shouldn't be such a problem.

Btw. do you notice such micro stuttering as well with other games in window mode that don't use SFML?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Robbis_1

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: OpenGL application lag
« Reply #17 on: January 10, 2014, 01:54:17 pm »
I've never noticed this on anything else and I'm usually running games in windowed no border mode.

Carlo Meroni

  • Newbie
  • *
  • Posts: 13
    • View Profile
    • Email
Re: OpenGL application lag
« Reply #18 on: January 10, 2014, 08:54:25 pm »
Hey guys! I have resolved the issue. SFMl was managing the frames 2 times because i was calling window.setVerticalSyncEnabled(true) at the beginning of the programme and in the event 'lost focus' i was calling window.setFrameratelimit(30).

I have a question.. Whith VSYNC the framerate is set to 60? I can change it?

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: OpenGL application lag
« Reply #19 on: January 10, 2014, 09:44:35 pm »
I have a question.. Whith VSYNC the framerate is set to 60? I can change it?

You could buy a 120hz monitor  :D. Because vertical sync does basically sync your "gpu" refreshrate with the monitor refreshrate to avoid screen tearing and other effects. So if you have a 60hz monitor (like 99% of the displays in europe) you get 60fps in your game.


AlexAUT

BaneTrapper

  • Full Member
  • ***
  • Posts: 213
  • Do you even see this, i dont need it.
    • View Profile
    • Email
Re: OpenGL application lag
« Reply #20 on: January 13, 2014, 07:14:04 pm »
I have a question.. Whith VSYNC the framerate is set to 60? I can change it?
You can change it if your setup supports different frame rates.
BaneTrapperDev@hotmail.com Programing, Coding
Projects: Not in development(unfinished/playable):
http://en.sfml-dev.org/forums/index.php?topic=11073.msg76266#msg76266
UP and in Development: The Wanderer - Lost in time
http://en.sfml-dev.org/forums/index.php?topic=14563.0

 

anything