Async loading textures

This commit is contained in:
Hajime Hoshi 2013-12-08 16:28:18 +09:00
parent cbc5c38db6
commit 8fbd818f28

View File

@ -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)