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

Author Topic: Best way to draw on Sprite?  (Read 2467 times)

0 Members and 1 Guest are viewing this topic.

93interactive

  • Newbie
  • *
  • Posts: 39
    • View Profile
    • http://93-interactive.com
Best way to draw on Sprite?
« on: November 20, 2011, 07:59:06 am »
Hi,

what is the best way to draw on a sprite with sfml 2?

As far as i can see:

    get texture of sprite
    get image from texture
    draw to image
    create texture from image
    set texture to sprite


Doesn't sound high-performance to me... Any other ideas?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Best way to draw on Sprite?
« Reply #1 on: November 20, 2011, 11:29:09 am »
You don't need sf::Image. Use sf::RenderTexture.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: