SFML community forums

Help => Graphics => Topic started by: DangerousBeef on February 16, 2018, 04:01:35 am

Title: Any way to decrease text rendering time ?
Post by: DangerousBeef 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;
Title: Re: Any way to decrease text rendering time ?
Post by: dmitry_t 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.