Fixed option to disable drawing lines.

This commit is contained in:
leo 2015-03-18 02:30:54 +00:00
parent efacceee29
commit 406182db5d

View file

@ -399,6 +399,8 @@ void lcContext::DrawMeshSection(lcMesh* Mesh, lcMeshSection* Section)
void lcContext::DrawOpaqueMeshes(const lcMatrix44& ViewMatrix, const lcArray<lcRenderMesh>& OpaqueMeshes)
{
bool DrawLines = lcGetPreferences().mDrawEdgeLines;
for (int MeshIdx = 0; MeshIdx < OpaqueMeshes.GetSize(); MeshIdx++)
{
lcRenderMesh& RenderMesh = OpaqueMeshes[MeshIdx];
@ -439,11 +441,16 @@ void lcContext::DrawOpaqueMeshes(const lcMatrix44& ViewMatrix, const lcArray<lcR
lcSetColorFocused();
else if (RenderMesh.Selected)
lcSetColorSelected();
else if (ColorIndex == gEdgeColor)
else if (DrawLines)
{
if (ColorIndex == gEdgeColor)
lcSetEdgeColor(RenderMesh.ColorIndex);
else
lcSetColor(ColorIndex);
}
else
continue;
}
DrawMeshSection(Mesh, Section);
}