mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Async loading textures
This commit is contained in:
parent
cbc5c38db6
commit
8fbd818f28
@ -46,13 +46,15 @@ func main() {
|
||||
screenSizeUpdated := u.ScreenSizeUpdated()
|
||||
|
||||
for tag, path := range TexturePaths {
|
||||
//go func() {
|
||||
tag := tag
|
||||
path := path
|
||||
go func() {
|
||||
img, err := loadImage(path)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
u.CreateTexture(tag, img)
|
||||
//}()
|
||||
}()
|
||||
}
|
||||
|
||||
drawing := make(chan *graphics.LazyCanvas)
|
||||
|
Loading…
Reference in New Issue
Block a user