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

Author Topic: Any way to decrease text rendering time ?  (Read 1462 times)

0 Members and 1 Guest are viewing this topic.

DangerousBeef

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Any way to decrease text rendering time ?
« on: February 16, 2018, 04:01:35 am »
Seems to take anywhere from 50-150 microseconds to render a text object with SFML. Changing to a simpler font did help but i I'm wondering if there is any way to speed it up somehow.

CPU: 6600k @ 4.5GHz

MyClock.restart();
renderWindow->draw(text1);
               

std::cout << "Took: " << MyClock.getElapsedTime().asMicroseconds() << "microS" << std::endl;

dmitry_t

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Any way to decrease text rendering time ?
« Reply #1 on: February 16, 2018, 08:08:15 am »
Do you draw the text just once and then exit in your test? Most of SFML classes use caching and lazy initialization, so the second and subsequent draw calls are usually significantly faster.