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

Author Topic: [Solved] Sfml2 and Sprites  (Read 1349 times)

0 Members and 1 Guest are viewing this topic.

tipfehler

  • Newbie
  • *
  • Posts: 3
    • View Profile
[Solved] Sfml2 and Sprites
« on: November 29, 2011, 07:53:04 pm »
Hi,

I'm new to Sfml and I have a problem with the sf::sprite class. My intention was to blend in an image as an intro and then start with the 3d stuff. But when the sprite is loaded my quad doesn't show up. I think i missunderstand the concept of this class in some way. I created an example to show the problem.

http://pastebin.com/rBmVHpkv

Without the sprite, the quad is drawn. Can someone see whats wrong in this code?

Thanks! :)

tipfehler

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
[Solved] Sfml2 and Sprites
« Reply #1 on: November 29, 2011, 10:47:18 pm »
SFML messes up your own OpenGL states. Have a look at the documentation and the OpenGL tutorial to find out how to solve this problem.
Laurent Gomila - SFML developer

tipfehler

  • Newbie
  • *
  • Posts: 3
    • View Profile
[Solved] Sfml2 and Sprites
« Reply #2 on: November 29, 2011, 11:41:04 pm »
Thanks, didn't see the SaveGLStates method. :)