mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
parent
fa95275a02
commit
9be3495077
@ -15,8 +15,6 @@
|
||||
package driver
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/internal/affine"
|
||||
"github.com/hajimehoshi/ebiten/internal/thread"
|
||||
)
|
||||
@ -25,7 +23,6 @@ type Graphics interface {
|
||||
SetThread(thread *thread.Thread)
|
||||
Begin()
|
||||
End()
|
||||
SetWindow(window unsafe.Pointer)
|
||||
SetTransparent(transparent bool)
|
||||
SetVertices(vertices []float32, indices []uint16)
|
||||
NewImage(width, height int) (Image, error)
|
||||
|
@ -16,7 +16,6 @@ package opengl
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"unsafe"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/internal/affine"
|
||||
"github.com/hajimehoshi/ebiten/internal/driver"
|
||||
@ -52,10 +51,6 @@ func (d *Driver) End() {
|
||||
d.context.flush()
|
||||
}
|
||||
|
||||
func (d *Driver) SetWindow(window unsafe.Pointer) {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
func (d *Driver) SetTransparent(transparent bool) {
|
||||
// Do nothings.
|
||||
}
|
||||
|
@ -650,7 +650,9 @@ func (u *UserInterface) run(context driver.UIContext) error {
|
||||
w = u.nativeWindow()
|
||||
return nil
|
||||
})
|
||||
u.Graphics().SetWindow(w)
|
||||
if g, ok := u.Graphics().(interface{ SetWindow(unsafe.Pointer) }); ok {
|
||||
g.SetWindow(w)
|
||||
}
|
||||
return u.loop(context)
|
||||
}
|
||||
|
||||
@ -948,7 +950,9 @@ func (u *UserInterface) setWindowSize(width, height int, fullscreen bool, vsync
|
||||
})
|
||||
|
||||
if windowRecreated {
|
||||
u.Graphics().SetWindow(u.nativeWindow())
|
||||
if g, ok := u.Graphics().(interface{ SetWindow(unsafe.Pointer) }); ok {
|
||||
g.SetWindow(u.nativeWindow())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user