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

Author Topic: Dynamic size RenderTexture  (Read 1126 times)

0 Members and 1 Guest are viewing this topic.

Mina66

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Dynamic size RenderTexture
« on: June 03, 2013, 11:00:05 am »
How can I dynamically change the size RenderTexture?
Is this possible?

sf::RenderTexture rTexture;
rTexture.create(100.0f, 100.0f);
...
...
rTexture.create(200.0f, 200.0f);
 

or better not?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Dynamic size RenderTexture
« Reply #1 on: June 03, 2013, 11:07:27 am »
Quote
Is this possible?
Yes. So what's your problem?
Laurent Gomila - SFML developer

Mina66

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
Re: Dynamic size RenderTexture
« Reply #2 on: June 03, 2013, 11:22:30 am »
As long as there are no problems.
When the program starts, the object is created with texture. It is painted a picture and text.
During the program the size of the object has to change depending on the length of the text and the image size.
But for this you need to change the size of the texture.
And asked, just in case, that would not have any problems in the future.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Dynamic size RenderTexture
« Reply #3 on: June 03, 2013, 11:42:30 am »
If the API allows it, you can expect it to work :P
Laurent Gomila - SFML developer

 

anything