mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-09 17:43:18 +01:00
ebiten: refactoring
This commit is contained in:
parent
0f93535faf
commit
1e6c4617cc
@ -20,7 +20,6 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten/v2/internal/atlas"
|
"github.com/hajimehoshi/ebiten/v2/internal/atlas"
|
||||||
"github.com/hajimehoshi/ebiten/v2/internal/builtinshader"
|
|
||||||
"github.com/hajimehoshi/ebiten/v2/internal/ui"
|
"github.com/hajimehoshi/ebiten/v2/internal/ui"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -147,11 +146,9 @@ func DefaultDrawFinalScreen(screen FinalScreen, offscreen *Image, geoM GeoM) {
|
|||||||
op.Filter = FilterLinear
|
op.Filter = FilterLinear
|
||||||
screen.DrawImage(offscreen, op)
|
screen.DrawImage(offscreen, op)
|
||||||
default:
|
default:
|
||||||
op := &DrawRectShaderOptions{}
|
op := &DrawImageOptions{}
|
||||||
op.Images[0] = offscreen
|
|
||||||
op.GeoM = geoM
|
op.GeoM = geoM
|
||||||
w, h := offscreen.Bounds().Dx(), offscreen.Bounds().Dy()
|
op.Filter = FilterPixelated
|
||||||
screenShader := builtinShader(builtinshader.FilterPixelated, builtinshader.AddressUnsafe, false)
|
screen.DrawImage(offscreen, op)
|
||||||
screen.DrawRectShader(w, h, screenShader, op)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user