SFML community forums
Help => Graphics => Topic started by: jjfortherear on December 29, 2012, 03:35:28 am
-
Hi, I'm drawing textures and shapes on my render window, and occasionally when I draw shapes, certain textures won't show up (black box in place of the image). I'm having trouble isolating the problem, but I'm wondering if it might have something to do with the order in which things are drawn? Whether it's relevant or not, how does sfml decide what's in front/behind? Is it purely the order in which they're drawn? Thanks!
I notice it tends to happen when I set a nonzero outline on my shapes.
-
Is it purely the order in which they're drawn?
Yes.
Hi, I'm drawing textures and shapes on my render window, and occasionally when I draw shapes, certain textures won't show up (black box in place of the image).
Is the texture you are using alive at that moment? If not it would describe your problem.
Were this to be a bug and not an error out of lack of understanding. You should specify if you are using the RC or the latest sources, since the title indicates you are already using SFML 2.
-
Thanks, it's the RC.
What exactly do you mean "alive"?
-
What exactly do you mean "alive"?
He means: Have you verified the texture the sprite refers to is still valid when the problem occurs? The texture must "live" as long as the sprite -- it's a mistake some new-to-SFML programmers make.
Sounds like it might possibly be another case of what's described here (http://en.sfml-dev.org/forums/index.php?topic=9561.0).
-
That it hasn't gone out of scope if not assigned to heap.
-
Try the latest Catalyst drivers (12.11 beta).