mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Use 0-length slice instead of nil to keep capacities
This commit is contained in:
parent
59333ba1ad
commit
fc3e8bebe4
@ -59,6 +59,6 @@ func flushDelayedCommands() bool {
|
|||||||
for _, c := range delayedCommands {
|
for _, c := range delayedCommands {
|
||||||
c.f()
|
c.f()
|
||||||
}
|
}
|
||||||
delayedCommands = nil
|
delayedCommands = delayedCommands[:0]
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -269,7 +269,7 @@ func (q *commandQueue) Flush() {
|
|||||||
q.commands = q.commands[nc:]
|
q.commands = q.commands[nc:]
|
||||||
}
|
}
|
||||||
theGraphicsDriver.End()
|
theGraphicsDriver.End()
|
||||||
q.commands = nil
|
q.commands = q.commands[:0]
|
||||||
q.nvertices = 0
|
q.nvertices = 0
|
||||||
q.nindices = 0
|
q.nindices = 0
|
||||||
q.tmpNumIndices = 0
|
q.tmpNumIndices = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user