1
Graphics / 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)
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)