mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
parent
7991ba4cfa
commit
c9bc5913fd
@ -28,7 +28,6 @@ type Graphics interface {
|
|||||||
SetWindow(window unsafe.Pointer)
|
SetWindow(window unsafe.Pointer)
|
||||||
SetTransparent(transparent bool)
|
SetTransparent(transparent bool)
|
||||||
SetVertices(vertices []float32, indices []uint16)
|
SetVertices(vertices []float32, indices []uint16)
|
||||||
Flush()
|
|
||||||
NewImage(width, height int) (Image, error)
|
NewImage(width, height int) (Image, error)
|
||||||
NewScreenFramebufferImage(width, height int) (Image, error)
|
NewScreenFramebufferImage(width, height int) (Image, error)
|
||||||
Reset() error
|
Reset() error
|
||||||
|
@ -274,10 +274,6 @@ func (q *commandQueue) Flush() {
|
|||||||
// introduced than drawTrianglesCommand.
|
// introduced than drawTrianglesCommand.
|
||||||
indexOffset += c.NumIndices()
|
indexOffset += c.NumIndices()
|
||||||
}
|
}
|
||||||
if 0 < nc {
|
|
||||||
// Call glFlush to prevent black flicking (especially on Android (#226) and iOS).
|
|
||||||
theGraphicsDriver.Flush()
|
|
||||||
}
|
|
||||||
cs = cs[nc:]
|
cs = cs[nc:]
|
||||||
}
|
}
|
||||||
theGraphicsDriver.End()
|
theGraphicsDriver.End()
|
||||||
|
@ -364,10 +364,6 @@ func (d *Driver) SetVertices(vertices []float32, indices []uint16) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Driver) Flush() {
|
|
||||||
// On Metal, flushing command buffers only once is enough except for manipulating pixels. Do not call flush.
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *Driver) flush(wait bool, present bool) {
|
func (d *Driver) flush(wait bool, present bool) {
|
||||||
d.t.Call(func() error {
|
d.t.Call(func() error {
|
||||||
if d.cb == (mtl.CommandBuffer{}) {
|
if d.cb == (mtl.CommandBuffer{}) {
|
||||||
|
@ -47,7 +47,9 @@ func (d *Driver) Begin() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (d *Driver) End() {
|
func (d *Driver) End() {
|
||||||
// Do nothing.
|
// Call glFlush to prevent black flicking (especially on Android (#226) and iOS).
|
||||||
|
// TODO: examples/sprites worked without this. Is this really needed?
|
||||||
|
d.context.flush()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Driver) SetWindow(window unsafe.Pointer) {
|
func (d *Driver) SetWindow(window unsafe.Pointer) {
|
||||||
@ -128,10 +130,6 @@ func (d *Driver) Draw(indexLen int, indexOffset int, mode driver.CompositeMode,
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Driver) Flush() {
|
|
||||||
d.context.flush()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (d *Driver) SetVsyncEnabled(enabled bool) {
|
func (d *Driver) SetVsyncEnabled(enabled bool) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user