mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphicscommand: Do not flush (glFlush) when commands are empty
Fixes #1140
This commit is contained in:
parent
2e2dc7fba4
commit
86c0e871e4
@ -175,6 +175,10 @@ func fract(x float32) float32 {
|
||||
|
||||
// Flush flushes the command queue.
|
||||
func (q *commandQueue) Flush() error {
|
||||
if len(q.commands) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
es := q.indices
|
||||
vs := q.vertices
|
||||
if recordLog() {
|
||||
@ -233,7 +237,6 @@ func (q *commandQueue) Flush() error {
|
||||
vs[i*graphics.VertexFloatNum+7] /= s.height
|
||||
}
|
||||
}
|
||||
|
||||
theGraphicsDriver.Begin()
|
||||
cs := q.commands
|
||||
for len(cs) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user