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

Author Topic: GIF Images  (Read 2819 times)

0 Members and 1 Guest are viewing this topic.

Anasky

  • Newbie
  • *
  • Posts: 20
    • View Profile
GIF Images
« on: October 19, 2014, 03:24:36 pm »
Hey everyone,

I've implemented SFML into my OpenGL application just now (still using the OpenGL rendering method).
I was wondering if it'd be possible to render gif images with SFML, and have them animated. And if it's possible, if there's a tutorial out there on how to implement them?

Thanks in advance :)
Anasky

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: GIF Images
« Reply #1 on: October 19, 2014, 03:30:05 pm »
SFML can only load the first frame of GIF images. So you cannot use an existing animated GIF as-is.

If you need animations, you should store the images separately (can be multiple images in one texture or file). By the way, I've written some classes in my library Thor that simplify the process of animating, feel free to ask if you're interested :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Anasky

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: GIF Images
« Reply #2 on: October 20, 2014, 11:36:03 am »
Thanks for the reply :)

Unfortunately not quite what I had hoped for though xD

 

anything