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

Author Topic: Random spikes in time taken to draw objects  (Read 10911 times)

0 Members and 1 Guest are viewing this topic.

LagEvent

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Random spikes in time taken to draw objects
« Reply #15 on: March 18, 2013, 05:24:33 pm »
How is that convenient?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Random spikes in time taken to draw objects
« Reply #16 on: March 18, 2013, 06:52:24 pm »
sf::RenderTarget and sf::RenderWindow are two implementations of the same base, sf::RenderTarget, and therefore they have a lot of code and behaviours in common. So it is convenient to manage them the same way, i.e. giving each target its own OpenGL context.
Laurent Gomila - SFML developer

LagEvent

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Random spikes in time taken to draw objects
« Reply #17 on: March 20, 2013, 08:15:51 pm »
Since my last post I've switched over to pure OpenGL. I also found this post. It suggests that when vsync is disabled, the CPU overloads the GPU with information, which have to catch up every second. I tested this out, but I'm sure this is false. There was also one guy mentioning that ProcessExplorer was affecting the game. I remember back when I was working with XNA, the refresh rate of Task Manager was influencing my game. I started killing background applications and once I killed f.lux, my eyes hurt, but the largest lag spikes went completely away. In the end, the lag spikes was caused by external software, not SFML or graphics drivers. Although I'm still leaving SFML due to various other issues and limitations.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Random spikes in time taken to draw objects
« Reply #18 on: March 20, 2013, 08:39:07 pm »
Quote
Although I'm still leaving SFML due to various other issues and limitations
Anything that would be worth adding to SFML?
Laurent Gomila - SFML developer

LagEvent

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Random spikes in time taken to draw objects
« Reply #19 on: March 20, 2013, 09:29:10 pm »
Caching of shader uniform locations and a proper FBO implementation could improve performance in extreme situations such as mine. I'm also looking into MRT and increased performance on VBO's, which would probably have made SFML more cumbersome to use for the majority of users.

For the most part I just like to have control over everything. For instance, I have to constantly swap between yours and my own implementation of Vector3. I've also written a few wrappers around your classes because some private members aren't exposed, it just feels silly. I'm unable to resist the evils of premature optimization.

 

anything