diff --git a/Source/Engine/Render2D/Render2D.cpp b/Source/Engine/Render2D/Render2D.cpp index 705761ae1..f24ca5545 100644 --- a/Source/Engine/Render2D/Render2D.cpp +++ b/Source/Engine/Render2D/Render2D.cpp @@ -1918,9 +1918,8 @@ void Render2D::DrawBlur(const Rectangle& rect, float blurStrength) void Render2D::DrawTexturedTriangles(GPUTexture* t, const Span& vertices, const Span& uvs) { - CHECK(vertices.Length() == uvs.Length()) - RENDER2D_CHECK_RENDERING_STATE; + CHECK(vertices.Length() == uvs.Length()) Render2DDrawCall& drawCall = DrawCalls.AddOne(); drawCall.Type = DrawCallType::FillTexture; @@ -1934,16 +1933,15 @@ void Render2D::DrawTexturedTriangles(GPUTexture* t, const Span& vertice void Render2D::DrawTexturedTriangles(GPUTexture* t, const Span& vertices, const Span& uvs, const Color& color) { - Color colors[3] = {(Color)color, (Color)color, (Color)color}; + Color colors[3] = { (Color)color, (Color)color, (Color)color }; Span spancolor(colors, 3); DrawTexturedTriangles(t, vertices, uvs, spancolor); } void Render2D::DrawTexturedTriangles(GPUTexture* t, const Span& vertices, const Span& uvs, const Span& colors) { - CHECK(vertices.Length() == uvs.Length()) - RENDER2D_CHECK_RENDERING_STATE; + CHECK(vertices.Length() == uvs.Length() == colors.Length()) Render2DDrawCall& drawCall = DrawCalls.AddOne(); drawCall.Type = DrawCallType::FillTexture; @@ -1958,7 +1956,6 @@ void Render2D::DrawTexturedTriangles(GPUTexture* t, const Span& vertice void Render2D::FillTriangles(const Span& vertices, const Span& colors, bool useAlpha) { CHECK(vertices.Length() == colors.Length()); - RENDER2D_CHECK_RENDERING_STATE; Render2DDrawCall& drawCall = DrawCalls.AddOne(); diff --git a/Source/Engine/Render2D/Render2D.h b/Source/Engine/Render2D/Render2D.h index 118f20107..ccdbd4ae0 100644 --- a/Source/Engine/Render2D/Render2D.h +++ b/Source/Engine/Render2D/Render2D.h @@ -410,7 +410,7 @@ public: /// The uvs array. /// The color. API_FUNCTION() static void DrawTexturedTriangles(GPUTexture* t, const Span& vertices, const Span& uvs, const Color& color); - + /// /// Draws vertices array. ///