-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Cannot load textures #494
Labels
bug
Something isn't working
Comments
well, let me check it. Maybe checking if MainWindow is open isn't necessary anymore after some changes... Not exactly sure. |
gucio321
added a commit
to gucio321/giu
that referenced
this issue
Apr 5, 2022
…(*MasterWindow).Run no idea why is it necessary. everything seems working. I had to forget about removeing something in AllenDang#451 fix AllenDang#494
yah, panic call isn't necessary there. Opened PR. |
Great! Hopefully it won't cause any memory leak. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happend?
I try to add textures to the canvas like the example code does, but it always returns an error
giu: .NewTextureFromRgba: cannot load texture befor (*MasterWindow).Run call!
Edit: after running it in a goroutine, it finally loads now.
The example code should be changed and tested because the load function won't work if not put in a goroutine.
I think there were comments from earlier version that said that you need to run that function in a goroutine. I wonder why you removed it?
Edit2: Actually, running a goroutine doesn't ensure that it will work. I can only run it by setting the timer and delay the function by 100ms
Where can I run the texture load function if the run function is the last one called and the load function only works when the app is running?
Code example
The example code from https://github.com/AllenDang/giu/blob/master/examples/canvas/canvas.go
To Reproduce
Version
(latest)
OS
Windows 11
The text was updated successfully, but these errors were encountered: