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

Author Topic: Draw calls for text and performance  (Read 66 times)

0 Members and 1 Guest are viewing this topic.

Milichip

  • Newbie
  • *
  • Posts: 1
    • View Profile
Draw calls for text and performance
« on: January 19, 2025, 06:59:05 am »
Hello, I am currently making too many draw calls with sf::RectangleShape instances as well as sf::Text instances.

I know I can turn all the rectangle draw calls into 1 draw call by using vertex arrays, however, is there a way I can "combine" the text draw calls as well? If not, do you have any other suggestions on how to improve performance with text? If yes, how?

For context, I am making something similar to a text editor or fake operating system: lots of windows and lots of text.
A feature of the program is that I can zoom in and out, and zooming out can display a LOT of text on the screen all at once, obliterating performance due to being unable to cull most of the text.

And yes, this is a real problem and is not just premature optimization as I easily go down to 1-8fps.
« Last Edit: January 19, 2025, 07:04:42 am by Milichip »

 

anything