From ce9662fa7ef60e76cba4565ee532d604bc5cbf13 Mon Sep 17 00:00:00 2001 From: bjorn Date: Thu, 1 Sep 2022 21:54:34 -0700 Subject: [PATCH] Make Model draw start vertex 1-indexed; That way it matches Pass:mesh. --- src/api/l_graphics_model.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/l_graphics_model.c b/src/api/l_graphics_model.c index 26a3c729..00a250fd 100644 --- a/src/api/l_graphics_model.c +++ b/src/api/l_graphics_model.c @@ -97,7 +97,7 @@ static int l_lovrModelGetNodeDraw(lua_State* L) { lovrModelGetNodeDraw(model, node, index, &draw); luax_pushenum(L, MeshMode, draw.mode); luax_pushtype(L, Material, draw.material); - lua_pushinteger(L, draw.start); + lua_pushinteger(L, draw.start + 1); lua_pushinteger(L, draw.count); if (draw.indexed) { lua_pushinteger(L, draw.base);