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

Author Topic: White square issue  (Read 549 times)

0 Members and 1 Guest are viewing this topic.

sandwich hoop

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
White square issue
« on: March 19, 2023, 04:40:58 pm »
Hi,
I'm sure this is asked a lot, but I've been trying for hours and can't seem to fix the white box issue with my textures.

This is the code I'm using:
(click to show/hide)
Sorry, thanks!

Stauricus

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
    • A Mafia Graphic Novel
    • Email
Re: White square issue
« Reply #1 on: March 19, 2023, 07:48:07 pm »
this piece of code is too small to know for sure the problem, but my guess is that you are executing it from inside a function, right? if so, the texture is deleted when the function ends, and the sprite loses reference to it.
you need to keep the texture alive. maybe show a bit more of this class code can help
Visit my game site (and hopefully help funding it? )
Website | IndieDB

 

anything