mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
graphicsdriver/monogame: Bug fix: An underlying image size should be adjusted
This commit is contained in:
parent
29ef737413
commit
691e42f806
@ -19,6 +19,7 @@ package monogame
|
|||||||
import (
|
import (
|
||||||
"github.com/hajimehoshi/ebiten/internal/affine"
|
"github.com/hajimehoshi/ebiten/internal/affine"
|
||||||
"github.com/hajimehoshi/ebiten/internal/driver"
|
"github.com/hajimehoshi/ebiten/internal/driver"
|
||||||
|
"github.com/hajimehoshi/ebiten/internal/graphics"
|
||||||
"github.com/hajimehoshi/ebiten/internal/monogame"
|
"github.com/hajimehoshi/ebiten/internal/monogame"
|
||||||
"github.com/hajimehoshi/ebiten/internal/thread"
|
"github.com/hajimehoshi/ebiten/internal/thread"
|
||||||
)
|
)
|
||||||
@ -58,7 +59,8 @@ func (g *Graphics) SetVertices(vertices []float32, indices []uint16) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *Graphics) NewImage(width, height int) (driver.Image, error) {
|
func (g *Graphics) NewImage(width, height int) (driver.Image, error) {
|
||||||
v := g.game.NewRenderTarget2D(width, height)
|
w, h := graphics.InternalImageSize(width), graphics.InternalImageSize(height)
|
||||||
|
v := g.game.NewRenderTarget2D(w, h)
|
||||||
return &Image{
|
return &Image{
|
||||||
v: v,
|
v: v,
|
||||||
g: g,
|
g: g,
|
||||||
|
Loading…
Reference in New Issue
Block a user