mirror of
https://github.com/leozide/leocad
synced 2025-01-17 18:11:42 +01:00
Fixed option to disable drawing lines.
This commit is contained in:
parent
efacceee29
commit
406182db5d
1 changed files with 10 additions and 3 deletions
|
@ -399,6 +399,8 @@ void lcContext::DrawMeshSection(lcMesh* Mesh, lcMeshSection* Section)
|
||||||
|
|
||||||
void lcContext::DrawOpaqueMeshes(const lcMatrix44& ViewMatrix, const lcArray<lcRenderMesh>& OpaqueMeshes)
|
void lcContext::DrawOpaqueMeshes(const lcMatrix44& ViewMatrix, const lcArray<lcRenderMesh>& OpaqueMeshes)
|
||||||
{
|
{
|
||||||
|
bool DrawLines = lcGetPreferences().mDrawEdgeLines;
|
||||||
|
|
||||||
for (int MeshIdx = 0; MeshIdx < OpaqueMeshes.GetSize(); MeshIdx++)
|
for (int MeshIdx = 0; MeshIdx < OpaqueMeshes.GetSize(); MeshIdx++)
|
||||||
{
|
{
|
||||||
lcRenderMesh& RenderMesh = OpaqueMeshes[MeshIdx];
|
lcRenderMesh& RenderMesh = OpaqueMeshes[MeshIdx];
|
||||||
|
@ -439,11 +441,16 @@ void lcContext::DrawOpaqueMeshes(const lcMatrix44& ViewMatrix, const lcArray<lcR
|
||||||
lcSetColorFocused();
|
lcSetColorFocused();
|
||||||
else if (RenderMesh.Selected)
|
else if (RenderMesh.Selected)
|
||||||
lcSetColorSelected();
|
lcSetColorSelected();
|
||||||
else if (ColorIndex == gEdgeColor)
|
else if (DrawLines)
|
||||||
|
{
|
||||||
|
if (ColorIndex == gEdgeColor)
|
||||||
lcSetEdgeColor(RenderMesh.ColorIndex);
|
lcSetEdgeColor(RenderMesh.ColorIndex);
|
||||||
else
|
else
|
||||||
lcSetColor(ColorIndex);
|
lcSetColor(ColorIndex);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
DrawMeshSection(Mesh, Section);
|
DrawMeshSection(Mesh, Section);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue