mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
graphicscommand: Do not flush (glFlush) when commands are empty
Fixes #1140
This commit is contained in:
parent
56ae207d2a
commit
9b8c547342
@ -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