From 81b7fd7641f745515d5a02c2711c3993e4217f1d Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 30 Jul 2023 18:37:18 +0900 Subject: [PATCH] internal/graphicscommand: refactoring --- internal/graphicscommand/command.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/graphicscommand/command.go b/internal/graphicscommand/command.go index f7e1abe01..c15c2202c 100644 --- a/internal/graphicscommand/command.go +++ b/internal/graphicscommand/command.go @@ -175,9 +175,6 @@ func (q *commandQueue) Flush(graphicsDriver graphicsdriver.Graphics, endFrame bo swapBuffersForGL() } }) - if endFrame { - q.uint32sBuffer.reset() - } return } @@ -215,6 +212,10 @@ func (q *commandQueue) flush(graphicsDriver graphicsdriver.Graphics, endFrame bo q.vertices = q.vertices[:0] q.indices = q.indices[:0] q.tmpNumVertexFloats = 0 + + if endFrame { + q.uint32sBuffer.reset() + } }() cs := q.commands