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) 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,10 +441,15 @@ 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)
lcSetEdgeColor(RenderMesh.ColorIndex); {
if (ColorIndex == gEdgeColor)
lcSetEdgeColor(RenderMesh.ColorIndex);
else
lcSetColor(ColorIndex);
}
else else
lcSetColor(ColorIndex); continue;
} }
DrawMeshSection(Mesh, Section); DrawMeshSection(Mesh, Section);