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

Author Topic: Problem with change texture by function  (Read 1069 times)

0 Members and 2 Guests are viewing this topic.

Siemekk

  • Newbie
  • *
  • Posts: 1
    • View Profile
Problem with change texture by function
« on: November 28, 2017, 06:40:22 pm »
Hello  ;D I have problem with change RectangleShape texture. When i add code to main function, rectangle have my texture. But when i try do it by other function, RectangleShape always no have texture?
My code:
https://pastebin.com/AZkXVb8z

Why i can't change texture in other function? I'm using Visual Studio and SFML 2.4.1. Thanks for Help  :)

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11016
    • View Profile
    • development blog
    • Email
Re: Problem with change texture by function
« Reply #1 on: November 28, 2017, 08:25:58 pm »
Read the texture and sprite tutorial again, especially the section about The White Square Problem.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/