From a988c9d5976605ee58789b661e62b50a9e152846 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Thu, 16 Feb 2023 03:53:58 +0300 Subject: [PATCH] nogl: fix quads --- src/nogl/noGLES1.inc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/nogl/noGLES1.inc b/src/nogl/noGLES1.inc index 15765bf..6142e2e 100644 --- a/src/nogl/noGLES1.inc +++ b/src/nogl/noGLES1.inc @@ -232,15 +232,16 @@ implementation begin i := Length(x); vpx := Length(v); - if (cmds.mode = GL_QUADS) and (i div vpx mod 4 = 3) then + if (cmds.mode = GL_QUADS) and (i div vpx mod 6 = 3) then begin - for j := 0 to vpx - 1 do - AddFloatRaw(x, x[i - 3*vpx + j]); - for j := 0 to vpx - 1 do - AddFloatRaw(x, x[i - 1*vpx + j]); + for j := 0 to vpx - 1 do AddFloatRaw(x, x[i - 1*vpx + j]); + for j := 0 to vpx - 1 do AddFloatRaw(x, v[j]); + for j := 0 to vpx - 1 do AddFloatRaw(x, x[i - 3*vpx + j]); + end + else + begin + for j := 0 to vpx - 1 do AddFloatRaw(x, v[j]); end; - for j := 0 to vpx - 1 do - AddFloatRaw(x, v[j]); end; (* ---------- end internals ---------- *) -- 2.29.2