Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Window
»
Cant access to window.draw thru function on C++.
Print
Pages: [
1
]
Author
Topic: Cant access to window.draw thru function on C++. (Read 2268 times)
0 Members and 1 Guest are viewing this topic.
Burat
Newbie
Posts: 1
Cant access to window.draw thru function on C++.
«
on:
August 25, 2017, 04:58:49 pm »
Hello.
"RenderWindow window" initialized in main.
When i try to
window.clear\draw\display
in function. The window stay clear and have no any picture, just white screen.
But same code works, when im unroll the function.
Whats im do wrong?
Logged
Arcade
Full Member
Posts: 230
Re: Cant access to window.draw thru function on C++.
«
Reply #1 on:
August 25, 2017, 05:59:29 pm »
Are you perhaps trying to draw a sprite after its corresponding texture has gone out of scope and been destroyed? See the section titled "The white square problem" in the
sprites and textures tutorial
.
If this is not the issue then post a minimal example of your code so we can see what is going on.
Logged
Native Blocks
-
Old School Football Coach
Print
Pages: [
1
]
SFML community forums
»
Help
»
Window
»
Cant access to window.draw thru function on C++.
anything