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

Author Topic: Possible bug with sprites and images?  (Read 5596 times)

0 Members and 1 Guest are viewing this topic.

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Possible bug with sprites and images?
« on: January 16, 2009, 11:24:05 pm »
I was testing out drawing sprites and I noticed if I call sfSprite_SetImage and pass NULL, then the sprites image is unchanged. was this intentional?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Possible bug with sprites and images?
« Reply #1 on: January 16, 2009, 11:33:17 pm »
Yes, and you even get an error message. Passing a NULL image is not allowed.
Laurent Gomila - SFML developer

TricksterGuy

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Possible bug with sprites and images?
« Reply #2 on: January 16, 2009, 11:59:09 pm »
I didn't get an error message, just nothing happened. haha

Ok now that I know, I can work around this :P I was expecting that with a null image as its image when you then call sfRenderWindow_DrawSprite(sprite) then the sprite just wouldn't draw.


Thanks

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Possible bug with sprites and images?
« Reply #3 on: January 17, 2009, 10:09:18 am »
Quote
I didn't get an error message

The messages are sent to stderr, you can redirect it to a file or show the console to see them.
Laurent Gomila - SFML developer

 

anything