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

Author Topic: RenderTarget slow  (Read 2255 times)

0 Members and 1 Guest are viewing this topic.

andrewkoro105

  • Newbie
  • *
  • Posts: 5
    • View Profile
RenderTarget slow
« on: June 27, 2022, 10:33:42 am »
When I changed the reference from RenderWindow to RenderTarget, the render function slowed down by half. Is this a problem in SFML or in our program?
« Last Edit: June 27, 2022, 10:35:24 am by andrewkoro105 »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: RenderTarget slow
« Reply #1 on: June 27, 2022, 01:57:01 pm »
RenderTarget is an abstract class, do you mean RenderTexture?

How do you measure the mentioned performance?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Hedgeberry

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: RenderTarget slow
« Reply #2 on: June 27, 2022, 11:10:18 pm »
Sorry, I work with this person it in the project, we have a hierarchy of classes that store a reference where they are rendered. This can be either RenderTexture or RenderWindow (passed during initialization), so we store a reference to RenderTarget, after we changed the reference type from RenderWindow to RenderTarget (but the reference still passes the same window) our program has halved the FPS we were counting with sf::Clock.

 

anything