Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
General
»
SFML projects
»
Sprites not drawing textures instead drawing squares
Print
Pages: [
1
]
Author
Topic: Sprites not drawing textures instead drawing squares (Read 3622 times)
0 Members and 2 Guests are viewing this topic.
naemwear
Newbie
Posts: 4
Sprites not drawing textures instead drawing squares
«
on:
January 05, 2022, 05:24:35 pm »
Link to a video showing the problem
:
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.
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11034
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
Logged
Official FAQ:
https://www.sfml-dev.org/faq.php
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
naemwear
Newbie
Posts: 4
Re: Sprites not drawing textures instead drawing squares
«
Reply #2 on:
January 06, 2022, 08:38:24 pm »
Didn't work unfortunately!
Logged
Print
Pages: [
1
]
SFML community forums
»
General
»
SFML projects
»
Sprites not drawing textures instead drawing squares
anything