remove extra vertices when drawing curves
parent
e1e2bb18a4
commit
64223a0cfd
|
@ -1,7 +1,7 @@
|
||||||
cmake_minimum_required(VERSION 3.25)
|
cmake_minimum_required(VERSION 3.25)
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
set(BLT_GRAPHICS_VERSION 2.0.2)
|
set(BLT_GRAPHICS_VERSION 2.0.3)
|
||||||
set(BLT_GRAPHICS_TEST_VERSION 0.0.1)
|
set(BLT_GRAPHICS_TEST_VERSION 0.0.1)
|
||||||
|
|
||||||
project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION})
|
project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION})
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit ebf0a80774fba3b4c6e7ccfc51193b9a3299cdbc
|
Subproject commit 79148a8506b1e26a5197977b4ece1091f026b052
|
|
@ -82,14 +82,17 @@ namespace blt::gfx
|
||||||
const vec2 right = {dir.y(), -dir.x()};
|
const vec2 right = {dir.y(), -dir.x()};
|
||||||
const vec2 left = {-dir.y(), dir.x()};
|
const vec2 left = {-dir.y(), dir.x()};
|
||||||
|
|
||||||
auto bottom_left = line.p1 + left * thickness;
|
|
||||||
auto bottom_right = line.p1 + right * thickness;
|
|
||||||
|
|
||||||
auto top_left = line.p2 + left * thickness;
|
auto top_left = line.p2 + left * thickness;
|
||||||
auto top_right = line.p2 + right * thickness;
|
auto top_right = line.p2 + right * thickness;
|
||||||
|
|
||||||
vertices.push_back({make_vec3(bottom_right), vec2{1, 0}});
|
if (i == 0)
|
||||||
vertices.push_back({make_vec3(bottom_left), vec2{0, 0}});
|
{
|
||||||
|
auto bottom_left = line.p1 + left * thickness;
|
||||||
|
auto bottom_right = line.p1 + right * thickness;
|
||||||
|
|
||||||
|
vertices.push_back({make_vec3(bottom_right), vec2{1, 0}});
|
||||||
|
vertices.push_back({make_vec3(bottom_left), vec2{0, 0}});
|
||||||
|
}
|
||||||
|
|
||||||
if (i == lines.size() - 1)
|
if (i == lines.size() - 1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue