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

Author Topic: Cant access to window.draw thru function on C++.  (Read 2270 times)

0 Members and 1 Guest are viewing this topic.

Burat

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
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?

Arcade

  • Full Member
  • ***
  • Posts: 230
    • View Profile
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.