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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - PupperGump

Pages: [1]
Graphics / sf::Text::setCharacterSize() memory leak, maybe (Solved)
« on: March 15, 2023, 08:18:48 pm »
I made a gui and I am using a slider to change the font size of a text. The memory remains stable when not changing the value, but every time it's changed it increases memory use. So if I swing the slider back and forth a bit, it eats up my 32GB memory very quickly.

Is it supposed to do this and should I be scaling instead of changing the character size?

Edit: I fixed this issue by using this font function in sf::Text::setCharacterSize()

void Font::clearPages() const
    // Reset members

Graphics / sf::Angle not working?
« on: January 22, 2023, 02:32:00 am »
I'm trying to follow an sf::View tutorial by exploiter, but I can't use the rotate() method at all. (version 2.5.1 on Windows 10 x64)

Here's what I've tried so far:

   sf::Angle angle(180.f); // error
   sf::Angle angle2 = 180.f; // error
   sf::Angle angle3; // No method to change this thing's angle

   view.rotate(180.f); // error
   view.rotate(angle3); // works but can't change angle
   view.setRotation(180.f); // same thing

Can't we just use a float or something, or am I not supposed to use this method?

Pages: [1]