From: DeaDDooMER Date: Thu, 16 Feb 2023 00:53:58 +0000 (+0300) Subject: nogl: fix quads X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=a988c9d5976605ee58789b661e62b50a9e152846;p=d2df-sdl.git nogl: fix quads --- 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 ---------- *)