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

Author Topic: Strange behaviour if RenderWindow is initialized last  (Read 1792 times)

0 Members and 1 Guest are viewing this topic.

V0idExp

  • Newbie
  • *
  • Posts: 5
    • ICQ Messenger - 251952950
    • View Profile
    • http://blog.v0idexp.net
Strange behaviour if RenderWindow is initialized last
« on: February 18, 2012, 03:27:32 pm »
There are two demonstration programs:
1) Working
2) Not working

...and screenshots showing the result of their execution:
1)
2)

The only difference between these two programs is that in the second Texture and Sprite objects are created and initialized BEFORE RenderWindow.
I expected that there would be no difference when initializing RenderWindow after the creation of resources, since they do not look interconnected until the drawing, but after asking on #sfml IRC channel I've been told that it's a matter of context, which is created when a window is initialized. So, in doubt if this is a bug or not, I'm posting my "discover" here. :) What you think about this?

(Running under Arch Linux with 3.2.6 kernel, 64bit with Intel GM965 graphics chip)
No life 'til leather!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Laurent Gomila - SFML developer

V0idExp

  • Newbie
  • *
  • Posts: 5
    • ICQ Messenger - 251952950
    • View Profile
    • http://blog.v0idexp.net
Strange behaviour if RenderWindow is initialized last
« Reply #2 on: February 18, 2012, 03:39:23 pm »
Yes, 3.2.6 Kernel, 64bit, Intel GM965 gfx chip
No life 'til leather!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Strange behaviour if RenderWindow is initialized last
« Reply #3 on: February 18, 2012, 03:43:01 pm »
Ok. Next time, don't forget to check the issue tracker first ;)
Laurent Gomila - SFML developer