mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
examples/contextlost: Extend the shared backend texture on purpose
This commit is contained in:
parent
96b9f09058
commit
c6cd672536
@ -40,6 +40,7 @@ const (
|
||||
var (
|
||||
count = 0
|
||||
gophersImage *ebiten.Image
|
||||
extraImages []*ebiten.Image
|
||||
)
|
||||
|
||||
func update(screen *ebiten.Image) error {
|
||||
@ -86,6 +87,12 @@ func main() {
|
||||
}
|
||||
gophersImage, _ = ebiten.NewImageFromImage(img, ebiten.FilterDefault)
|
||||
|
||||
// Extend the shared backend GL texture on purpose.
|
||||
for i := 0; i < 20; i++ {
|
||||
eimg, _ := ebiten.NewImageFromImage(img, ebiten.FilterDefault)
|
||||
extraImages = append(extraImages, eimg)
|
||||
}
|
||||
|
||||
if err := ebiten.Run(update, screenWidth, screenHeight, 2, "Context Lost (Ebiten Demo)"); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user