mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
Refactoring
This commit is contained in:
parent
fabed66b4a
commit
32e773cf10
2
image.go
2
image.go
@ -267,7 +267,7 @@ func (i *imageImpl) restorePixels(context *opengl.Context) error {
|
|||||||
for j := 0; j < i.height; j++ {
|
for j := 0; j < i.height; j++ {
|
||||||
copy(img.Pix[j*img.Stride:], i.pixels[j*i.width*4:(j+1)*i.width*4])
|
copy(img.Pix[j*img.Stride:], i.pixels[j*i.width*4:(j+1)*i.width*4])
|
||||||
}
|
}
|
||||||
texture, framebuffer, err := graphics.NewImageFromImage(img, glFilter(ui.GLContext(), i.filter))
|
texture, framebuffer, err := graphics.NewImageFromImage(img, glFilter(context, i.filter))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user