ebiten: refactoring

This commit is contained in:
Hajime Hoshi 2025-01-23 01:50:39 +09:00
parent 0f93535faf
commit 1e6c4617cc

View File

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