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