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

Author Topic: Sprites not drawing textures instead drawing squares  (Read 193 times)

0 Members and 1 Guest are viewing this topic.

naemwear

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Sprites not drawing textures instead drawing squares
« on: January 05, 2022, 05:24:35 pm »
Link to a video showing the problem: https://youtu.be/K-dy3tugJ6s
Code: https://pastebin.com/G6e5je1f


So I am having this problem when I spawn bullets their textures don't show instead just a square shows.
I don't know what is happening or what could be the cause of the problem.
I have listed all the necessary links above, please help. Thank you in advance.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10044
    • View Profile
    • development blog
    • Email
Re: Sprites not drawing textures instead drawing squares
« Reply #1 on: January 05, 2022, 05:30:38 pm »
Try passing true as second parameter to the setTexture function, that way the texture rect is updated to match the texture size
Official FAQ: https://www.sfml-dev.org/faq.php
Nightly Builds: https://www.nightlybuilds.ch/
——————————————————————
Dev Blog: https://dev.my-gate.net/
Thor: http://www.bromeon.ch/libraries/thor/

naemwear

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Re: Sprites not drawing textures instead drawing squares
« Reply #2 on: January 06, 2022, 08:38:24 pm »
Didn't work unfortunately!