From 588ad86f8ed0328dbab5e462bfc90b4d6f867d6d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Perrier Date: Tue, 16 Feb 2021 16:05:34 +0100 Subject: [PATCH] Fix Span Count -> length. --- Source/Engine/Render2D/Render2D.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Engine/Render2D/Render2D.cpp b/Source/Engine/Render2D/Render2D.cpp index cd91430bf..a2e72eeb7 100644 --- a/Source/Engine/Render2D/Render2D.cpp +++ b/Source/Engine/Render2D/Render2D.cpp @@ -1752,10 +1752,10 @@ void Render2D::DrawTexturedTriangles(GPUTexture* t, const Span& vertice Render2DDrawCall& drawCall = DrawCalls.AddOne(); drawCall.Type = DrawCallType::FillTexture; drawCall.StartIB = IBIndex; - drawCall.CountIB = vertices.Count(); + drawCall.CountIB = vertices.Length(); drawCall.AsTexture.Ptr = t; - for (int32 i = 0; i < vertices.Count(); i += 3) + for (int32 i = 0; i < vertices.Length(); i += 3) WriteTri(vertices[i], vertices[i + 1], vertices[i + 2], uvs[i], uvs[i + 1], uvs[i + 2]); } @@ -1766,9 +1766,9 @@ void Render2D::FillTriangles(const Span& vertices, const Span& c Render2DDrawCall& drawCall = DrawCalls.AddOne(); drawCall.Type = useAlpha ? DrawCallType::FillRect : DrawCallType::FillRectNoAlpha; drawCall.StartIB = IBIndex; - drawCall.CountIB = vertices.Count(); + drawCall.CountIB = vertices.Length(); - for (int32 i = 0; i < vertices.Count(); i += 3) + for (int32 i = 0; i < vertices.Length(); i += 3) WriteTri(vertices[i], vertices[i + 1], vertices[i + 2], colors[i], colors[i + 1], colors[i + 2]); }