From a2cb3161107cafe98a585e3534265108dd4df226 Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Tue, 26 Aug 2025 20:58:29 -0500 Subject: [PATCH] cube_ta_fullscreen_textured: reorder vsync wait --- cube_ta_fullscreen_textured.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cube_ta_fullscreen_textured.c b/cube_ta_fullscreen_textured.c index 78bfe27..cc2ca3c 100644 --- a/cube_ta_fullscreen_textured.c +++ b/cube_ta_fullscreen_textured.c @@ -817,6 +817,13 @@ void main() transfer_ta_cube(texture_start); + ////////////////////////////////////////////////////////////////////////////// + // wait for vertical synchronization (and the TA) + ////////////////////////////////////////////////////////////////////////////// + + while (!((*SPG_STATUS) & SPG_STATUS__VSYNC)); + while (((*SPG_STATUS) & SPG_STATUS__VSYNC)); + ////////////////////////////////////////////////////////////////////////////// // start the actual rasterization ////////////////////////////////////////////////////////////////////////////// @@ -825,10 +832,6 @@ void main() // region array *STARTRENDER = 1; - // wait for vertical synchronization - while (!((*SPG_STATUS) & SPG_STATUS__VSYNC)); - while (((*SPG_STATUS) & SPG_STATUS__VSYNC)); - // increment theta for the cube rotation animation // (used by the `vertex_rotate` function) theta += 0.01f;