From 8f57c31d9687bc82e31b0aadf0a378397dd695da Mon Sep 17 00:00:00 2001 From: ducphamhong Date: Tue, 17 May 2022 17:35:00 +0700 Subject: [PATCH] #80 Fix compile on GCC --- .../Collision/Source/Decal/CDecalsRenderer.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Projects/Skylicht/Collision/Source/Decal/CDecalsRenderer.cpp b/Projects/Skylicht/Collision/Source/Decal/CDecalsRenderer.cpp index 4c783f2e9..516ccb133 100644 --- a/Projects/Skylicht/Collision/Source/Decal/CDecalsRenderer.cpp +++ b/Projects/Skylicht/Collision/Source/Decal/CDecalsRenderer.cpp @@ -191,6 +191,8 @@ namespace Skylicht // Fill vertices and indices { + video::SColor color(255, 255, 255, 255); + for (u32 p = 0; p < 3; p++) { core::vector3df uvPos = uvTriangle.pointA; @@ -223,13 +225,13 @@ namespace Skylicht core::vector2df uv(uvPos.X, 1.0f - uvPos.Z); - vertices->addVertex( - &video::S3DVertex( - pos, - triangleNormal, - video::SColor(255, 255, 255, 255), - uv) - ); + video::S3DVertex vtx( + pos, + triangleNormal, + color, + uv); + + vertices->addVertex(&vtx); vertexIndex++; }