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

Author Topic: Creating Images instead of Loading Images?  (Read 1076 times)

0 Members and 1 Guest are viewing this topic.

Hazique35

  • Newbie
  • *
  • Posts: 16
    • View Profile
Creating Images instead of Loading Images?
« on: March 17, 2013, 03:33:17 pm »
Hi, Ive got SFML running today and its really fun! I was wondering, is it possible to create different images in SFML? I know creating squares and circles is easy, but I mean something like characters in games? Or do you need to create the image in an application such as photoshop and then run import it?

Thanks

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Creating Images instead of Loading Images?
« Reply #1 on: March 17, 2013, 03:35:15 pm »
Yes, this is the purpose of sprites.

You create the graphics externally, and load them using sf::Texture to your application. A sf::Sprite object can then use the texture to display it on the screen.

See also the SFML documentation and tutorials.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Hazique35

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Creating Images instead of Loading Images?
« Reply #2 on: March 17, 2013, 03:56:54 pm »
alright thanks.