Skip to content

Commit

Permalink
ebiten: refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Jan 22, 2025
1 parent 0f93535 commit 1e6c461
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions gameforui.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"sync/atomic"

"github.com/hajimehoshi/ebiten/v2/internal/atlas"
"github.com/hajimehoshi/ebiten/v2/internal/builtinshader"
"github.com/hajimehoshi/ebiten/v2/internal/ui"
)

Expand Down Expand Up @@ -147,11 +146,9 @@ func DefaultDrawFinalScreen(screen FinalScreen, offscreen *Image, geoM GeoM) {
op.Filter = FilterLinear
screen.DrawImage(offscreen, op)
default:
op := &DrawRectShaderOptions{}
op.Images[0] = offscreen
op := &DrawImageOptions{}
op.GeoM = geoM
w, h := offscreen.Bounds().Dx(), offscreen.Bounds().Dy()
screenShader := builtinShader(builtinshader.FilterPixelated, builtinshader.AddressUnsafe, false)
screen.DrawRectShader(w, h, screenShader, op)
op.Filter = FilterPixelated
screen.DrawImage(offscreen, op)
}
}

0 comments on commit 1e6c461

Please sign in to comment.