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

Author Topic: std::list of RenderTextures [Solved, stupid question]  (Read 1079 times)

0 Members and 1 Guest are viewing this topic.

pixartist

  • Newbie
  • *
  • Posts: 19
    • View Profile
std::list of RenderTextures [Solved, stupid question]
« on: December 14, 2013, 04:43:50 pm »
Hi, since RenderTextures are nonCopyable, is it possible to store them in a list ?
edit1: In other words, can I create dynamically allocated textures?
edit2: Yes I can
« Last Edit: December 14, 2013, 04:48:31 pm by pixartist »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: std::list of RenderTextures [Solved, stupid question]
« Reply #1 on: December 14, 2013, 05:29:21 pm »
Use std::unique_ptr<sf::RenderTexture>.

There's no need to fiddle around with new and delete (actually, there is almost never)...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

 

anything