fix: update canvas real-time

This commit is contained in:
Beriff
2026-03-10 17:19:50 +07:00
parent 1d168f7be4
commit 64dd2d6e40
7 changed files with 29 additions and 10 deletions

View File

@@ -168,7 +168,7 @@ static gboolean render(GtkGLArea* a, GdkGLContext* ctx, VektorCanvasRenderInfo*
// PASS 2 - draw selection quads
if (vb.count > shape_vertex_count) {
float time = g_get_monotonic_time() / 1000000.0f;
float time = (g_get_monotonic_time() - renderInfo->startupTime) / 10000000.0f;
// re-fetch bbox (we know a shape is selected)
VektorBBox bbox = vektor_primitive_get_bbox(

View File

@@ -21,6 +21,7 @@ typedef struct VektorCanvas {
} VektorCanvas;
typedef struct VektorCanvasRenderInfo {
gint64 startupTime;
VektorShapeBuffer* shapes;
// a pointer to appstate->selectedShape